Function Tree Layout
Class/Panel Name
SPM Start Sequence
SPM Stop Sequence
Server Add Start Arg
Server Clear Start Args
Server Start
Server Stop
Server Is Running
Client Connect
Client Is Connected
Client Disconnect
Project Open
Project Is Open
Project Get Open File Path Buffer Size
Project Get Open File Path
Project Close
System Boot Offline
System Boot Online
System Is Booted Offline
System Is Booted Online
System Is Booted
System Reset Full
System Shut Down
System Disable Error Output
System Restore Error Output
Switch Setup Get Endpoint Names Buffer Size
Switch Setup Get Endpoint Names
Switch Setup Get Route Names Buffer Size
Switch Setup Get Route Names
Switch Setup Get Relay Group Names Buffer Size
Switch Setup Get Relay Group Names
Switch Setup Get Sequence Names Buffer Size
Switch Setup Get Sequence Names
Switch Setup Get Logical Pin From Endpoint Name
Switch Setup Get Endpoint Name Of Logical Pin
Switch Setup Configure Route Group From Connected Endpoints
Switch Setup Check Route Exists
Switch Setup Delete Route
Switch Setup Configure Sequence From Connected Endpoints
Switch Setup Check Sequence Exists
Switch Setup Delete Sequence
Switch Setup Apply Switching Config
Switch Set Short Circuit Detection
Switch Get Short Circuit Detection
Switch Get Route Status Info All
Switch Get Relay Group Status Info All
Switch Get Route Connected Status
Switch Get Endpoints Connected Status
Switch Switch To Initial State
Switch Check Has Initial Switching State
Switch Connect Endpoints
Switch Disconnect Endpoints
Switch Disconnect Endpoints Forced
Switch Connect Endpoints Csv
Switch Disconnect Endpoints Csv
Switch Connect Endpoints Arr
Switch Disconnect Endpoints Arr
Switch Disconnect Endpoints Forced Arr
Switch Connect Route
Switch Disconnect Route
Switch Disconnect Route Forced
Switch Connect Routes
Switch Disconnect Routes
Switch Disconnect Routes Forced
Switch Connect Relay Group
Switch Disconnect Relay Group
Switch Disconnect All Routes
Switch Disconnect All
Switch Check Route Available
Switch Check Sequence Available
Switch Connect Sequence
Switch Disconnect Sequence
Switch View Subunit
Switch Get Routing Cache Active
Switch Get Routing Cache Started
Switch Start Routing Cache
Switch Stop And Clear Routing Cache
Switch Stop And Keep Routing Cache
Set Resistance
Get Resistance
App Show Main Window
App Close Main Window
App Set Main Window Minimized
App Set Main Window Maximized
App Set Main Window Normal
Get Error Message
Get Last Error Code
Get Error Code Name
Get Last Error Details
SPM Get Version
Switch_GetDeviceEndpointNamesBufferSize
Switch_GetDeviceEndpoints
Switch_DisconnectAllDeviceEndpoints
Switch_CanConnectDeviceEndpoints
Switch_ConnectDeviceEndpoints
Switch_DisconnectDeviceEndpoints
Switch_SetDeviceConnectionPath
ProtectionResetEnable
GetProtectionResetEnabled
GetProtectionResetTimeout
ProtectionResetDisable
________________________________________________________________________________
The following functions are in function class order.
________________________________________________________________________________
SPM_StartSequence
int SPM_StartSequence (int disableNotification, char *projectFilePath, int reset, int bootOnline, int showEndMessage, int openCloseIDE, int reLoadProject);
Purpose
This function
- starts the SPM Server and Client
- opens a given project
- opens the IDE (if selected)
- boots the system (online/offline)
- performs a full reset (if reset is selected or the project is reloaded)
- enables/disables system notifications
________________________________________________________________________________
SPM_StopSequence
int SPM_StopSequence (int reset, int stopServer);
Purpose
This function
- performs a full reset (if selected)
- stops the SPM Client
- stops the SPM Server (if selected) - project gets unloaded
-"System stopped" info appears (if Show End Message is on)
This method should be used for a system shut down.
____________________________________________________
SPM_Server_AddStartArg
int SPM_Server_AddStartArg (char *startArg);
Purpose
Adds a start argument to configure the SPM Interop Server when starting.
Parameter List
startArg
Variable Type char *
The start argument.
Format is "argName" or "argName=value".
Valid arguments:
/trace
/disableNotif[ication]
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Server_ClearStartArgs
int SPM_Server_ClearStartArgs (void);
Purpose
Clears the previously added argument which configures the SPM Interop
Server when starting.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Server_Start
int SPM_Server_Start (void);
Purpose
Starts the SPM Server in the given functional mode.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Server_Stop
int SPM_Server_Stop (void);
Purpose
Stops the SPM Server if no other clients are connected.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Server_IsRunning
int SPM_Server_IsRunning (int *isRunning);
Purpose
Returns whether the SPM Interop Server is running.
Parameter List
isRunning
Variable Type int (passed by reference)
Returns true if server is running, else false.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Client_Connect
int SPM_Client_Connect (void);
Purpose
Connects to the SPM Interop Server.
This has to be done first to be able to send instructions to the server
through other interop API functions.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Client_IsConnected
int SPM_Client_IsConnected (int *isConnected);
Purpose
Returns whether this Client is connected to the SPM Interop Server.
Parameter List
isConnected
Variable Type int (passed by reference)
Returns true if the client is connected else false.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Client_Disconnect
int SPM_Client_Disconnect (void);
Purpose
Disconnects this Client from the SPM Interop Server.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Project_Open
int SPM_Project_Open (char *projectFilePath);
Purpose
Opens a SPM Project from the specified file path.
Parameter List
projectFilePath
Variable Type char *
The project file path.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Project_IsOpen
int SPM_Project_IsOpen (int *isOpen);
Purpose
Returns the "project is open" status.
Parameter List
isOpen
Variable Type int (passed by reference)
Returns true if a project is open, else false.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Project_GetOpenFilePathBufferSize
int SPM_Project_GetOpenFilePathBufferSize (int *bufferSize);
Purpose
Gets the length of the opened project file path string.
Parameter List
bufferSize
Variable Type int (passed by reference)
Returns the required buffer size to get the open project file with
function SPM_Project_GetOpenFilePath().
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Project_GetOpenFilePath
int SPM_Project_GetOpenFilePath (char *projectFilePath);
Purpose
Gets the file path and name of the currently open project.
Parameter List
projectFilePath
Variable Type char (passed by reference)
Returns the project's file path.
The caller has to provide a properly sized buffer.
Use SPM_Project_GetOpenFilePathBufferSize() to get the number of
bytes to allocate the buffer.
If the buffer is to small an error will be returned.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Project_Close
int SPM_Project_Close (void);
Purpose
Closes the currently open project.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_BootOffline
int SPM_System_BootOffline (void);
Purpose
Boots the System into Offline State. This means the Device Drivers are
not initialized and thus no hardware is required.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_BootOnline
int SPM_System_BootOnline (void);
Purpose
Boots the System into Driver Online State. This initializes all Device
Drivers.
This requires the System Hardware to be connected to the computer and be
powered on.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_IsBootedOffline
int SPM_System_IsBootedOffline (int *isBootedOffline);
Purpose
Determines whether the Test System is booted in Driver Offline State.
Parameter List
isBootedOffline
Variable Type int (passed by reference)
Returns TRUE if the system is booted offline, else FALSE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_IsBootedOnline
int SPM_System_IsBootedOnline (int *isBootedOnline);
Purpose
Determines whether the Test System is booted in Driver Online State.
Parameter List
isBootedOnline
Variable Type int (passed by reference)
Returns TRUE if the system is booted online, else FALSE.
It returns FALSE also if the system is not booted at all.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_IsBooted
int SPM_System_IsBooted (int *isBooted);
Purpose
Determines whether the System is booted.
Parameter List
isBooted
Variable Type int (passed by reference)
Returns TRUE if the System is booted in any state, else FALSE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_ResetFull
int SPM_System_ResetFull (void);
Purpose
Resets all instruments to initial state.
If the System is booted in Driver Online State it will be applied to the
hardware.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_Shutdown
int SPM_System_Shutdown (void);
Purpose
Shuts down the system.
If the System is booted in Driver Online State it will be applied to the hardware.
Return Value
TPI_SUCCESS if successfully completed; TPI_ERR error code otherwise.
Use TPI_GetErrorMessage() and TPI_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_DisableErrorOutput
int SPM_System_DisableErrorOutput (void);
Purpose
Disables all error messages sent to the IDE.
Automatically restores error messaging after a Full Reset.
Function SPM_System_RestoreErrorOutput() does the same.
Return Value
TPI_SUCCESS if successfully completed; TPI_ERR error code otherwise.
Use TPI_GetErrorMessage() and TPI_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_System_RestoreErrorOutput
int SPM_System_RestoreErrorOutput (void);
Purpose
Restores previously disabled error messages sent to the IDE.
Return Value
TPI_SUCCESS if successfully completed; TPI_ERR error code otherwise.
Use TPI_GetErrorMessage() and TPI_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetEndpointNamesBufferSize
int SPM_Switch_Setup_GetEndpointNamesBufferSize (int *bufSize);
Purpose
Returns the buffer size of all endpoint names.
Parameter List
bufSize
Variable Type int (passed by reference)
Returns the buffer size in byte required to receive all endpoint
names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetEndpointNames
int SPM_Switch_Setup_GetEndpointNames (char **endpointNames,
int *numOfEndpoints);
Purpose
Returns the configured endpoint names of the currently active project.
Parameter List
endpointNames
Variable Type char * (passed by reference)
The buffer to receive the endpoint names.
Use SPM_Switch_Setup_GetEndpointNamesBufferSize to get the buffer
size for malloc.
numOfEndpoints
Variable Type int (passed by reference)
Returns the number of items in the endpoint name list.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetRouteNamesBufferSize
int SPM_Switch_Setup_GetRouteNamesBufferSize (int *bufSize);
Purpose
Returns the buffer size for all route names.
Parameter List
bufSize
Variable Type int (passed by reference)
Returns the buffer size in byte required for receiving all route
names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetRouteNames
int SPM_Switch_Setup_GetRouteNames (char **routeNames,
int *numOfRoutes);
Purpose
Returns the configured route names and route group names of the currently
active project.
Parameter List
routeNames
Variable Type char * (passed by reference)
The buffer to receive the route names.
Use SPM_Switch_Setup_GetRouteNamesBufferSize to get the buffer size
for malloc.
numOfRoutes
Variable Type int (passed by reference)
Returns the number of items in the route name list.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetRelayGroupNamesBufferSize
int SPM_Switch_Setup_GetRelayGroupNamesBufferSize (int *bufSize);
Purpose
Returns the buffer size of all relay group names.
Parameter List
bufSize
Variable Type int (passed by reference)
Returns the buffer size in byte required to receive all relay group
names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetRelayGroupNames
int SPM_Switch_Setup_GetRelayGroupNames (char **relayGroupNames, int *numOfRelayGroups);
Purpose
Returns the configured relay group names of the currently active project.
Parameter List
relayGroupNames
Variable Type char * (passed by reference)
The buffer to receive all relay group names.
Use SPM_Switch_Setup_GetRelayGroupNamesBufferSize to get the buffer
size for malloc.
numOfRelayGroups
Variable Type int (passed by reference)
Returns the number of items in the relay group name list.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetSequenceNamesBufferSize
int SPM_Switch_Setup_GetSequenceNamesBufferSize (int *bufSize);
Purpose
Returns the buffer size of all sequence names.
Parameter List
bufSize
Variable Type int (passed by reference)
Returns the buffer size in byte required to receive all sequence
names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetSequenceNames
int SPM_Switch_Setup_GetSequenceNames (char **sequenceNames, int *numOfSequences);
Purpose
Returns the configured sequences of the currently active project.
Parameter List
sequenceNames
Variable Type char * (passed by reference)
The buffer to receive all sequence names.
Use SPM_Switch_Setup_GetSeqeunceNamesBufferSize to get the buffer size for malloc.
numOfSequences
Variable Type int (passed by reference)
Returns the number of items in the sequence name list.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_GetLogicalPinFromEndpointName
int SPM_Switch_Setup_GetLogicalPinFromEndpointName (char *endpointName, char logicalPin[], int size);
Purpose
Returns the Logical Pin from the given Endpoint Name.
Parameter List
endpointName
Variable Type char *
The Endpoint Name of the returned Logical Pin.
logicalPin
Variable Type char []
The Logical Pin of the given Endpoint Name.
size
Variable Type int
The required buffer size for the returned Logical Pin string.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
_______________________________________________________________________________
SPM_Switch_Setup_GetEndpointNameOfLogicalPin
int SPM_Switch_Setup_GetEndpointNameOfLogicalPin (char *logicalPin, char endpointName[], int size);
Purpose
Returns the Endpoint Name from the given Logical Pin.
Parameter List
logicalPin
Variable Type char *
The Logical Pin of the returned Endpoint Name.
endpointName
Variable Type char []
The logical pin name of the given endpoint name.
size
Variable Type int
The required buffer size for the returned Endpoint Name string.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_ConfigureRouteGroupFromConnectedEndpoints
int SPM_Switch_Setup_ConfigureRouteGroupFromConnectedEndpoints (char *routeGroupName);
Purpose
Creates a route group from previously connected endpoints.
To use the new route group an APPLY has to be performed (either through the IDE or the API function call).
Parameter List
routeGroupName
Variable Type char *
Name of the route group to be created.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_CheckRouteExists
int SPM_Switch_Setup_CheckRouteExists (char *routeName, int *isRouteExisting);
Purpose
Checks the existence of the given route or route group.
Parameter List
routeName
Variable Type char *
Name of the route or route group to be checked for existence.
isRouteExisting
Variable Type int (passed by reference)
Returns 1 if the route or route group is existing else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_DeleteRoute
int SPM_Switch_Setup_DeleteRoute (char *routeName);
Purpose
Deletes an existing route or route group.
To commit the delete an APPLY has to be performed (either through the IDE or the API function call).
Parameter List
routeName char *
Name of the route or route group to be deleted.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_ConfigureSequenceFromConnectedEndpoints
int SPM_Switch_Setup_ConfigureSequenceFromConnectedEndpoints (char *sequenceName);
Purpose
Creates a sequence from previously connected endpoints.
To use the new sequence an APPLY has to be performed (either through the
IDE or the API function call).
Parameter List
sequenceName
Variable Type char *
Name of the sequence to be created.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_CheckSequenceExists
int SPM_Switch_Setup_CheckSequenceExists (char *sequenceName, int *exists);
Purpose
Checks the existence of the given sequence.
Parameter List
sequenceName
Variable Type char *
Name of sequence to be checked for existence.
exists
Variable Type int (passed by reference)
Returns 1 if the sequence is existing else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_Setup_DeleteSequence
int SPM_Switch_Setup_DeleteSequence (char *sequenceName);
Purpose
Deletes an existing sequence.
To commit the delete an APPLY has to be performed (either through the IDE
or the API function call).
Parameter List
sequenceName
Variable Type char *
Name of the sequence to be deleted.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
_______________________________________________________________________________
SPM_Switch_Setup_ApplySwitchingConfig
int SPM_Switch_Setup_ApplySwitchingConfig (void);
Purpose
Applies any switching configuration.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_SetShortCircuitDetection
int SPM_Switch_SetShortCircuitDetection (int enable);
Purpose
Enable or disable Short Circuit Detection for Signal Routing. This is
valid for static and auto-routed signals.
Enable only possible if the Short Detection Mode is set to "Manually Turn
On/Off".
Settings under SPM IDE \Tools\Options\Measurement Center\Switching
Parameter List
enable
Variable Type int
Enables or disables Short Circuit Detection.
Enable only possible if the Short Detection Mode is set to "Manually
Turn On/Off".
Settings under SPM IDE \Tools\Options\Measurement Center\Switching
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetShortCircuitDetection
int SPM_Switch_GetShortCircuitDetection (int *isEnabled);
Purpose
Returns the enable status of the Short Circuit Detection for Signal
Routing.
Parameter List
isEnabled
Variable Type int (passed by reference)
Returns TRUE if detection is enabled, else FALSE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
_________________________________________________________________________________
SPM_Switch_SwitchToInitialState
int SPM_Switch_SwitchToInitialState (void);
Purpose
Sets all relays to its initial, in-active state.
Similar to system reset full, but faster.
(A normally closed relay will be inactive and the contact closed=connected)
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
_________________________________________________________________________________
SPM_Switch_CheckHasInitialSwitchingState
int SPM_Switch_CheckHasInitialSwitchingState (int *initialState);
Purpose
Returns whether the system is in initial state or not.
Parameter List
initialState
Variable Type int (passed by reference)
Returns 1 if the system is in initial switching state.
Returns 0 if the system is not in initial switching state.
An initial switching state occurs after a reset or a disconnect all.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectEndpoints
int SPM_Switch_ConnectEndpoints (char *startingEndpointName, char *targetEndpointName_s);
Purpose
Directly connects a signal path between the starting endpoint and the
multiple target endpoints. The SPM Auto Router will connect the starting
endpoint one by one with the given target endpoints while overlapping all
of them in an optimal way.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName_s
Variable Type char *
1 to n endpoints, comma separated,
e.g. "EP1" or "EP1,EP2,EP3".
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectEndpointsCsv
int SPM_Switch_ConnectEndpointsCsv (char *startingEndpointName, char *targetEndpointName_s);
Purpose
Directly connects a signal path between the starting endpoint and the
multiple target endpoints. The SPM Auto Router will connect the starting
endpoint one by one with the given target endpoints while overlapping all
of them in an optimal way.
Legacy function, use SPM_Switch_ConnectEndpoints() instead.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName_s
Variable Type char *
1 to n endpoints, comma separated,
e.g. "EP1" or "EP1,EP2,EP3".
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectEndpoints
int SPM_Switch_DisconnectEndpoints (char *startingEndpointName, char *targetEndpointName_s);
Purpose
Directly disconnects and removes a signal path between the specified endpoints.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName_s
Variable Type char *
Target endpoint(s) to be disconnected from starting endpoint.
Comma separated values, e.g. "EP1" or "EP1,EP2,EP3".
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectEndpointsForced
int SPM_Switch_DisconnectEndpointsForced (char *startingEndpointName, char *targetEndpointName_s);
Purpose
Directly disconnects and removes a signal path between the specified
endpoints.
This disconnect forces all connections to be released regardless a
missing prior connect. Takes effect on configurations where normally
closed contacts are involved.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName_s
Variable Type char *
Target endpoint(s) to be disconnected from starting endpoint.
Comma separated values (CSV)
e.g. "EP1" or "EP1,EP2,EP3".
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectEndpointsCsv
int SPM_Switch_DisconnectEndpointsCsv (char *startingEndpointName, char *targetEndpointName_s);
Purpose
Directly disconnects and removes a signal path between the specified endpoints.
Legacy function, use SPM_Switch_DisconnectEndpoints() instead.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName_s
Variable Type char *
Target endpoint(s) to be disconnected from starting endpoint.
Comma separated values, e.g. "EP1" or "EP1,EP2,EP3".
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectEndpointsArr
int SPM_Switch_ConnectEndpointsArr (char *startingEndpointName, char **arrayOfTargetEndpointNames, int numOfTargetEndpoints);
Purpose
Directly connects a signal path between the starting endpoint and multiple target endpoints represented in an array.
The SPM Auto Router will connect the starting endpoint one by one with the given target endpoints while overlapping
all of them in an optimal way. Target Endpoint names are listed in an array.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
arrayOfTargetEndpointNames
Variable Type char **
1 to n endpoints,
each index holds a separate endpoint string, string length must be >0 and the endpoint must be valid.
numOfTargetEndpoints
Variable Type int
Number of target endpoints = number of array indexes, 0-based.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectEndpointsArr
int SPM_Switch_DisconnectEndpointsArr (char *startingEndpointName, char **arrayOfTargetEndpointNames, int numOfTargetEndpoints);
Purpose
Directly disconnects and removes a signal path between the specified
starting endpoint and the target endpoints represented in an array.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
arrayOfTargetEndpointNames
Variable Type char **
1 to n endpoints,
each index holds a separate endpoint string, string length must be >0 and the endpoint must be valid.
numOfTargetEndpoints
Variable Type int
Number endpoints in an array = number of array indexes, 0-based.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectEndpointsForcedArr
int SPM_Switch_DisconnectEndpointsForcedArr (char *startingEndpointName,
char **arrayOfTargetEndpointNames, int numOfTargetEndpoints);
Purpose
Directly disconnects and removes a signal path between the specified
starting endpoint and the target endpoints represented in an array.
This disconnect forces all connections to be released regardless a
missing prior connect. Takes effect on configurations where normally
closed contacts are involved.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
arrayOfTargetEndpointNames
Variable Type char **
1 to n endpoints,
each index holds a separate endpoint string,
string length must be >0 and the endpoint must be valid.
numOfTargetEndpoints
Variable Type int
Number endpoints in an array = number of array indxes, 0-based.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectRoute
int SPM_Switch_ConnectRoute (char *routeName);
Purpose
Connects the specified signal route or a group of routes.
Parameter List
routeName
Variable Type char *
Name of the route.
This can be a route or route group configured in the System Setup.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectRoute
int SPM_Switch_DisconnectRoute (char *routeName);
Purpose
Disconnects the specified signal route or a group of routes.
Parameter List
routeName
Variable Type char *
Name of the route to disconnect.
This can be a route or route group configured in the System Setup.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
___________________________________________________
SPM_Switch_DisconnectRouteForced
int SPM_Switch_DisconnectRouteForced (char *routeName);
Purpose
Disconnects the specified signal route or a group of routes.
This disconnect forces all connections to be released regardless a
missing prior connect. Takes effect on configurations where normally
closed contacts are involved.
Parameter List
routeName
Variable Type char *
Name of the route to disconnect.
This can be a route or route group configured in the System Setup.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
___________________________________________________
SPM_Switch_ConnectRoutes
int SPM_Switch_ConnectRoutes (char **routeNames, int numOfRouteNames);
Purpose
Connects all given signal routes in the list. The routes will be
connected one by one with conflict checking. Routes can not overlap or
lead to the same endpoints.
Parameter List
routeNames
Variable Type char **
List (array) of route names.
This can be a route or route group configured in the System Setup.
numOfRouteNames
Variable Type int
Number of route names in the array.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectRoutes
int SPM_Switch_DisconnectRoutes (char **routeNames, int numOfRouteNames);
Purpose
Disconnects all specified signal routes in the list.
Parameter List
routeNames
Variable Type char **
List of route names. This can be a route or route group configured in
the System Setup.
numOfRouteNames
Variable Type int
Number of route names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectRoutesForced
int SPM_Switch_DisconnectRoutesForced (char **routeNames, int numOfRouteNames);
Purpose
Disconnects all specified signal routes in the list.
This disconnect forces all connections to be released regardless a
missing prior connect. Takes effect on configurations where normally
closed contacts are involved.
Parameter List
routeNames
Variable Type char **
List of route names. This can be a route or route group configured in
the System Setup.
numOfRouteNames
Variable Type int
Number of route names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectRelayGroup
int SPM_Switch_ConnectRelayGroup (char *relayGroup);
Purpose
Connects a group of relays grouped in the specified relay group.
The relay group has to be configured in the currently active System Setup.
The Switching System will switch the relays without considering the currently connected
signal routes, so this could interfere existing signals.
Parameter List
relayGroup
Variable Type char *
Name of the relay group.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectRelayGroup
int SPM_Switch_DisconnectRelayGroup (char *relayGroup);
Purpose
Disconnects all relays in the specified relay group.
Parameter List
relayGroup
Variable Type char *
Name of the relay group.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectAllRoutes
int SPM_Switch_DisconnectAllRoutes (void);
Purpose
Disconnects all existing routes.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectAll
int SPM_Switch_DisconnectAll (void);
Purpose
Disconnects all existing routes and all relay groups.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_CheckRouteAvailable
int SPM_Switch_CheckRouteAvailable (char *routeName, int *available);
Purpose
Checks the availability of the given route or route group.
A route or route group can be deleted in the configuration, but is still
available in memory (in case an apply has not been performed).
Parameter List
routeName
Variable Type char *
Name of the route or route group to be checked for availability.
available
Variable Type int (passed by reference)
Returns 1 if the route is available else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_CheckSequenceAvailable
int SPM_Switch_CheckSequenceAvailable (char *sequenceName, int *available);
Purpose
Checks the availability of the given sequence.
A sequence can be deleted in the configuration, but is still available in
memory (in case an apply has not been performed).
Parameter List
sequenceName
Variable Type char *
Name of the sequence to be checked for availability.
available
Variable Type int (passed by reference)
Returns 1 if the sequence is available else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectSequence
int SPM_Switch_ConnectSequence (char *sequenceName);
Purpose
Connects the previous defined routes listed in the sequence table (refer
to the IDE under Sequencing).
Parameter List
sequenceName
Variable Type char *
Name of the existing sequence which connects the previous defined
routes.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectSequence
int SPM_Switch_DisconnectSequence (char *sequenceName);
Purpose
Disconnects the previous defined routes listed in the sequence table
(refer to the IDE under Sequences).
Parameter List
sequenceName
Variable Type char *
Name of the existing sequence which connects the previous defined
routes.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ViewSubunit
int SPM_Switch_ViewSubunit (char *resourceID, int subunitNumber,
int patternArray[], int *arraySize);
Purpose
Returns the adressed module's subUnit overall switch pattern utilising a
one-dimensional data array of 32-bit integer. In the array each bit represents
the state of one output channel. 0 for OFF, 1 for ON.
The least significant bit of the base element of the array corresponds to channel 1.
Parameter List
resourceID
Variable Type char *
Resource ID defined on the SPM modules configuration page.
subunitNumber
Variable Type int
Module's subunit from where the pattern is returned.
Valid Numbers: 1 up to n, where n is defined by the used module.
patternArray
Variable Type int []
Returns the module's subunit switch pattern.
Notice: The value returned is the value set in SPM not the real value
read back from the card.
arraySize
Variable Type int (passed by reference)
Returns the actual dimensional size of the array where the pattern is
returned.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetRoutesStatusInfoAll
int SPM_Switch_GetRouteStatusInfoAll (unsigned int includeOptions,
unsigned int displayOptions,
char routeStatusBuffer[],
int bufferSize);
Purpose
Returns the current status of all energized relays of all connected routes.
Parameter List
includeOptions
Variable Type unsigned int
Options to include wires into the relay status info.
0 = none
1 = include wires
displayOptions
Variable Type unsigned int
Options to display endpoint names and/user labels within the relay
status info.
0 = none
1 = endpoint names
2 = user labels
3 = endpoint names and user labels
routeStatusBuffer
Variable Type char []
The buffer to receive he current status of all energized relays of all connected routes.
bufferSize
Variable Type int
Size of the status buffer to be allocated.
In case the buffer will be too small the function returns error code = SPM_ERR_MEM__BUFFER_TO_SMALL.
Use SPM_GetLastRequiredBufferSize() as a consecutive command to return the required buffer size.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
______________________________________________________________________________
SPM_Switch_GetRelayGroupStatusInfoAll
int SPM_Switch_GetRelayGroupStatusInfoAll (unsigned int includeOptions, char statusBuffer[], int bufferSize);
Purpose
Returns the current status of all energized relays of all use relay groups.
Parameter List
includeOptions
Variable Type unsigned int
Options to include information into the status info about wires, endpoint names, or labels.
statusBuffer
Variable Type char []
The buffer to receive he current status of all energized relays of all connected relay groups.
bufferSize
Variable Type int
Size of the status buffer to be allocated.
In case the buffer will be too small the function returns error code = SPM_ERR_MEM__BUFFER_TO_SMALL.
Use SPM_GetLastRequiredBufferSize() as a consecutive command to return the required buffer size.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetRouteConnectedStatus
int SPM_Switch_GetRouteConnectedStatus (char *routeName, int *connected);
Purpose
Returns the current connect status of a given route.
Parameter List
routeName
Variable Type char *
Route Name from which the connect status will be returned.
connected
Variable Type int (passed by reference)
Returns 1 if given route has been connected else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetEndpointsConnectedStatus
int SPM_Switch_GetEndpointsConnectedStatus (char *startingEndpointName, char *targetEndpointName, int *connected);
Purpose
Returns the current connect status between given endpoints.
Parameter List
startingEndpointName
Variable Type char *
The starting endpoint name.
targetEndpointName
Variable Type char *
The target endpoint name.
connected
Variable Type int (passed by reference)
Returns 1 if given endpoints have been connected else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
______________________________________________________________________________
SPM_Switch_StartRoutingCache
int SPM_Switch_StartRoutingCache (unsigned int startConditions);
Purpose
Starts the routing cache with the given start condition.
Parameter List
startConditions
Variable Type unsigned int
Start conditions for the routing cache.
0 - Require Switched to Initial State
1 - Perform Switch to Initial State
2 - Keep Existing Switching State
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetRoutingCacheActive
int SPM_Switch_GetRoutingCacheActive (int *isCacheActive);
Purpose
Returns the current cache status whether active or not.
Active=1, Not Active=0
Parameter List
isCacheActive
Variable Type int (passed by reference)
To activate it must be started at least once.
Returns 1 if the cache is active else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetRoutingCacheStarted
int SPM_Switch_GetRoutingCacheStarted (int *isCacheStarted);
Purpose
Returns whether the routing cache has started or not.
Started=1, Not Started=0.
Parameter List
isCacheStarted
Variable Type int (passed by reference)
Returns 1 if the routing cache has started else 0.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_StopAndClearRoutingCache
int SPM_Switch_StopAndClearRoutingCache (void);
Purpose
Terminates chaching and deletes all content.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_StopAndKeepRoutingCache
int SPM_Switch_StopAndKeepRoutingCache (void);
Purpose
Terminates caching, keeps content to be used on next start.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
______________________________________________________________________________
SPM_RES_SetResistance
int SPM_RES_SetResistance (char *resistorResourceID, double resistorValue);
Purpose
Sets the resistor of the given channel to the entered value.
Use SPM_RESISTANCE_OPEN to set R to +Inf.
Use SPM_RESISTANCE_SHORT or 0.0 to set R to a short condition.
Parameter List
resistorResourceID char *
Resource ID defined on the SPM modules configuration page.
resistorValue double
Enter value within the Rcard's possible range.
Use SPM_RESISTANCE_OPEN to set R to +Inf.
Use SPM_RESISTANCE_SHORT or 0.0 to set R to a short condition.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_RES_GetResistance
int SPM_RES_GetResistance (char *resistorResourceID, double *resistorValue);
Purpose
Returns the resistor value of the given channel (in Ohm).
If the resistor is set to SPM_RESISTANCE_OPEN the return value will be greater than the maximum range.
If the resistor is set to SPM_RESISTANCE_SHORT or 0.0 the return value will be 0.0 (real value of a short see the card's specification).
Notice: The value returned is the value set in SPM not the real value read back from the card.
Parameter List
resistorResourceID char *
Resource ID defined on the SPM modules configuration page.
resistorValue double *
Returns the resistor value of the given channel (in Ohm).
Notice: The value returned is the value set in SPM not the real value read back from the card.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
______________________________________________________________________________
SPM_App_CloseMainWindow
int SPM_App_CloseMainWindow (void);
Purpose
Hides the main window of the SPM IDE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_App_ShowMainWindow
int SPM_App_ShowMainWindow (void);
Purpose
Shows the main window of the SPM IDE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_App_SetMainWindowMinimized
int SPM_App_SetMainWindowMinimized (void);
Purpose
Minimizes the main window of the SPM IDE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_App_SetMainWindowMaximized
int SPM_App_SetMainWindowMaximized (void);
Purpose
Maximizes the main window of the SPM IDE.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_App_SetMainWindowNormal
int SPM_App_SetMainWindowNormal (void);
Purpose
Shows the main window of the SPM IDE.
It appears with its last normal size if it is not set to hidden.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_GetErrorMessage
char *SPM_GetErrorMessage (int errorCode);
Purpose
Gets the error description for the specified error code.
Parameter List
errorCode
Variable Type int
The error code.
Return Value
The error description.
________________________________________________________________________________
SPM_GetLastErrorCode
int SPM_GetLastErrorCode (void);
Purpose
Gets the error code of the last API call.
Return Value
The SPM_ERR error code as integer.
________________________________________________________________________________
SPM_GetErrorCodeName
char *SPM_GetErrorCodeName (int errorCode);
Purpose
Returns the name of the error code constant.
Parameter List
errorCode
Variable Type int
The error code.
Return Value
The error code text.
________________________________________________________________________________
SPM_GetLastErrorDetails
char *SPM_GetLastErrorDetails (void);
Purpose
Gets error details of the last API call, in case the function provides
more details about an erroneous condition.
Return Value
String with more details about an error.
Empty if no detail can be provided.
________________________________________________________________________________
SPM_GetVersion
int SPM_GetVersion (char *componentType, char *componentName, char *versionBuf, int bufSize);
Purpose
Returns the given component's version.
Parameter List
componentType
Variable Type char *
Available component types:
APP
INSTR
WBEXT
componentName
Variable Type char *
Available component names:
APP -> SPM
INSTR -> Pickering Modules Pack
WBEXT -> SPM SFP
versionBuf
Variable Type char *
The buffer to receive the components version.
bufSize
Variable Type int
Size of the version buffer to be allocated.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetDeviceEndpointNamesBufferSize
int SPM_Switch_GetDeviceEndpointNamesBufferSize (char *deviceName,
int *bufSize);
Purpose
Returns the buffer size for all endpoint names.
Use this function to determine the array size for
GetDeviceEndpoints().
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
bufSize
Variable Type int (passed by reference)
Returns the buffer size for all endpoint names.
4 Bytes per endpoint.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_GetDeviceEndpoints
int SPM_Switch_GetDeviceEndpoints (char *deviceName,
char **endpointNames,
int *numOfEndpoints);
Purpose
Returns all endpoint names (IVI channel names) of the given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
endpointNames
Variable Type char **
Pointer to array of endpoint names. Required size can be retreived by
calling GetDeviceEndpointNamesBufferSize().
numOfEndpoints
Variable Type int (passed by reference)
Returns the number of available endpoint names.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectAllDeviceEndpoints
int SPM_Switch_DisconnectAllDeviceEndpoints (char *deviceName);
Purpose
Disconnects all endpoints (IVI channels) of the given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_CanConnectDeviceEndpoints
int SPM_Switch_CanConnectDeviceEndpoints (char *deviceName,
char *endpoint1,
char *endpoint2,
int *pathCapability);
Purpose
Returns the path capbility of two given endpoints (IVI channels) of the
given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
endpoint1
Variable Type char *
First endpoint to retrieve the path capability.
endpoint2
Variable Type char *
Second endpoint to retrieve the path capability.
pathCapability
Variable Type int (passed by reference)
possible return values:
VAL_NONE 0
VAL_PATH_AVAILABLE 1
VAL_PATH_EXISTS 2
VAL_PATH_UNSUPPORTED 3
VAL_RSRC_IN_USE 4
VAL_SOURCE_CONFLICT 5
VAL_CHANNEL_NOT_AVAILABLE 6
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_ConnectDeviceEndpoints
int SPM_Switch_ConnectDeviceEndpoints (char *deviceName,
char *endpoint1,
char *endpoint2);
Purpose
Connects two endpoints (IVI channels) of the given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
endpoint1
Variable Type char *
First endpoint to be connected.
endpoint2
Variable Type char *
Second endpoint to be connected.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_DisconnectDeviceEndpoints
int SPM_Switch_DisconnectDeviceEndpoints (char *deviceName,
char *endpoint1,
char *endpoint2);
Purpose
Disconnects two endpoints (IVI channels) of the given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
endpoint1
Variable Type char *
First endpoint to be disconnected.
endpoint2
Variable Type char *
Second endpoint to be disconnected.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_Switch_SetDeviceConnectionPath
int SPM_Switch_SetDeviceConnectionPath (char *deviceName, char *path);
Purpose
Sets a path to be connected of the given device.
Parameter List
deviceName
Variable Type char *
The module's device name defined in the SPM project.
path
Variable Type char *
The path to be connected.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_ProtectionResetEnable
int SPM_ProtectionResetEnable (int chassisNumber, int timeoutInSeconds);
Purpose
This function enables the chassis protection reset.
A chassis reset will automatically occur after the given timeout value in
s has elapsed. All switch cards in the chassis will then be set to their
default state.
Reset does not occur if SPM_ProtectionResetDisable() will be called
before the timeout or the function is called again before the timeout.
If a protection reset has performed, this function returns
SPM_ERR_PROTECTION_RESET_PERFORMED.
To start from the beginning call SPM_ProtectionResetDisable()
and SPM_ProtectionResetEnable() again.
Parameter List
chassisNumber
Variable Type int
The chassis number the protection reset applies.
The chassis number (Unit) is shown in SPM Project under Modules.
timeoutInSeconds
Variable Type int
The time in seconds a chassis reset will occur after calling this
function.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_GetProtectionResetEnabled
int SPM_GetProtectionResetEnabled (int chassisNumber, int *enableState);
Purpose
Returns the protection reset enabled state of the given chassis.
Parameter List
chassisNumber
Variable Type int
The chassis number the protection reset applies.
The chassis number (Unit) is shown in SPM Project under Modules.
enableState
Variable Type int (passed by reference)
Possible return values:
0=disabled
1=enabled
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_GetProtectionResetTimeout
int SPM_GetProtectionResetTimeout (int chassisNumber, int *timeout);
Purpose
Returns the protection reset timeout value of the given chassis.
Parameter List
chassisNumber
Variable Type int
The chassis number the protection reset applies.
The chassis number (Unit) is shown in SPM Project under Modules.
timeout
Variable Type int (passed by reference)
Returns the protection reset timeout value in seconds - the time
after function SPM_ProtectionResetEnable() has been called a reset
will be performed.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
________________________________________________________________________________
SPM_ProtectionResetDisable
int SPM_ProtectionResetDisable (int chassisNumber);
Purpose
This function disables the prior enabled chassis protection reset.
Parameter List
chassisNumber
Variable Type int
The chassis number the protection reset applies.
The chassis number (Unit) is shown in SPM Project under Modules.
Return Value
Returns SPM_SUCCESS if successful, else SPM_ERR.
Use SPM_GetErrorMessage() and SPM_GetLastErrorDetails() to get more
information about the error.
Copyright © 2014-2024 Pickering Interfaces