Documentation Home Page ◇ RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.
RT-LAB | ORCHESTRA: Functions Reference
Page Content
- 1 RTActivatePrintBuffer
- 2 RTCheckReadyToGo
- 3 RTConnect
- 4 RTConnectInstance
- 5 RTConnectWithFile
- 6 RTDeactivatePrintBuffer
- 7 RTDefineFlagDelay
- 8 RTDisconnect
- 9 RTGetConnectionKey
- 10 RTGetErrorMessage
- 11 RTGetInfoForItem
- 12 RTGetKeyForItem
- 13 RTGetSkipWaitToGoAtConnection
- 14 RTNewConnectionKey
- 15 RTPublish
- 16 RTPublishByKey
- 17 RTPublishLock
- 18 RTPublishUnlock
- 19 RTSetConnectionKey
- 20 RTSetSkipWaitToGoAtConnection
- 21 RTSetupRefMemRemoteConnection
- 22 RTSubscribe
- 23 RTSubscribeByKey
- 24 RTSubscribeLock
- 25 RTSubscribeUnlock
- 26 RTUseFlagWithTool
- 27 RTAPIReturn_t
- 28 Elements
- 29 Enumerations and constants
The following functions are called from within a C/C++ application to interface with RT-LAB running on a target processor.
RTActivatePrintBuffer
Group | Orchestra | ||
---|---|---|---|
Description | This function is obsolete. Activates the print buffer used to print data using the OpalPrint() function. This function MUST be called before calling OpalPrint(). | ||
Synopsis | RTAPIReturn_t RTActivatePrintBuffer(void); | ||
Input | None | ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTDeactivatePrintBuffer | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTCheckReadyToGo
Group | Orchestra | ||
---|---|---|---|
Description | Verify the ready to go condition. Connection key should be set before invoking this function. | ||
Synopsis | RTAPIReturn_t RTCheckReadyToGo(void); | ||
Input | None | ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTGetSkipWaitToGoAtConnection, RTSetSkipWaitToGoAtConnection | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTConnect
Group | Orchestra | ||
---|---|---|---|
Description | Attaches an External Component to the memory segment corresponding to a domain. If the connection fails, the calling process goes to sleep and attempts to connect repeatedly until the timeout delay expires. To use ethernet communication, the RTConnectWithFile function must be used. | ||
Synopsis | RTAPIReturn_t RTConnect(const char *domainName, unsigned int timeout); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTConnectInstance, RTConnectWithFile, RTDisconnect | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTConnectInstance
Group | Orchestra | ||
---|---|---|---|
Description | Attaches an External Component to the memory segment corresponding to a domain and an instance id. If the connection fails, the calling process goes to sleep and attempts to connect repeatedly until the timeout delay expires. | ||
Synopsis | RTAPIReturn_t RTConnectIntance(const char *domainName, unsigned int timeout, const char *instanceID); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTConnect, RTConnectWithFile, RTDisconnect | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTConnectWithFile
Group | Orchestra | ||
---|---|---|---|
Description | Attaches an External Component to the memory segment corresponding to a domain. If the connection fails, the calling process goes to sleep and attempts to connect repeatedly until the timeout delay expires. | ||
Synopsis | RTAPIReturn_t RTConnectWithFile(const char *xmlFile, const char *domainName, unsigned int timeout); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTConnect, RTConnectInstance, RTDisconnect | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTDeactivatePrintBuffer
Group | Orchestra | ||
---|---|---|---|
Description | This function is obsolete Deactivates the print buffer used to print data using the OpalPrint() function. | ||
Synopsis | RTAPIReturn_t RTDeactivatePrintBuffer(void); | ||
Input | None | ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTActivatePrintBuffer | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTDefineFlagDelay
Group | Orchestra | ||
---|---|---|---|
Description | Defines the delay to wait when using flag synchronization (XHP). It calls the system function 'usleep' and frees the CPU. | ||
Synopsis | RTAPIReturn_t RTDefineFlagDelay(unsigned int usec); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTUseFlagWithTool | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTDisconnect
Group | Orchestra | ||
---|---|---|---|
Description | Detaches the current process from the shared memory segment corresponding to a domain. | ||
Synopsis | RTAPIReturn_t RTDisconnect(void); | ||
Input | None | ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTConnect, RTConnectInstance, RTConnectWithFile | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTGetConnectionKey
Group | Orchestra | ||
---|---|---|---|
Description | Gets the current connection key. | ||
Synopsis | RTAPIReturn_t RTGetConnectionKey(unsigned int *key); | ||
Input | None | ||
Output |
| ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTNewConnectionKey, RTSetConnectionKey | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTGetErrorMessage
Group | Orchestra | ||
---|---|---|---|
Description | Retrieves the text description of an RTAPI error. | ||
Synopsis | const char* RTGetErrorMessage(RTAPIReturn_t returnCode); | ||
Input |
| ||
Output | None | ||
Return Value | A pointer to a const string that contains the text description of the error. | ||
Example | None | ||
Related Items | RTAPIReturn_t | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTGetInfoForItem
Group | Orchestra | ||
---|---|---|---|
Description | Retrieves data item information from a locally kept offset table. This item must exist in the DDF read by an RT-LAB subsystem. | ||
Synopsis | RTAPIReturn_t RTGetInfoForItem(const char *itemName, size_t*pTypeSize, unsigned short *pLength); | ||
Input |
| ||
Output |
| ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTGetKeyForItem | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTGetKeyForItem
Group | Orchestra | ||
---|---|---|---|
Description | Retrieves the index of a data item in a locally kept offset table. This item name must exist in the DDF read by an RT-LAB subsystem. The index is used to speed up data access. | ||
Synopsis | RTAPIReturn_t RTGetKeyForItem(const char *itemName, unsigned short *pKey); | ||
Input |
| ||
Output |
| ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTPublishByKey, RTSubscribeByKey | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTGetSkipWaitToGoAtConnection
Group | Orchestra | ||
---|---|---|---|
Description | Retrieves the current WaitToGo setting of the model. Non-zero value: ignore the WaitToGo during the connection step. Zero value: performs the WaitToGo during the connection step. | ||
Synopsis | RTAPIReturn_t RTGetSkipWaitToGoAtConnection(unsigned int *flag); | ||
Input | None | ||
Output |
| ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTSetSkipWaitToGoAtConnection | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTNewConnectionKey
Group | Orchestra | ||
---|---|---|---|
Description | Creates a new connection key. A connection key identifies a connection between a specific combo of Orchestra’s framework and client. This function must be called before any configuration function like RTSetupRefMemRemoteConnection and before RTConnect. | ||
Synopsis | RTAPIReturn_t RTNewConnectionKey(unsigned int *key); | ||
Input | None | ||
Output |
| ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTSetConnectionKey, RTGetConnectionKey | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTPublish
Group | Orchestra | ||
---|---|---|---|
Description | Writes data to the shared memory segment attached to the current process. To ensure proper synchronization between a publisher and a subscriber exchanging data through a domain, a call to RTPublish() MUST appear between a call to RTPublishLock() and a call to RTPublishUnlock(). | ||
Synopsis | RTAPIReturn_t RTPublish(unsigned int num, ...); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | RTPublish(1, "item01", &value01); | ||
Related Items | RTSubscribe, RTPublishLock, RTPublishUnlock | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|
| |
Header File | RTAPI.h | RTAPI.h |
RTPublishByKey
Group | Orchestra | ||
---|---|---|---|
Description | Writes data to the shared memory segment attached to the current process. The key corresponding to the item of interest is obtained by calling RTGetKeyForItem(). | ||
Synopsis | RTAPIReturn_t RTPublishByKey(unsigned short key, void *value); | ||
Input |
| ||
Output | None | ||
Return Value | See RTAPIReturn_t error code | ||
Example | None | ||
Related Items | RTGetKeyForItem, RTPublishLock, RTPublishUnlock | ||
Library and Header |
| Windows | OPAL-RTLinux |
Static Library | - | - | |
Dynamic Library |
|