Here are the functions available depending on RT-LAB’s state, Please note that certain functions are only available when RT-LAB is in a specific state.
API states
Disconnected
This is the initial state of the API. In this state, you can get the list of active projects and either connect to one or create a new project instance.
- Connect (deprecated)
- ConnectByName (deprecated)
- GetActiveModels (deprecated)
- SetCurrentModel (deprecated)
Connected
Once the API is connected, you can modify the model’s settings.
- Disconnect (deprecated)
Model states
Unloaded
In this state, the model could be configured to prepare the simulation.
- AddExtraFile
- Load
- RemoveExtraFile
- SetNodeCpu
- SetNodeMapping
- SetNodeXHP
- SetSimulationMode
- SetTargetPlatform
- StartCompile
Compiling
In this state, settings cannot be modified.
- AbortCompile
- DisplayInformation
Loaded
When the model’s executable is started on a target, the model’s state becomes loaded. In this state, parameters and signals could be changed on the fly. Data acquisition could be performed for real-time or offline analysis.
Execute
- GetAcqGroupSyncSignals
- GetAcqTrigger
- GetBlob
- GetControlSignals
- GetParametersByName
- GetSignalsByName
- GetValueByAlias
- LoadParameters
- Pause
- Reset
- SendBlob
- SetAcqTrigger
- SetControlSignals
- SetParameters
- SetParametersByName
- SetSignalsByName
- SetValueByAlias
- SingleStep
- Snapshot
Available at any model state
These functions could be called anytime when the API is connected to a model.
- Command
- GetAttributes
- GetChildren
- GetDefaultAttributes
- SetAttributes
- RestoreAttributes
- CreateAlias
- DeleteConnHandle
- ExecuteConsole
- ExecuteMatlabCmd
- FreeMemory
- GetAcqBlockLastVal
- GetAcqSampleTime
- GetAcquisitionControl
- GetAliasDescription
- GetBlobsControl
- GetConfigurationControl
- GetConnHandle
- GetControlSignalsDescription
- GetCurrentModel
- GetExtraFiles
- GetLastErrMsg
- GetModelState
- GetMonitoringControl
- GetNodeCpu
- GetNodeXHP
- GetNumAcqGroup
- GetNumSignalsForGroup
- GetParameterControl
- GetParametersDescription
- GetPauseTime
- GetRtlabVersion
- GetSignalControl
- GetSignalsDescription
- GetPhysNodeList
- GetStopTime
- GetSubsystemList
- GetSystemControl
- GetTargetFile
- GetTargetNodeSystemInfo
- GetTargetPlatform
- GetTimeInfo
- OpalIsOriginalModelOpen
- LoadAlias
- LoadAliasDescription
- LoadConsole
- LoadOriginalModel
- LoadParametersDescription
- MacroGetOptions
- MacroGetStatus
- MacroPlay
- MacroRecord
- MacroSetOptions
- MacroStop
- NewConnHandle
- PauseConsole
- Ping
- PutTargetFile
- RegisterDisplay
- ReleaseFunctionControl
- RemoveAlias
- RenameAlias
- ResetConsole
- ResetOriginalModel
- SaveAlias
- SaveParameters
- SetAcqBlockLastVal
- SetAcqWriteFile
- SetConnHandle
- SetDecimationFactor
- SetFillDecimation
- SetMatlabRelease
- SetNotificationCallback
- SetNumberValues
- SetPauseTime
- SetTimeFactor
- StartExecutable
- StopConsole
- StopExecutable
- SetStopTime
- TakeFunctionControl
- WaitExecutable
Groupings
The functions are divided into several types. These types refer to the order in which you interact with the model.
The available types are:
- Model Selection - enables you to select current model
- Model Preparation - enables you to prepare the model before execution
- Model Execution - enables you to modify the model execution flow
- Model Interaction - enables you to modify the model during execution
- Model Configuration - enables you to modify the RT-LAB configuration
- Utilities - enables you to access utilities functions
Generic
- Command
- GetAttributes
- GetChildren
- GetDefaultAttributes
- SetAttributes
- RestoreAttributes
Model Selection
- Connect
- ConnectByName
- DeleteConnHandle
- Disconnect
- GetActiveModels
- GetConnHandle
- GetCurrentModel
- NewConnHandle
- SetConnHandle
- SetCurrentModel
Model Preparation
- AbortCompile
- AddExtraFile
- GetExtraFiles
- GetNodeXHP
- GetPhysicalNodeList
- GetSubsystemList
- GetTargetPlatform
- RemoveExtraFile
- SetNodeCpu
- SetNodeMapping
- SetNodeXHP
- SetSimulationMode
- SetTargetPlatform
- StartCompile
Model Execution
- Execute
- GetModelState
- GetPauseTime
- GetStopTime
- Load
- Pause
- Reset
- SetPauseTime
- SetStopTime
- SetTimeFactor
- SingleStep
Model Interaction
The functions of this type can be further categorized as follows:
- alias
- blobs
- console
- monitoring
- original model
- parameters
- signals
Alias
These functions manage aliases.
- CreateAlias
- GetAliasDescription
- GetValueByAlias
- LoadAlias
- LoadAliasDescription
- RemoveAlias
- RenameAlias
- SaveAlias
- SetValueByAlias
Blobs
These functions manage blobs.
The blobs are used to exchange data between the RT-LAB subsystem or between the host and the target.
- GetBlob (C only)
- GetBlobsControl (C only)
- SendBlob (C only)
Console
- ExecuteConsole
- LoadConsole
- ResetConsole
- StopConsole
Monitoring
- GetMonitoringControl
- Snapshot
Original Model
- IsOriginalModelOpen
- LoadOriginalModel
- ResetOriginalModel
Parameters
- GetParameterControl
- GetParametersByName
- GetParametersDescription
- LoadParameters
- LoadParametersDescription
- SaveParameters
- SetParametersl
- SetParametersByName
Signals
These functions manage signals. Control signals are signals that are transmitted by TCPIP from the console subsystem to the computation nodes. Acquisition signals are signals that are transmitted by TCPIP from computation nodes to the console subsystem (e.g. SC_xxx). For additional information please see Acquiring and Viewing Data in the RT-LAB User’s Guide.
- GetAcqGroupSyncSignals
- GetControlSignals
- GetControlSignalsDescription
- GetSignalControl
- GetSignalsByName
- GetSignalsDescription
- SetControlSignals
Model Configuration
This type can be further categorized as follows: Acquisition and system.
Acquisition
- GetAcqBlockLastVal
- GetAcqSampleTime
- GetAcquisitionControl
- GetNumAcqGroup
- GetNumSignalsForGroup
- SetAcqBlockLastVal
- SetAcqWriteFile
- SetDecimationFactor
- SetFillDecimation
- SetNumberValues
System
- GetConfigurationControl
- GetSystemControl
- GetTimeInfo
Utilities
- DisplayInformation
- ExecuteMatlabCmd
- FreeMemory
- GetLastErrMsg
- GetRtlabVersion
- GetTargetFile
- GetTargetNodeSystemInfo
- MacroGetOptions
- MacroGetStatus
- MacroPlay
- MacroRecord
- MacroSetOptions
- MacroStop
- Ping
- PutTargetFile
- RegisterDisplay
- ReleaseFunctionControl
- SetMatlabRelease
- SetNotificationCallback
- StartExecutable
- StopExecutable
- TakeFunctionControl
- WaitExecutable