Real-Time API Revision2025.1-3
Loading...
Searching...
No Matches
RTDB Access API
Collaboration diagram for RTDB Access API:

Data Structures

struct  ItemValue
struct  ItemValueScalar
struct  ItemValueDef
struct  ItemValueDefScalar
union  RawValue
struct  ARINC429LabelProperties
struct  CANIdProperties
struct  LINIdProperties
struct  HardwareConfig
struct  EUConversion
struct  RTDBItemMeta
struct  RTDBItemData
struct  RTDBItem
struct  RTDBItemPair
struct  RTDBItemMetaPair
struct  RTDBItemValuePair
struct  RTDBItemLogging
struct  BoardUserHookMappingDefn
struct  IOSerialChannelDef
struct  AFDXSymbolDef
struct  IOAFDXMessage
struct  IONETMessage
struct  IOUDPHeader
struct  IOUDPMessage
struct  IOCIGIMessage
struct  IOFDXMessage
struct  RTMAPSProps
struct  AFDXResidentMessage
struct  RTMAPSResidentMessage
struct  NETResidentMessage
struct  UDPResidentMessage
struct  CIGIResidentMessage
struct  FDXResidentMessage
struct  IORS232Message
struct  IOFlexRayMessage
struct  IOMemoryRegion
struct  IOArionObject
struct  IORtadbMessage
struct  IOBoardDef
struct  ScriptStdIO

Macros

#define MAX_NAMESPACE   128
#define NI_BOARD_MASK   0x100

Typedefs

typedef struct ItemValue ItemValue
typedef struct ItemValueScalar ItemValueScalar
typedef struct ItemValueDef ItemValueDef
typedef struct ItemValueDefScalar ItemValueDefScalar
typedef union RawValue RawValue
typedef struct ARINC429LabelProperties ARINC429LabelProperties
typedef struct CANIdProperties CANIdProperties
typedef struct LINIdProperties LINIdProperties
typedef struct HardwareConfig HardwareConfig
typedef struct EUConversion EUConversion
typedef struct RTDBItemMeta RTDBItemMeta
typedef struct RTDBItemData RTDBItemData
typedef struct RTDBItem RTDBItem
typedef struct RTDBItemPair RTDBItemPair
typedef struct RTDBItemPairRTDBItemPairPtr
typedef struct RTDBItemMetaPair RTDBItemMetaPair
typedef struct RTDBItemValuePair RTDBItemValuePair
typedef struct RTDBItemLogging RTDBItemLogging
typedef struct BoardUserHookMappingDefn BoardUserHookMappingDefn
typedef struct IOSerialChannelDef IOSerialChannelDef
typedef struct AFDXSymbolDef AFDXSymbolDef
typedef struct IOAFDXMessage IOAFDXMessage
typedef struct IONETMessage IONETMessage
typedef struct IOUDPHeader IOUDPHeader
typedef struct IOUDPMessage IOUDPMessage
typedef struct IOCIGIMessage IOCIGIMessage
typedef struct IOFDXMessage IOFDXMessage
typedef struct RTMAPSProps RTMAPSProps
typedef struct AFDXResidentMessage AFDXResidentMessage
typedef struct RTMAPSResidentMessage RTMAPSResidentMessage
typedef struct NETResidentMessage NETResidentMessage
typedef struct UDPResidentMessage UDPResidentMessage
typedef struct CIGIResidentMessage CIGIResidentMessage
typedef struct FDXResidentMessage FDXResidentMessage
typedef struct IOAFDXVirtualLink IOAFDXVirtualLink
typedef struct IORS232Message IORS232Message
typedef struct IOFlexRayMessage IOFlexRayMessage
typedef struct IOMemoryRegion IOMemoryRegion
typedef struct IOArionObject IOArionObject
typedef struct IORtadbMessage IORtadbMessage
typedef struct IOBoardDef IOBoardDef
typedef char ItemName[MAX_TAGLEN]
typedef struct ScriptStdIO ScriptStdIO

Enumerations

enum  PointType {
  RTDBPARAMETER = SimWB_PARAMETER | SimWB_ANALOG | SimWB_DIR_INPUT , RTDBSHRDPARAMETER = SimWB_SHARED_PARAMETER | SimWB_ANALOG | SimWB_DIR_INPUT , RTDBAI = SimWB_ANALOG | SimWB_DIR_INPUT , RTDBAO = SimWB_ANALOG | SimWB_DIR_OUTPUT ,
  RTDBAIO = SimWB_ANALOG | SimWB_DIR_INOUT , RTDBDI = SimWB_BOOLEAN | SimWB_DIR_INPUT , RTDBDO = SimWB_BOOLEAN | SimWB_DIR_OUTPUT , RTDBDIO = SimWB_BOOLEAN | SimWB_DIR_INOUT ,
  RTDBSTRINGIN = SimWB_STRING | SimWB_DIR_INPUT , RTDBSTRINGOUT = SimWB_STRING | SimWB_DIR_OUTPUT , RTDBSTRINGIO = SimWB_STRING | SimWB_DIR_INOUT , RTDBSTRINGPARM = SimWB_STRING | SimWB_DIR_INOUT ,
  RTDBMDLSIGNAL = SimWB_MDLSIGNAL | SimWB_ANALOG | SimWB_DIR_OUTPUT
}
enum  RTDB_CVTType {
  CVTTYPE_char =1 , CVTTYPE_uchar =2 , CVTTYPE_int =3 , CVTTYPE_uint =4 ,
  CVTTYPE_float =5 , CVTTYPE_short =6 , CVTTYPE_ushort =7 , CVTTYPE_double =8 ,
  CVTTYPE_llong =9 , CVTTYPE_string =10
}
enum  RTDB_RawType {
  RAWTYPE_char = CVTTYPE_char , RAWTYPE_uchar = CVTTYPE_uchar , RAWTYPE_int = CVTTYPE_int , RAWTYPE_uint = CVTTYPE_uint ,
  RAWTYPE_float = CVTTYPE_float , RAWTYPE_short = CVTTYPE_short , RAWTYPE_ushort = CVTTYPE_ushort , RAWTYPE_double = CVTTYPE_double ,
  RAWTYPE_llong = CVTTYPE_llong , RAWTYPE_string = CVTTYPE_string , RAWTYPE_packed =12 , RAWTYPE_bit =13 ,
  RAWTYPE_blob =14
}
enum  RTDB_RunTimeFlags {
  RTDBFL_ALTVALUE =0x1 , RTDBFL_OPERATOR =0x2 , RTDBFL_ARCHIVEPAUSED =0x4 , RTDBFL_OUTOFEURANGE =0x8 ,
  RTDBFL_OUTOFHARDWARERANGE =0x10 , RTDBFL_INVERTPARITY =0x20 , RTDBFL_RAWVALUE =0x40 , RTDBFL_IPA =0x80
}
enum  IO_Flags {
  IOFL_29BITCANID =0x1 , IOFL_BIGENDIAN =0x2 , IOFL_BCDFORMAT =0x4 , IOFL_FIFOTX =0x8 ,
  IOFL_TXONCHANGE =0x10 , IOFL_TXEVERYNFRAME =0x20 , IOFL_BCDSSM =0x40 , IOFL_CANID_RTR =0x80 ,
  IOFL_INPUT_USER =0x100 , IOFL_OUTPUT_USER =0x200 , IOFL_SETUP_USER =0x400 , IOFL_Arinc429_SDI =0x800 ,
  IOFL_CAN_EXTDATA =0x1000 , IOFL_CAN_FASTDATA =0x2000 , IOFL_CAN_NODATA =0x4000 , IOFL_SERIAL_NOMSGID =0x8000 ,
  IOFL_CAN_MUX =0x10000 , IOFL_CAN_DBC =0x20000
}
enum  MSGIO_Flags {
  MSGIO_TXNOW =0x1 , MSGIO_FIFO =0x10 , MSGIO_SCHED =0x20 , MSGIO_TXONCHANGE =0x40 ,
  MSGIO_TXEVERYFRAME =0x80 , MSGIO_PAUSED =0x100 , MSGIO_TXSOFTTIMER =0x200 , MSGIO_INVERTPARITY =0x400 ,
  MSGIO_VARIABLELENGTH =0x800 , MSGIO_Arinc429_SDI =0x800 , MSGIO_NODATA =0x1000
}
enum  EUConversionType { EU_RATFUNC = 1 , EU_TABINTERP = 2 , EU_TABNOINTERP = 3 }
enum  RTDB_MetaFlags {
  METAFL_HASEUCONVERSION =1 , METAFL_HASDEFAULT =2 , METAFL_HASEULIMITS =4 , METAFL_ARCHIVE =8 ,
  METAFL_ARCHIVEENABLE =0x10 , METAFL_INVERTLOGICAL =0x20 , METAFL_SIGNEDEUVAL =0x40 , METAFL_CLAMP2EULIMIT =0x80 ,
  METAFL_NOALTVALUE =0x100 , METAFL_PLAYBACK =0x200 , METAFL_CIRCULARLOGGER =0x400 , METAFL_READONLY =0x800 ,
  METAFL_EUCONVRECORD =0x1000 , METAFL_ASYNCENTRY =0x2000 , METAFL_COLMAJOR =0x4000 , METAFL_SPARE =0x8000 ,
  METAFL_NOSTRUCT =0x10000
}
enum  ARINC429_Speed { SPEED_LOW , SPEED_HIGH }
enum  ARINC429_Parity { PARITY_NONE , PARITY_EVEN , PARITY_ODD }
enum  Serial_Type { RS_232 =1 , RS_422 =2 , RS_423 =3 , RS_485 =4 }

Functions

int ccurRTDB_afdxAddMessage (int boardNumber, unsigned short vlId, IOAFDXMessage *message)
AFDXResidentMessageccurRTDB_afdxFindMessage (int boardId, int boardNumber, unsigned short vlId, const char *name)
int ccurRTDB_afdxSetDestinationIP (int boardNumber, unsigned short vlId, const char *name, unsigned int ip, unsigned short port)
int ccurRTDB_afdxGetSourceIP (int boardNumber, unsigned short vlId, const char *name, unsigned int *ip, unsigned short *port)
unsigned long long ccurRTDB_afdxGetTimeStamp (int boardNumber, unsigned short vlId, const char *name)
AFDXResidentMessageccurRTDB_afdxGetMessageTable (void)
void ccurRTDB_afdxInitMessageTable (void)
void ccurRTDB_arinc429InitTable (void)
ARINC429LabelPropertiesccurRTDB_arinc429GetLabelTable (void)
int ccurRTDB_arinc429GetTableIndex (int boardId, int boardNum, int channelNum, int labelNum)
int ccurRTDB_arinc429TXQueueNow (RTDBItem *pItem)
int ccurRTDB_arinc429TXQueueNowLabel (int boardId, int boardNum, int channelNum, int labelNum)
void ccurRTDB_canInitTable (void)
CANIdPropertiesccurRTDB_canGetCANIdTable (void)
int ccurRTDB_canGetTableIndex (int boardId, int boardNum, int netNum, int canId, int type)
CANIdPropertiesccurAsyncIO_canGetCANId (int boardId, int boardNum, int netNum, int canId, int type)
CIGIResidentMessageccurRTDB_cigiIOGetMessageTable (void)
void ccurRTDB_cigiIOInitMessageTable (void)
FDXResidentMessageccurRTDB_fdxIOGetMessageTable (void)
void ccurRTDB_fdxIOInitMessageTable (void)
void ccurRTDB_linInitTable (void)
LINIdPropertiesccurRTDB_linGetLINIdTable (void)
int ccurRTDB_linGetTableIndex (int boardId, int boardNum, int netNum, int frameId, int type)
LINIdPropertiesccurAsyncIO_linGetLINId (int boardId, int boardNum, int netNum, int canId, int type)
NETResidentMessageccurRTDB_netIOGetMessageTable (void)
void ccurRTDB_netIOInitMessageTable (void)
void ccurRTDB_sentInitTable (void)
SENTIdPropertiesccurRTDB_sentGetSENTIdTable (void)
int ccurRTDB_sentGetTableIndex (int boardId, int boardNum, int channelNum, int sentId, int type)
SENTIdPropertiesccurAsyncIO_sentGetSENTId (int boardId, int boardNum, int channelNum, int sentId, int type)
UDPResidentMessageccurRTDB_udpIOGetMessageTable (void)
void ccurRTDB_udpIOInitMessageTable (void)
int ccurRTDB_initDB (int maxPoints, int maxCVTSize, int maxStringVariables)
int ccurRTDB_clearDB (void)
void ccurRTDB_resetCVTtoZero (void)
int ccurRTDB_mapDB ()
volatile void * ccurRTDB_getCVTTableAddress ()
volatile void * ccurRTDB_getAlternateTableAddress ()
volatile void * ccurRTDB_getRawTableAddress ()
int ccurRTDB_getCVTSize (void)
int ccurRTDB_deleteItem (const char *key)
int ccurRTDB_addItem (const char *key, RTDBItemMetaPair *itemMeta)
int ccurRTDB_addSpareItem (int itemIndex, int pointType, int cvtType)
int ccurRTDB_takeSpareItem (const char *newName, int pointType, int cvtType)
int ccurRTDB_renameItem (const char *oldName, const char *newName)
int ccurRTDB_addHardwareConfig (const char *key, HardwareConfig *cfg)
int ccurRTDB_getCVTItemSize (const RTDBItem *p)
int ccurRTDB_setStringValue (const char *pointName, StringVariableValue *value, int length)
int ccurRTDB_setStringValueP (const RTDBItem *p, StringVariableValue *value, int length)
int ccurRTDB_setStringAltValueP (const RTDBItem *p, StringVariableValue *value, int length)
int ccurRTDB_setStringAltValue (const char *pointName, StringVariableValue *value, int length)
int ccurRTDB_setStringDefaultValueP (RTDBItem *p, StringVariableValue *value, int length)
int ccurRTDB_setStringDefaultValue (const char *pointName, StringVariableValue *value, int length)
int ccurRTDB_getStringDefaultValue (const char *pointName, StringVariableValue *value, int *length)
int ccurRTDB_getStringDefaultValueP (const RTDBItem *p, StringVariableValue *value, int *length)
int ccurRTDB_getStringValue (const char *pointName, StringVariableValue *value, int *length)
int ccurRTDB_getStringValueP (const RTDBItem *p, StringVariableValue *value, int *length)
int ccurRTDB_getStringValueLengthP (const RTDBItem *p)
int ccurRTDB_getStringAltValue (const char *pointName, StringVariableValue *value, int *length)
int ccurRTDB_getStringAltValueP (const RTDBItem *p, StringVariableValue *value, int *length)
int ccurRTDB_getStringAltValueLengthP (const RTDBItem *p)
double ccurRTDB_getCVTValueDouble (const char *pointName)
double ccurRTDB_getCVTValuePDouble (const RTDBItem *p)
double ccurRTDB_getAlternateValueDouble (const char *pointName)
double ccurRTDB_getAlternateValuePDouble (const RTDBItem *p)
double ccurRTDB_getCurrentValueDouble (const char *pointName)
double ccurRTDB_getCurrentValuePDouble (const RTDBItem *p)
void ccurRTDB_setAlternateValueDouble (const char *pointName, double varValue)
void ccurRTDB_setAlternateValuePDouble (const RTDBItem *p, double varValue)
void ccurRTDB_setCVTValueDouble (const char *pointName, double varValue)
void ccurRTDB_setCVTValuePDouble (const RTDBItem *p, double varValue)
void ccurRTDB_setCurrentValueDouble (const char *pointName, double varValue)
void ccurRTDB_setCurrentValuePDouble (const RTDBItem *p, double varValue)
double ccurRTDB_getRawValueDouble (const char *pointName)
double ccurRTDB_getRawValuePDouble (const RTDBItem *p)
int ccurRTDB_getCVTValueP (const RTDBItem *p, ItemValueDef *value)
int ccurRTDB_getCVTValuePMaxElements (const RTDBItem *p, ItemValueDef *value, int max)
int ccurRTDB_getCVTValuePScalar (const RTDBItem *p, ItemValueDefScalar *value, int index)
int ccurRTDB_getCVTValue (const char *pointName, ItemValueDef *value)
int ccurRTDB_getAlternateValueP (const RTDBItem *p, ItemValueDef *value)
int ccurRTDB_getAlternateValuePScalar (const RTDBItem *p, ItemValueDefScalar *value, int index)
int ccurRTDB_getAlternateValue (const char *pointName, ItemValueDef *value)
int ccurRTDB_setCVTValue (const char *pointName, ItemValue *value)
int ccurRTDB_setCVTValueP (const RTDBItem *p, ItemValue *value)
int ccurRTDB_setAlternateValueP (RTDBItem *p, ItemValue *value)
int ccurRTDB_setAlternateValue (char *pointName, ItemValue *value)
int ccurRTDB_setPointValueP (RTDBItem *p, ItemValue *value)
int ccurRTDB_setAlternateFlag (const char *pointName, int enable)
int ccurRTDB_setAlternateFlagP (RTDBItem *pItem, int enable)
int ccurRTDB_setOperatorFlag (const char *pointName, int enable)
int ccurRTDB_setOperatorFlagP (RTDBItem *pItem, int enable)
int ccurRTDB_getNumberOfItems (void)
int ccurRTDB_getMaxNumberOfItems (void)
int ccurRTDB_getMaxNumberOfStrings (void)
double ccurRTDB_getFrameRate (void)
void ccurRTDB_setFrameLength (int frameLength)
int ccurRTDB_getFrameLength (void)
unsigned int ccurRTDB_getFrameCount ()
void ccurRTDB_incrementFrameCount ()
void ccurRTDB_setFrameCount (unsigned int frameCount)
void ccurRTDB_setRunning (int running)
void ccurRTDB_setStopped ()
int ccurRTDB_isRunning ()
unsigned long long ccurRTDB_testGetStartTimeStamp ()
int ccurRTDB_getItemMeta (const char *pointName, RTDBItemMeta *meta)
int ccurRTDB_setItemMeta (const char *pointName, RTDBItemMeta *meta)
int ccurRTDB_setLoggingFlagP (RTDBItem *pItem)
int ccurRTDB_setLoggingFlag (const char *pointName)
int ccurRTDB_resetLoggingFlagP (RTDBItem *pItem)
int ccurRTDB_resetLoggingFlag (const char *pointName)
int ccurRTDB_setLoggingFlagAll (void)
int ccurRTDB_setLoggingEnable (const char *pointName, char enable)
int ccurRTDB_setLoggingEnableP (RTDBItem *pItem, char enable)
int ccurRTDB_resetToDefault ()
int ccurRTDB_setRTDBInitialConditionValues (void)
int ccurRTDB_setRTDBInitCondLogging (void)
int ccurRTDB_setRTDBShutDownValues (void)
int ccurRTDB_getDBMetaInfo (RTDBMetaInfo *p)
int ccurRTDB_isDBLoaded ()
void ccurRTDB_setDBLoaded (int b)
void ccurRTDB_setDBName (const char *dbName)
void ccurRTDB_setDBOffset (const char *dbName, int offset)
int ccurRTDB_getDBOffset (const char *dbName)
int ccurRTDB_isDBNameLoaded (const char *dbName)
int ccurRTDB_setBoardDB (int boardId, int boardNum, const char *dbName)
const char * ccurRTDB_getBoardDB (int boardId, int boardNum)
void ccurRTDB_setDBDescription (const char *dbDescription)
void ccurRTDB_setDBCheckSum (unsigned int cks)
unsigned int ccurRTDB_getDBCheckSum (void)
void ccurRTDB_setTestSession (const char *testId, const char *sessionId)
void ccurRTDB_setSnapshotConfig (const char *snapshotNameTemplate, int snapshotFormat, int snapshotMask, const char *snapshotNameMask)
void ccurRTDB_getTestSession (char *testId, char *sessionId)
void ccurRTDB_getSnapshotConfig (char *snapshotNameTemplate, int *snapshotFormat, int *snapshotMask, char *snapshotNameMask)
void ccurRTDB_setTestInitCondition (const char *initCondName)
void ccurRTDB_getTestInitCondition (char *initCondName)
void ccurRTDB_resumeDLogger ()
void ccurRTDB_pauseDLogger ()
void ccurRTDB_newItemDLogger (int newHashIndex, char *oldName)
void ccurRTDB_stopCircularLogger ()
int ccurRTDB_isDLoggerRunning ()
int ccurRTDB_isCLoggerRunning ()
void ccurRTDB_setCircularLoggerLockBehavior (int behavior)
int ccurRTDB_getCircularLoggerLockBehavior (void)
void ccurRTDB_setDataLoggerDirectIO (int directIO)
void ccurRTDB_getDBName (char *dbName)
int ccurRTDB_getItemList (RTDBItemPairPtr *list, int *n, int pointType, const char *pattern)
const char * ccurRTDB_getItemName (const RTDBItem *p)
int ccurRTDB_getItemAddress (const char *name, RTDBItem **p)
void * ccurRTDB_getItemCVTValueAddress (const char *name)
void * ccurRTDB_getItemAltValueAddress (const char *name)
int ccurRTDB_regexItemAddress (const char *regex, RTDBItem **p, char *name)
int ccurRTDB_globItemAddress (const char *glob, RTDBItem **p, char *name)
int ccurRTDB_getHardwareConfigAddress (const char *name, HardwareConfig **p)
int ccurRTDB_getEUConversionAddress (const char *name, EUConversion **p)
int ccurRTDB_resolveIOMappings (const char *name, RTDBItem *pItem, char *errString)
int ccurRTDB_resolveEUConversion (const char *name, RTDBItem *pItem, char *errString)
int ccurRTDB_getItemIndex (const char *name)
int ccurRTDB_getHardwareConfigIndex (const char *name)
RTDBItemccurRTDB_itemIndexToAddress (int index)
HardwareConfigccurRTDB_hardwareConfigIndexToAddress (int index)
void ccurRTDB_setLoggedUser (const char *userName)
const char * ccurRTDB_getLoggedUser (void)
void ccurRTDB_scriptInitStdIO (void)
ScriptStdIOccurRTDB_getScriptStdIOAddress (void)
int ccurRTDB_writeStdOut (char *str)
double ccurRTDB_euPhysicalToRaw (RTDBItemMeta *meta, double euValue)
double ccurRTDB_euRawToPhysical (RTDBItemMeta *meta, double rawValue)
int ccurRTDB_asyncGetLastRXIntervalP (const RTDBItem *pItem)
int ccurRTDB_asyncGetLastRXInterval (const char *pointName)
int ccurRTDB_asyncGetTimeSinceLastRXP (const RTDBItem *pItem)
int ccurRTDB_asyncGetTimeSinceLastRX (const char *pointName)
unsigned long long ccurRTDB_asyncGetRXTimeStampP (const RTDBItem *pItem)
void ccurRTDB_formImport (const char *formName, char inputsOnly)
int ccurRTDB_formCapture (const char *formName, const char *nameTemplate, int captureType, double period, int runCount)
void ccurRTDB_snapshot (void)
int ccurRTDB_addUnit (int uClass, const char *name, double A, double B)
int ccurRTDB_mapModelCVT (const char *pgmName, void *cvtTable, int cvtSize)
int ccurRTDB_modelDataExchangeInit (const char *modelName)
void ccurRTDB_modelCopyInputs (void)

Detailed Description

This API is used by program running on the Real-Time host to access and configure the RTDB.
Those programs must map the RTDB into their address space before accessing it with any of the functions described here.

Macro Definition Documentation

◆ MAX_NAMESPACE

#define MAX_NAMESPACE   128

Utility object to retrieve initial condition for data items.

◆ NI_BOARD_MASK

#define NI_BOARD_MASK   0x100

The board identification.

Typedef Documentation

◆ ItemValue

typedef struct ItemValue ItemValue

Object to hold the engineering unit value of a RTDB item independent of its data type. This is used in call to getCVTValue and getAlternateValue.

◆ ItemValueScalar

typedef struct ItemValueScalar ItemValueScalar

Object to hold the a single engineering unit value of a RTDB item independent of its data type. This is used for the RTDB default value and RTDB alternate value.

◆ ItemValueDef

typedef struct ItemValueDef ItemValueDef

Object to provide a value to an RTDB item.

◆ ItemValueDefScalar

typedef struct ItemValueDefScalar ItemValueDefScalar

Object to provide a value to a scalar only RTDB item.

◆ RawValue

typedef union RawValue RawValue

Object to hold the raw value of a RTDB item independent of its data type.

◆ ARINC429LabelProperties

typedef struct ARINC429LabelProperties ARINC429LabelProperties

Object describing some specific properties of ARINC 429 labels in the shared memory RTDB.

◆ CANIdProperties

typedef struct CANIdProperties CANIdProperties

Object describing some specific properties of CAN Id's in the shared memory RTDB.

◆ LINIdProperties

typedef struct LINIdProperties LINIdProperties

Object describing some specific properties of LIN Id's in the shared memory RTDB.

◆ HardwareConfig

typedef struct HardwareConfig HardwareConfig

Object describing hardware record for items attached to real hardware.

◆ EUConversion

typedef struct EUConversion EUConversion

Engineering conversion record held in shared memory. This is indexed via a separate hash table pointed to in the EUFactors meta data. This defines a conversion from physical (Engineering units) to raw via either a rational polynomial function as raw = (a*X^2 + b*X + c)/(d*X^2 + e*X + F) or
an interpolation table defined in rangesX and rangesY.
When the polynomial is different from strictly linear , i.e. A*X + B, this function cannot be inverted and therefore cannot be used to convert from physical to raw units.

◆ RTDBItemMeta

typedef struct RTDBItemMeta RTDBItemMeta

Meta data only for a RTDB item. All those are specified as part of the definition of a RTDB item. This does not contain anything related to the value of an item.

◆ RTDBItemData

typedef struct RTDBItemData RTDBItemData

Data corresponding to a RTDB item.
The cvt value (Not overriden value) of this item is in the CVT.
Override value.
run time flags.

◆ RTDBItem

typedef struct RTDBItem RTDBItem

RTDB data item object. Contains both meta and data parts.

◆ RTDBItemPair

typedef struct RTDBItemPair RTDBItemPair

Utility object to retrieve list of items from the RTDB

◆ RTDBItemPairPtr

typedef struct RTDBItemPair* RTDBItemPairPtr

◆ RTDBItemMetaPair

typedef struct RTDBItemMetaPair RTDBItemMetaPair

Utility object to retrieve or update list of item meta information from / to the RTDB.

◆ RTDBItemValuePair

typedef struct RTDBItemValuePair RTDBItemValuePair

Utility object to set or get RTDB item value in the RTDB.

◆ RTDBItemLogging

typedef struct RTDBItemLogging RTDBItemLogging

Utility object to retrieve logging flags corresponding to an initial condition set.

◆ BoardUserHookMappingDefn

typedef struct BoardUserHookMappingDefn BoardUserHookMappingDefn

Utility object passed to generic IO user hook routine.

◆ IOSerialChannelDef

typedef struct IOSerialChannelDef IOSerialChannelDef

Definition of a specific channel on an IO board.

◆ AFDXSymbolDef

typedef struct AFDXSymbolDef AFDXSymbolDef

AFDX symbol definition.

◆ IOAFDXMessage

typedef struct IOAFDXMessage IOAFDXMessage

AFDX message definition.

◆ IONETMessage

typedef struct IONETMessage IONETMessage

IONET message static properties.

◆ IOUDPHeader

typedef struct IOUDPHeader IOUDPHeader

UDP header properties. Describes commands sent to the defined IP/port combination at I/O task initialization;

◆ IOUDPMessage

typedef struct IOUDPMessage IOUDPMessage

UDP message static properties.

◆ IOCIGIMessage

typedef struct IOCIGIMessage IOCIGIMessage

CIGI message static properties.

◆ IOFDXMessage

typedef struct IOFDXMessage IOFDXMessage

FDX message static properties.

◆ RTMAPSProps

typedef struct RTMAPSProps RTMAPSProps

RTMAPS properties.

◆ AFDXResidentMessage

typedef struct AFDXResidentMessage AFDXResidentMessage

Object describing specific run-time properties of AFDX messages in the shared memory RTDB.

◆ RTMAPSResidentMessage

typedef struct RTMAPSResidentMessage RTMAPSResidentMessage

Object describing specific run-time properties of RTMAPS message in the shared memory RTDB.

◆ NETResidentMessage

typedef struct NETResidentMessage NETResidentMessage

Object describing specific run-time properties of NETIO messages in the shared memory RTDB.

◆ UDPResidentMessage

typedef struct UDPResidentMessage UDPResidentMessage

Object describing specific run-time properties of UDP messages in the shared memory RTDB.

◆ CIGIResidentMessage

typedef struct CIGIResidentMessage CIGIResidentMessage

Object describing specific run-time properties of CIGI messages in the shared memory RTDB.

◆ FDXResidentMessage

typedef struct FDXResidentMessage FDXResidentMessage

Object describing specific run-time properties of FDX messages in the shared memory RTDB.

◆ IOAFDXVirtualLink

typedef struct IOAFDXVirtualLink IOAFDXVirtualLink

AFDX virtual link definition.

◆ IORS232Message

typedef struct IORS232Message IORS232Message

RS232 message definition.

◆ IOFlexRayMessage

typedef struct IOFlexRayMessage IOFlexRayMessage

FLEXRAY message definition.

◆ IOMemoryRegion

typedef struct IOMemoryRegion IOMemoryRegion

Memory region definition definition.

◆ IOArionObject

typedef struct IOArionObject IOArionObject

Arion Object definition.

◆ IORtadbMessage

typedef struct IORtadbMessage IORtadbMessage

Rtadb Message definition.

◆ IOBoardDef

typedef struct IOBoardDef IOBoardDef

Definition of a specific hardware IO board.

◆ ItemName

typedef char ItemName[MAX_TAGLEN]

Utility object that defines the name of an RTDB item.

◆ ScriptStdIO

typedef struct ScriptStdIO ScriptStdIO

Definition of for Script programs standard Input and output functions.
This is mapped in shared memory at the end of the RTDB.

Enumeration Type Documentation

◆ PointType

enum PointType

Type of data points supported in the RTDB.

Enumerator
RTDBPARAMETER 
RTDBSHRDPARAMETER 
RTDBAI 
RTDBAO 
RTDBAIO 
RTDBDI 
RTDBDO 
RTDBDIO 
RTDBSTRINGIN 
RTDBSTRINGOUT 
RTDBSTRINGIO 
RTDBSTRINGPARM 
RTDBMDLSIGNAL 

◆ RTDB_CVTType

Supported data type for a RTDB item value.

Enumerator
CVTTYPE_char 

value in CVT is 'C' char

CVTTYPE_uchar 

value in CVT is 'C' unsigned char

CVTTYPE_int 

value in CVT is 'C' int

CVTTYPE_uint 

value in CVT is 'C' unsigned int

CVTTYPE_float 

value in CVT is 'C' float

CVTTYPE_short 

value in CVT is 'C' short

CVTTYPE_ushort 

value in CVT is 'C' unsigned short

CVTTYPE_double 

value in CVT is 'C' double

CVTTYPE_llong 

value in CVT is 'C' long long 64 bit integer

CVTTYPE_string 

Fixed size array of char[]. This is not in the CVT

◆ RTDB_RawType

Supported data type for a RTDB raw value.

Enumerator
RAWTYPE_char 

Raw value is 'C' char

RAWTYPE_uchar 

Raw value is 'C' unsigned char

RAWTYPE_int 

Raw value is 'C' int

RAWTYPE_uint 

Raw value is 'C' unsigned int

RAWTYPE_float 

Raw value is a 'C' float. This is used for AFDX messages where we can pack any data type in the message.

RAWTYPE_short 

Raw value is 'C' short

RAWTYPE_ushort 

Raw value is 'C' unsigned short

RAWTYPE_double 

Raw value is a 'C' double. This is used for AFDX messages where we can pack any data type in the message.

RAWTYPE_llong 

Raw value is a 'C' float. This is used for AFDX messages where we can pack any data type in the message.

RAWTYPE_string 

Fixed size array of char[].

RAWTYPE_packed 

Raw value is packed in the input/output buffer with number of bits and starting position as defined in the item IOAddress record (AFDX) .

RAWTYPE_bit 

Raw value is packed in a bit range int the input/output buffer with number of bits and starting position as defined in the item IOAddress record.
This is different from ARINC word which always uses 32 bits.

RAWTYPE_blob 

Raw value is a blobl

◆ RTDB_RunTimeFlags

Run time flags associated to an RTDB item.

Enumerator
RTDBFL_ALTVALUE 

The alternate value is in effect.

RTDBFL_OPERATOR 

The operator has entered a value.

RTDBFL_ARCHIVEPAUSED 

Data logging for the point is temporarily disabled, METAFL_ARCHIVEENABLE is off.

RTDBFL_OUTOFEURANGE 

The EU value is outside the EU limits.

RTDBFL_OUTOFHARDWARERANGE 

The raw hardware value is outside of the max/min value specified for the hardware .

RTDBFL_INVERTPARITY 

Invert parity on the raw arinc word when outputting the label corresponding to this data point.

RTDBFL_RAWVALUE 

Value in CVT or alternate value is raw.

RTDBFL_IPA 

◆ IO_Flags

enum IO_Flags

Additional flags for for the I/O record. Describes some additional properties specific to the device.

Enumerator
IOFL_29BITCANID 

The CAN Id is 29 bit instead of default 11.

IOFL_BIGENDIAN 

Swap bytes in from little-endian(Intel) to big-endian when writing data point value to AFDX message and when extracting from AFDXr, FlexRay or CAN message.

IOFL_BCDFORMAT 
IOFL_FIFOTX 

Use FIFO mode when sending ARINC 429 instead of scheduled mode.

IOFL_TXONCHANGE 

Send FIFO label on value change otherwise only send on user request even the value has changed.

IOFL_TXEVERYNFRAME 
IOFL_BCDSSM 

Set when the RTDB item is the SSM bits for a BCD label

IOFL_CANID_RTR 

Set when the input CAN ID is defined as RTR

IOFL_INPUT_USER 

Call user supplied routine on CAN Id receive.

IOFL_OUTPUT_USER 

Call user supplied routine before CAN Id transmit.

IOFL_SETUP_USER 

Call user supplied routine at initialization time. The routine will be called both for the corresponding input and output CAN Id so the user can do separate setup for input and/or output.

IOFL_Arinc429_SDI 
IOFL_CAN_EXTDATA 

Support for CAN FD packet > 8 bytes.

IOFL_CAN_FASTDATA 

Support for CAN FD fast data rate

IOFL_CAN_NODATA 

Support for sending/receiving CAN messages with no paylod , still needs to be mapped but we ignore mapping

IOFL_SERIAL_NOMSGID 

Binary serial message with no message id in payload

IOFL_CAN_MUX 

CAN signal is muxed

IOFL_CAN_DBC 

CAN mapping comes from DBC

◆ MSGIO_Flags

Run time flags for an message oriented device such as ARINC 429,AFDX or CAN . Not all flags apply to all devices

Enumerator
MSGIO_TXNOW 

For FIFO mode ARINC label, only send the label when this is set .

MSGIO_FIFO 

Defined originally as a FIFO label in the RTDB . Current operating mode of the label.

MSGIO_SCHED 

Defined originally as a scheduled label in the RTDB . Current operating mode of the label.

MSGIO_TXONCHANGE 
MSGIO_TXEVERYFRAME 
MSGIO_PAUSED 

This schedule label has been paused.

MSGIO_TXSOFTTIMER 

AFDX schedule is via a software timer.

MSGIO_INVERTPARITY 

Invert parity when sending arinc 4209 labels.

MSGIO_VARIABLELENGTH 

Message is variable length (for NETIO)

MSGIO_Arinc429_SDI 

ARINC 429 Label uses SDI (ARINC 429 boards only )

MSGIO_NODATA 

Send message with no payloadi (CAN)

◆ EUConversionType

Type of entry in the conversion table.

See also
EUConversion .
Enumerator
EU_RATFUNC 

Rational function .

EU_TABINTERP 

Table with interpolation.

EU_TABNOINTERP 

Table with no interpolation.

◆ RTDB_MetaFlags

Meta flags for an RTDB item. Describe specific properties of the RTDB item such as : item has EU conversion, is logged in the data logger,etc.

Enumerator
METAFL_HASEUCONVERSION 

Use EU conversion factors A & B to convert raw value. If not set there is no conversion and the raw value is stored as is in the RTDB

METAFL_HASDEFAULT 

Item has a default value associated with it. The RTDB item is initialized to this value when the RTDB is loaded and the item value has not been specified in the initial condition set.

METAFL_HASEULIMITS 

Check EU limits for valid value when placing in RTDB. This only applies to RTDB item mapped to hardware device.

METAFL_ARCHIVE 

Log the value of this item to the historical files at run time. This puts the point in the list of point that can be logged. If this is on, METFAFL_ARCHIVEENABLE is turned on at initialization. At run time, the user can toggle the METAFL_ARCHIVENABLE flag to enable/disable the logging.

METAFL_ARCHIVEENABLE 

Dynamic logging flag. When on, the item is logged when off item is no longer logged. This flag can be toggled at run time.

METAFL_INVERTLOGICAL 

Set when boolean raw data must be inverted before storing in the CVT.

METAFL_SIGNEDEUVAL 

Set the EU value is a signed number, i.e. the most significant bit of the hardware raw value is the sign bit.

METAFL_CLAMP2EULIMIT 

If set and HASEULIMITS also set, the input and output values EU values are clamped to the max/min defined by the EU limits.

METAFL_NOALTVALUE 

If set , the item does not have an alternate value.

METAFL_PLAYBACK 

If set , we're in playback mode and the item has data coming from the data logger .

METAFL_CIRCULARLOGGER 

If set , this item goes into the circular data logger file .

METAFL_READONLY 

Read only item, value cannot be set from the GUI.

METAFL_EUCONVRECORD 

Use EU conversion in table instead of A,B factors .

METAFL_ASYNCENTRY 

Set by asyncio input thread when new value is set so that I/O tasks can output even when value has not changed.

METAFL_COLMAJOR 

Col major for MATLAB type arrays.

METAFL_SPARE 

Last spare bit.

METAFL_NOSTRUCT 

Don't include this item in the C CVTTABLE struct.

◆ ARINC429_Speed

Links speed for ARINC 429 channel.

Enumerator
SPEED_LOW 
SPEED_HIGH 

◆ ARINC429_Parity

Parity for ARINC 429 channel

Enumerator
PARITY_NONE 
PARITY_EVEN 
PARITY_ODD 

◆ Serial_Type

Serial type for serial device

Enumerator
RS_232 
RS_422 
RS_423 
RS_485 

Function Documentation

◆ ccurRTDB_afdxAddMessage()

int ccurRTDB_afdxAddMessage ( int boardNumber,
unsigned short vlId,
IOAFDXMessage * message )

Add an AFDX message definition to the resident AFDX message table.

Deprecated
Replaced with ccurAsyncIO_afdxAddMessage()

◆ ccurRTDB_afdxFindMessage()

AFDXResidentMessage * ccurRTDB_afdxFindMessage ( int boardId,
int boardNumber,
unsigned short vlId,
const char * name )

Search the resident AFDX message table for a message.

Deprecated
Replaced with ccurAsyncIO_afdxFindMessage()

◆ ccurRTDB_afdxSetDestinationIP()

int ccurRTDB_afdxSetDestinationIP ( int boardNumber,
unsigned short vlId,
const char * name,
unsigned int ip,
unsigned short port )

Set the destination IP and port for an output AFDX message.
This only applies for SAP type message where the destination must be specified at run time. Initially, the destination is set to the default saved in the disk resident database.

Deprecated
Replaced with ccurAsyncIO_afdxSetDestinationIP()

◆ ccurRTDB_afdxGetSourceIP()

int ccurRTDB_afdxGetSourceIP ( int boardNumber,
unsigned short vlId,
const char * name,
unsigned int * ip,
unsigned short * port )

Get the source IP and port for an input AFDX message.
This only applies for SAP type message where the originator IP and port are known upon message reception.

Deprecated
Replaced with ccurAsyncIO_afdxGetSourceIP()

◆ ccurRTDB_afdxGetTimeStamp()

unsigned long long ccurRTDB_afdxGetTimeStamp ( int boardNumber,
unsigned short vlId,
const char * name )

Get the message time stamp for the last read or write.

Deprecated
Replaced with ccurAsyncIO_afdxGetTimeStamp()

◆ ccurRTDB_afdxGetMessageTable()

AFDXResidentMessage * ccurRTDB_afdxGetMessageTable ( void )

Returns a pointer to the resident message table AFDXMessageTable.

Return values
Theaddress of the resident message table.
See also
AFDXMessageTable.
Return values
<0 RTDB_AFDXMSGNOTFOUND if message was not found in table.

◆ ccurRTDB_afdxInitMessageTable()

void ccurRTDB_afdxInitMessageTable ( void )

Initialize afdx message table.

◆ ccurRTDB_arinc429InitTable()

void ccurRTDB_arinc429InitTable ( void )

Initialize CAN message table.

◆ ccurRTDB_arinc429GetLabelTable()

ARINC429LabelProperties * ccurRTDB_arinc429GetLabelTable ( void )

Returns a pointer to the ARINC429 label table .

Return values
Theaddress of the resident ARINC429 label table. This a pointer to a
See also
ARINC429LabelProperties item. Each element can be dereferenced by p[index] where index is obtained by a call to ccurRTDB_arinc429GetTableIndex(int boardNum,int netNum,int canId) .

◆ ccurRTDB_arinc429GetTableIndex()

int ccurRTDB_arinc429GetTableIndex ( int boardId,
int boardNum,
int channelNum,
int labelNum )

Return the index in the ARINC429LabelProperties table of the specified label number. The address of the ARINC429 label table must be obtained by a call to ccurRTDB_arinc429GetLabelTable(). The specific label structure can then be accessed by pTable[index] where index is the value returned by this routine.

Parameters
boardIdinteger with the board Id. Either ARINC429 or BTI_Lx429 or DD_429_92
boardNumThe board number (first board is 1) where the label is defined.
channelNumThe channel number (0-15).
labelNumThe label number.
Return values
Theindex of the specified label in the table or -1 if it cannot be foumd.

◆ ccurRTDB_arinc429TXQueueNow()

int ccurRTDB_arinc429TXQueueNow ( RTDBItem * pItem)

Request that the value of label defined in FIFO queueing mode be sent now. If the item specified is mapped to multiple ARINC label , all of the them will be transmitted. FIFO mode labels with IOFL_TXONCHANGE are only transmitted upon user request.

Deprecated
Replaced with ccurAsyncIO_arinc429TXQueueNow()

◆ ccurRTDB_arinc429TXQueueNowLabel()

int ccurRTDB_arinc429TXQueueNowLabel ( int boardId,
int boardNum,
int channelNum,
int labelNum )

Request that the value of label defined in FIFO queueing mode be sent now. FIFO mode labels are only transmitted upon user request.

Deprecated
Replaced with ccurAsyncIO_arinc429TXQueueNowLabel()

◆ ccurRTDB_canInitTable()

void ccurRTDB_canInitTable ( void )

Initialize CAN message table.

◆ ccurRTDB_canGetCANIdTable()

CANIdProperties * ccurRTDB_canGetCANIdTable ( void )

Returns a pointer to the CAN Id's table .

Return values
Theaddress of the resident CAN Id's table. This a pointer to a
See also
CANIdProperties item. Each element can be dereferenced by p[index] where index is obtained by a call to ccurRTDB_canGetTableIndex(int boardNum,int netNum,int canId,int type) .

◆ ccurRTDB_canGetTableIndex()

int ccurRTDB_canGetTableIndex ( int boardId,
int boardNum,
int netNum,
int canId,
int type )

Return the index in the CANIdProperties table of the specified CAN id. The address of the CAN id table must be obtained by a call to ccurRTDB_canGetCANIdTable(). The specifi CAN id can then be accessed by pCanTable[index] where index is the value returned by this routine.

Parameters
boardIdThe board type where the CAN is defined. I.e. one of CANIO_ESD405(15) or CANIO_PEAK (21).
boardNumThe board number (first board is 1) where the CAN is defined.
netNumThe net number (0-3).
canIdThe CAN id.
typeInput or output of the CAN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Theindex of the CAN id in the table or -1 if it cannot be foumd.

◆ ccurAsyncIO_canGetCANId()

CANIdProperties * ccurAsyncIO_canGetCANId ( int boardId,
int boardNum,
int netNum,
int canId,
int type )

Return a pointerto of the specified CAN id record.

Parameters
boardIdThe board type where the CAN is defined. I.e. one of CANIO_ESD405(15) or CANIO_PEAK (21).
boardNumThe board number (first board is 0) where the CAN is defined.
netNumThe net number (0-3).
canIdThe CAN id.
typeInput or output of the CAN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Thepointer to the CAN id record on success. NULL if the record cannot be found.

◆ ccurRTDB_cigiIOGetMessageTable()

CIGIResidentMessage * ccurRTDB_cigiIOGetMessageTable ( void )

Returns a pointer to the resident message table CIGIMessageTable.

Return values
Theaddress of the resident message table.
See also
CIGIMessageTable.

◆ ccurRTDB_cigiIOInitMessageTable()

void ccurRTDB_cigiIOInitMessageTable ( void )

Initialize CIGI message table.

◆ ccurRTDB_fdxIOGetMessageTable()

FDXResidentMessage * ccurRTDB_fdxIOGetMessageTable ( void )

Returns a pointer to the resident message table FDXMessageTable.

Return values
Theaddress of the resident message table.
See also
FDXMessageTable.

◆ ccurRTDB_fdxIOInitMessageTable()

void ccurRTDB_fdxIOInitMessageTable ( void )

Initialize FDX message table.

◆ ccurRTDB_linInitTable()

void ccurRTDB_linInitTable ( void )

Initialize LIN message table.

◆ ccurRTDB_linGetLINIdTable()

LINIdProperties * ccurRTDB_linGetLINIdTable ( void )

Returns a pointer to the LIN Id's table .

Return values
Theaddress of the resident LIN Id's table. This a pointer to a
See also
LINIdProperties item. Each element can be dereferenced by p[index] where index is obtained by a call to ccurRTDB_linGetTableIndex(int boardNum,int netNum,int canId,int type) .

◆ ccurRTDB_linGetTableIndex()

int ccurRTDB_linGetTableIndex ( int boardId,
int boardNum,
int netNum,
int frameId,
int type )

Return the index in the LINIdProperties table of the specified LIN id. The address of the LIN id table must be obtained by a call to ccurRTDB_linGetLINIdTable(). The specifi LIN id can then be accessed by pCanTable[index] where index is the value returned by this routine.

Parameters
boardIdThe board type where the LIN is defined. I.e. one of BABY_LIN(72) .
boardNumThe board number (first board is 1) where the LIN is defined.
netNumThe net number (0-3).
frameIdThe LIN frame id.
typeInput or output of the LIN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Theindex of the LIN id in the table or -1 if it cannot be foumd.

◆ ccurAsyncIO_linGetLINId()

LINIdProperties * ccurAsyncIO_linGetLINId ( int boardId,
int boardNum,
int netNum,
int canId,
int type )

Return a pointerto of the specified LIN id record.

Parameters
boardIdThe board type where the LIN is defined. I.e. one of BABY_LIN(72) .
boardNumThe board number (first board is 0) where the LIN is defined.
netNumThe net number (0-3).
canIdThe LIN id.
typeInput or output of the LIN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Thepointer to the LIN id record on success. NULL if the record cannot be found.

◆ ccurRTDB_netIOGetMessageTable()

NETResidentMessage * ccurRTDB_netIOGetMessageTable ( void )

Returns a pointer to the resident message table NETMessageTable.

Return values
Theaddress of the resident message table.
See also
NETMessageTable.

◆ ccurRTDB_netIOInitMessageTable()

void ccurRTDB_netIOInitMessageTable ( void )

Initialize NET message table.

◆ ccurRTDB_sentInitTable()

void ccurRTDB_sentInitTable ( void )

Initialize SENT message table.

◆ ccurRTDB_sentGetSENTIdTable()

SENTIdProperties * ccurRTDB_sentGetSENTIdTable ( void )

Returns a pointer to the SENT Id's table .

Return values
Theaddress of the resident SENT Id's table. This a pointer to a
See also
SENTIdProperties item. Each element can be dereferenced by p[index] where index is obtained by a call to ccurRTDB_sentGetTableIndex(int boardNum,int netNum,int sentId,int type) .

◆ ccurRTDB_sentGetTableIndex()

int ccurRTDB_sentGetTableIndex ( int boardId,
int boardNum,
int channelNum,
int sentId,
int type )

Return the index in the SENTIdProperties table of the specified SENT id.

Parameters
boardIdThe board type where the SENT is defined. I.e. one of CP_SENT(80) or CP_FPGA_ArV (77) or CP_CMFIO (104) or CP_FPGA_ArX (110)
boardNumThe board number (first board is 1) where the SENT id is defined.
channelNumThe channel number (0-11).
sentIdThe value of the SENT id.
typeInput or output of the SENT id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Theindex of the SENT id in the table or -1 if it cannot be foumd.

◆ ccurAsyncIO_sentGetSENTId()

SENTIdProperties * ccurAsyncIO_sentGetSENTId ( int boardId,
int boardNum,
int channelNum,
int sentId,
int type )

Return a pointerto of the specified SENT id record.

Parameters
boardIdThe board type where the SENT is defined. I.e. one of CP_SENT(80) or CP_FPGA_ArV (77) or CP_CMFIO (104) or CP_FPGA_ArX (110)
boardNumThe board number (first board is 0) where the SENT id is defined.
channelNumThe channel number (0-11).
sentIdThe value of the SENT id.
typeInput or output of the SENT id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values
Thepointer to the SENT id record on success. NULL if the record cannot be found.

◆ ccurRTDB_udpIOGetMessageTable()

UDPResidentMessage * ccurRTDB_udpIOGetMessageTable ( void )

Returns a pointer to the resident message table NETMessageTable.

Return values
Theaddress of the resident message table.
See also
NETMessageTable.

◆ ccurRTDB_udpIOInitMessageTable()

void ccurRTDB_udpIOInitMessageTable ( void )

Initialize NET message table.

◆ ccurRTDB_initDB()

int ccurRTDB_initDB ( int maxPoints,
int maxCVTSize,
int maxStringVariables )

Initialize the RTDB database and make room for a maximum of maxPoints items and a maximum of string variables.

Note
This call should only be used by the configuration server program. It will delete all the shared memory segments corresponding to the RTDB and recreate them with size necessary to hold the items specified.
Parameters
maxPointsThe maximum number of items we want to store in the RTDB including model parameters.
maxCVTEntriesThe maximum number of entries in the CVT and Alternate value tables.
maxStringVariablesThe maximum number of string variables that the RTDB will contain.
Return values
0On success.
-1On failure. errno will be set with error corresponding to the system call that failed.

◆ ccurRTDB_clearDB()

int ccurRTDB_clearDB ( void )

Clear the current RTDB in shared memory.
This will clear all the items in memory by clearing the hash table. Deallocating all the string variables and clearing the db name.

Return values
0Always.

◆ ccurRTDB_resetCVTtoZero()

void ccurRTDB_resetCVTtoZero ( void )


Reset CVT values of all the items defined in the currently loaded RTDB to zero.

◆ ccurRTDB_mapDB()

int ccurRTDB_mapDB ( )

Map the current RTDB in memory into the caller's address space.

Return values
0On success.
-1On failure. errno will be set with error corresponding to the system call that failed.

◆ ccurRTDB_getCVTTableAddress()

volatile void * ccurRTDB_getCVTTableAddress ( )

Return a pointer to the CVT table.

Return values
Pointerto the CVT in the process addressing space.

◆ ccurRTDB_getAlternateTableAddress()

volatile void * ccurRTDB_getAlternateTableAddress ( )

Return a pointer to the alternate value table.

Return values
Pointerto the alternate value table in the process addressing space.

◆ ccurRTDB_getRawTableAddress()

volatile void * ccurRTDB_getRawTableAddress ( )

Return a pointer to the raw value table.

Return values
Pointerto the raw value table in the process addressing space.

◆ ccurRTDB_getCVTSize()

int ccurRTDB_getCVTSize ( void )

Return the size of the CVT table.

Return values
Thesize of the CVT table in bytes.

◆ ccurRTDB_deleteItem()

int ccurRTDB_deleteItem ( const char * key)

Remove an item from the RTDB.

Parameters
keyThe name of the item to remove
Return values
0on success.
<0 RTDB_POINTNOTFOUND if the item is not in the RTDB.

◆ ccurRTDB_addItem()

int ccurRTDB_addItem ( const char * key,
RTDBItemMetaPair * itemMeta )

Add a RTDB item to the database.

Parameters
keyThe name of the item
itemMetaPointer to the item meta data to store in the RTDB.
Return values
>=0The index in RTDB of the newly allocated item.
<0 On failure ( RTDB_POINTEXISTS , RTDB_DBNOROOM )

◆ ccurRTDB_addSpareItem()

int ccurRTDB_addSpareItem ( int itemIndex,
int pointType,
int cvtType )

Add a spare RTDB item to the database. This only adds an entry into the spare item table but does not add it to the list of items in the RTDB. This ccurRTDB_addItem must be used prior to this.

Parameters
itemIndexThe index pRTDB where this item is at. This comes from a previous call to ccurRTDB_addItem.
pointTypeThe point type for this new item.
cvtTypeThe CVT type for this new item.
Return values
==0When successful. This routine only fails when the spare item table if full.
<0 On failure ( RTDB_DBNOROOM )

◆ ccurRTDB_takeSpareItem()

int ccurRTDB_takeSpareItem ( const char * newName,
int pointType,
int cvtType )

Rename a spare RTDB item in the RTDB to a new name and take it out of the spare item table.

Parameters
newNameThe name to use for the new item.
pointTypeThe point type defining the type of point to take .
cvtTypeThe CVT type for this new item.
Return values
>=i0 When successful. This routine only fails when the spare item table if full.
<0 On failure ( RTDB_POINTEXISTS when the newName already exists in the RTDB RTDB_NOSPAREITEM when no more spare items of the specified type are available. )

◆ ccurRTDB_renameItem()

int ccurRTDB_renameItem ( const char * oldName,
const char * newName )

Rename a RTDB item in the RTDB. This called is used by the data logger replay mechanism to rename RTDB items that have been created at run time.

Parameters
oldNameThe name of the item to be renamed.
newNameThe name to use for the new item.
Return values
>=i0 When successful. This routine only fails when the spare item table if full.
<0 On failure ( RTDB_POINTEXISTS when the newName already exists in the RTDB RTDB_POINTNOTFOUND when the old name is not found in the RTDB. )

◆ ccurRTDB_addHardwareConfig()

int ccurRTDB_addHardwareConfig ( const char * key,
HardwareConfig * cfg )

Add a HardwareConfig Record to the RTDB.

Parameters
keyThe name of the item
cfgPointer to the HardwareRecord in the RTDB.
Return values
>=0The index in HardwareConfig table of the newly allocated item.
<0 On failure ( RTDB_POINTEXISTS , RTDB_DBNOROOM )

◆ ccurRTDB_getCVTItemSize()

int ccurRTDB_getCVTItemSize ( const RTDBItem * p)

Return the size in byte of an item in the cvt based on its 'C' type.
String variables are not in the CVT and thus the size returned for string variables is '0'.

Parameters
pPointer to the RTDB item.
Return values
Thesize of the item.

◆ ccurRTDB_setStringValue()

int ccurRTDB_setStringValue ( const char * pointName,
StringVariableValue * value,
int length )

Set the value of a RTDB string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_setStringValueP()

int ccurRTDB_setStringValueP ( const RTDBItem * p,
StringVariableValue * value,
int length )

Set the value of a RTDB string variable by address.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pThe address of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_setStringAltValueP()

int ccurRTDB_setStringAltValueP ( const RTDBItem * p,
StringVariableValue * value,
int length )

Set the alternate value of a RTDB string variable by address.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pThe address of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_setStringAltValue()

int ccurRTDB_setStringAltValue ( const char * pointName,
StringVariableValue * value,
int length )

Set the alternate value of a RTDB string variable .

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_setStringDefaultValueP()

int ccurRTDB_setStringDefaultValueP ( RTDBItem * p,
StringVariableValue * value,
int length )

Set the default value of a RTDB string variable by address.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pThe address of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_setStringDefaultValue()

int ccurRTDB_setStringDefaultValue ( const char * pointName,
StringVariableValue * value,
int length )

Set the default value of a RTDB string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for setting the correct length associated with the variable. As such it is more a data buffer with associated length.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringDefaultValue()

int ccurRTDB_getStringDefaultValue ( const char * pointName,
StringVariableValue * value,
int * length )

Get the default value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringDefaultValueP()

int ccurRTDB_getStringDefaultValueP ( const RTDBItem * p,
StringVariableValue * value,
int * length )

Get the default value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pPointer to the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringValue()

int ccurRTDB_getStringValue ( const char * pointName,
StringVariableValue * value,
int * length )

Get the value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringValueP()

int ccurRTDB_getStringValueP ( const RTDBItem * p,
StringVariableValue * value,
int * length )

Get the value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pPointer to the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringValueLengthP()

int ccurRTDB_getStringValueLengthP ( const RTDBItem * p)

Get the length of a string variable.

Note
The string variable is not a type 'C' character string. It is not necessarily null terminated.
Parameters
pPointer to the RTDB item.
Return values
0The length of the string on success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringAltValue()

int ccurRTDB_getStringAltValue ( const char * pointName,
StringVariableValue * value,
int * length )

Get the alternate value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pointNameThe name of the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringAltValueP()

int ccurRTDB_getStringAltValueP ( const RTDBItem * p,
StringVariableValue * value,
int * length )

Get the alternate value of a string variable.

Note
The string variable is not a type 'C' character string. It is not null terminated, the user is responsible for checking the length of the buffer returned by this call. As such it is more a data buffer with associated length. In the case where the string has 0 byte length, the user supplied buffer will not be updated since 0 bytes are 'copied'. The user should initialize the data buffer to some known value before this call so that when the buffer is empty - length == 0 - the user buffer will have a defined value.
Parameters
pPointer to the RTDB item.
valuePointer to the value for the string variable.
lengthThe length in bytes of the data in the string variable.
Return values
0On success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getStringAltValueLengthP()

int ccurRTDB_getStringAltValueLengthP ( const RTDBItem * p)

Get the length of a string variable alternate value.

Note
The string variable is not a type 'C' character string. It is not necessarily null terminated.
Parameters
pPointer to the RTDB item.
Return values
0The length of the string on success.
<0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )

◆ ccurRTDB_getCVTValueDouble()

double ccurRTDB_getCVTValueDouble ( const char * pointName)

Return the CVT value of an RTDB item as a 'C' double.
If the RTDB item is an array, this routine always returns 0. Use ccurRTDB_getCVTValueP for non scalar RTDB items.

Parameters
pointNameThe name of the RTDB item.
Return values
TheCVT value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getCVTValuePDouble()

double ccurRTDB_getCVTValuePDouble ( const RTDBItem * p)

Return the CVT value of an RTDB item as a 'C' double.
If the RTDB item is an array, this routine always returns 0. Use ccurRTDB_getCVTValueP for non scalar RTDB items.

Parameters
pPointer to the RTDB item.
Return values
TheCVT value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getAlternateValueDouble()

double ccurRTDB_getAlternateValueDouble ( const char * pointName)

Return the alternate value of an RTDB item as a 'C' double.
If the RTDB item is an array, this routine always returns 0. Use ccurRTDB_getAlternateValue for non scalar RTDB items.

Parameters
pointNameThe name of the RTDB item.
Return values
Thealternate value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getAlternateValuePDouble()

double ccurRTDB_getAlternateValuePDouble ( const RTDBItem * p)

Return the alternate value of an RTDB item as a 'C' double.
If the RTDB item is an array, this routine always returns 0. Use ccurRTDB_getAlternateValueP for non scalar RTDB items.

Parameters
pPointer to the RTDB item.
Return values
Thealternate value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getCurrentValueDouble()

double ccurRTDB_getCurrentValueDouble ( const char * pointName)

Return the current value of an RTDB item as a 'C' double.
When the RTDB item is non-scalar, this routines always returns 0. The current value is always the CVT value for input points whereas for output points, the current value is the alternate value when either the alternate or operator flags is set.
If the item is not defined in the CVT. The alternate value is returned.
If it is an INPUT point, the value comes from the CVT since when overridden the I/O value goes into the alternate value. If it is OUTPUT point, it comes from the alternate value if the CVT value has been overridden (RTDBFL_ALTVALUE | RTDBFL_OPERATOR is set) and the alternate is the value used to do the physical output.

Parameters
pointNameThe name of the RTDB item.
Return values
TheCVT value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getCurrentValuePDouble()

double ccurRTDB_getCurrentValuePDouble ( const RTDBItem * p)

Return the current value of an RTDB item as a 'C' double.
When the RTDB item is non-scalar, this routines always returns 0. The current value is always the CVT value for input points whereas for output points, the current value is the alternate value when either the alternate or operator flags is set.
If the item is not defined in the CVT. The alternate value is returned.
If it is an INPUT point, the value comes from the CVT since when overridden the I/O value goes into the alternate value. If it is OUTPUT point, it comes from the alternate value if the CVT value has been overridden (RTDBFL_ALTVALUE | RTDBFL_OPERATOR is set) and the alternate is the value used to do the physical output.

Parameters
pPointer to the RTDB item.
Return values
TheCVT value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_setAlternateValueDouble()

void ccurRTDB_setAlternateValueDouble ( const char * pointName,
double varValue )

Set the Alternate value of an RTDB item. The value is passed to the call as a 'C' double. If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setAlternateValue to set the value for non scalar items.

Parameters
pointNameThe name of RTDB item.
varValueThe value to be set.

◆ ccurRTDB_setAlternateValuePDouble()

void ccurRTDB_setAlternateValuePDouble ( const RTDBItem * p,
double varValue )

Set the Alternate value of an RTDB item. The value is passed to the call as a 'C' double.
If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setAlternateValueP to set the value for non scalar items.

Parameters
pPointer to the RTDB item.
varValueThe value to be set.

◆ ccurRTDB_setCVTValueDouble()

void ccurRTDB_setCVTValueDouble ( const char * pointName,
double varValue )

Set the CVT value of an RTDB item. The value is passed to the call as a 'C' double. If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setCVTValue to set the value for non scalar items.

Parameters
pointNameThe name of the RTDB item.
varValueThe value to be set.

◆ ccurRTDB_setCVTValuePDouble()

void ccurRTDB_setCVTValuePDouble ( const RTDBItem * p,
double varValue )

Set the CVT value of an RTDB item. The value is passed to the call as a 'C' double. If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setCVTValueP to set the value for non scalar items.

Parameters
pPointer to the RTDB item.
varValueThe value to be set.

◆ ccurRTDB_setCurrentValueDouble()

void ccurRTDB_setCurrentValueDouble ( const char * pointName,
double varValue )

Set the current value of an RTDB item. The value is passed to the call as a 'C' double.
If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setCurrentValue to set the value for non scalar items.
The current value is always the CVT value for input points whereas for output points, the current value is the alternate value when either the alternate or operator flags is set.
If the item is not defined in the CVT. It will be stored in the alternate value.
If it is an INPUT point, it goes in the CVT since when overridden the I/O value goes in the alternate value. If it is OUTPUT point, it goes in the alternate value if the CVT value has been overridden (RTDBFL_ALTVALUE is set) and alternate is the value used to do the physical output.

Parameters
pointNameThe name of the RTDB item.
varValueThe value to be set.

◆ ccurRTDB_setCurrentValuePDouble()

void ccurRTDB_setCurrentValuePDouble ( const RTDBItem * p,
double varValue )

Set the current value of an RTDB item. The value is passed to the call as a 'C' double.
If the RTDB item is an array, this routine returns immediately. Use ccurRTDB_setCurrentValueP to set the value for non scalar items.
The current value is always the CVT value for input points whereas for output points, the current value is the alternate value when either the alternate or operator flags is set.
If the item is not defined in the CVT. It will be stored in the alternate value.
If it is an INPUT point, it goes in the CVT since when overridden the I/O value goes in the alternate value. If it is OUTPUT point, it goes in the alternate value if the CVT value has been overridden (RTDBFL_ALTVALUE is set) and alternate is the value used to do the physical output.

Parameters
pPointer to the RTDB item.
varValueThe value to be set.

◆ ccurRTDB_getRawValueDouble()

double ccurRTDB_getRawValueDouble ( const char * pointName)

Return the raw value of an RTDB item as a 'C' double

Parameters
pointNameThe name of the RTDB item.
Return values
Theraw value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getRawValuePDouble()

double ccurRTDB_getRawValuePDouble ( const RTDBItem * p)

Return the raw value of an RTDB item as a 'C' double

Parameters
pPointer to the RTDB item.
Return values
Theraw value of the RTDB item or 0 if the item is a string variable.

◆ ccurRTDB_getCVTValueP()

int ccurRTDB_getCVTValueP ( const RTDBItem * p,
ItemValueDef * value )

Return the CVT value of an RTDB item by address.

Parameters
pPointer to the RTDB item.
valuePointer to an ItemValueDef where the value is stored.
The array of values is allocated by this call (malloc) if value.numElements == 0 or < meta.numElements, otherwise it is assumed that the array pointed by value->value.Val.Array has already been allocated by the caller and is large enough to hold the item values. It is the responsibility of the caller to free this array when no longer needed. When preallocating the array value->value.numMallocedElements should be set to the number of elements for this item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_getCVTValuePMaxElements()

int ccurRTDB_getCVTValuePMaxElements ( const RTDBItem * p,
ItemValueDef * value,
int max )

Return the CVT value of an RTDB item by address.

Parameters
pPointer to the RTDB item.
valuePointer to an ItemValueDef where the value is stored.
maxThe maximum number of elements to return. This only applies to array type RTDB variables The array of values is allocated by this call (malloc) if value.numElements == 0 or < meta.numElements, otherwise it is assumed that the array pointed by value->value.Val.Array has already been allocated by the caller and is large enough to hold the item values. It is the responsibility of the caller to free this array when no longer needed. When preallocating the array value->value.numMallocedElements should be set to the number of elements for this item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_getCVTValuePScalar()

int ccurRTDB_getCVTValuePScalar ( const RTDBItem * p,
ItemValueDefScalar * value,
int index )

Return the CVT value of a scalar only RTDB item by address.

Parameters
pPointer to the RTDB item.
valuePointer to an ItemValueDef where the value is stored.
indexinto array. Use 0 for RTDB item defined as scalars.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_getCVTValue()

int ccurRTDB_getCVTValue ( const char * pointName,
ItemValueDef * value )

Return the CVT value of an RTDB item.

Parameters
pointNameThe name of the RTDB item.
valuePointer to an ItemValueDef where the value is stored.
The array of values is allocated by this call (malloc) if value.numElements == 0 or < meta.numElements, otherwise it is assumed that the array pointed to by value->value.Val.Array has already been allocated by the caller and is large enough to hold the item values. It is the responsibility of the caller to free this array when no longer needed. When preallocating the array value->value.numMallocedElements should be set to the number of elements for this item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_getAlternateValueP()

int ccurRTDB_getAlternateValueP ( const RTDBItem * p,
ItemValueDef * value )

Return the alternate value of an RTDB item by address.

Parameters
pThe address of the RTDB item.
valuePointer to an ItemValueDef where the value is stored. The array of values is allocated by this call (malloc) if value.numElements == 0 or < meta.numElements, otherwise it is assumed that the array pointed to by value->value.Val.Array has already been allocated by the caller and is large enough to hold the item values. It is the responsibility of the caller to free this array when no longer needed. When preallocating the array value->value.numMallocedElements should be set to the number of elements for this item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND

◆ ccurRTDB_getAlternateValuePScalar()

int ccurRTDB_getAlternateValuePScalar ( const RTDBItem * p,
ItemValueDefScalar * value,
int index )

Return the alternate value of a scalar RTDB item by address.

Parameters
pThe address of the RTDB item.
valuePointer to an ItemValueDef where the value is stored.
indexThe element value to return when this RTDB item is defined as an array. Use 0 for items that are defined as scalars.
Return values
0On success.
<0 RTDB_POINTNOTFOUND

◆ ccurRTDB_getAlternateValue()

int ccurRTDB_getAlternateValue ( const char * pointName,
ItemValueDef * value )

Return the alternate value of an RTDB item by name.

Parameters
pointNameThe name of the RTDB item.
valuePointer to an ItemValueDef where the value is stored. The array of values is allocated by this call (malloc) if value.numElements == 0 or < meta.numElements, otherwise it is assumed that the array pointed to by value->value.Val.Array has already been allocated by the caller and is large enough to hold the item values. It is the responsibility of the caller to free this array when no longer needed. When preallocating the array value->value.numMallocedElements should be set to the number of elements for this item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND

◆ ccurRTDB_setCVTValue()

int ccurRTDB_setCVTValue ( const char * pointName,
ItemValue * value )

Set the value for RTDB item pointName in the cvt table.

Parameters
pointNamethe name of the RTDB item.
valuepointer to the value for the item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_setCVTValueP()

int ccurRTDB_setCVTValueP ( const RTDBItem * p,
ItemValue * value )

Set the value for an RTDB item given by address in the cvt table.

Parameters
pPointer to the RTDB item.
valuepointer to the value for the item.
Return values
0On success.
<0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT

◆ ccurRTDB_setAlternateValueP()

int ccurRTDB_setAlternateValueP ( RTDBItem * p,
ItemValue * value )

Set the alternate value for RTDB item given its address.

Parameters
pPointer to the RTDB item.
valuepointer to the value for the item.
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND or RTDB_NOSTRINGVAR

◆ ccurRTDB_setAlternateValue()

int ccurRTDB_setAlternateValue ( char * pointName,
ItemValue * value )

Set the alternate value for RTDB item pointName.

Parameters
pointNameName of the RTDB item.
valuepointer to the value for the item.
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND or RTDB_NOSTRINGVAR

◆ ccurRTDB_setPointValueP()

int ccurRTDB_setPointValueP ( RTDBItem * p,
ItemValue * value )

Set the value for RTDB item by address. Only numeric value can be stored with this call.
If the item is not defined in the CVT. It will be stored in the alternate value.
If it is an INPUT point, it goes in the CVT since when overridden the I/O value goes in the alternate value. If it is OUTPUT point, it goes in the alternate value if the CVT value has been overridden (RTDBFL_ALTVALUE is set) and alternate is the value used to do the physical output.

Parameters
pThe address of the RTDB item.
valuepointer to the value for the item.
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND, RTDB_NOSTRINGVAR

◆ ccurRTDB_setAlternateFlag()

int ccurRTDB_setAlternateFlag ( const char * pointName,
int enable )

Set/Reset the Item Alternate flag.

Parameters
pointNameThe name of the RTDB item.
enableTrue to set the flag , false to reset the flag
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setAlternateFlagP()

int ccurRTDB_setAlternateFlagP ( RTDBItem * pItem,
int enable )

Set/Reset the Item Alternate flag.

Parameters
pItemThe address of the RTDB item.
enableTrue to set the flag , false to reset the flag
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setOperatorFlag()

int ccurRTDB_setOperatorFlag ( const char * pointName,
int enable )

Set/Reset the Item operator flag.

Parameters
pointNameThe name of the RTDB item.
enableTrue to set the flag , false to reset the flag
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setOperatorFlagP()

int ccurRTDB_setOperatorFlagP ( RTDBItem * pItem,
int enable )

Set/Reset the Item operator flag.

Parameters
pItemThe address of the RTDB item.
enableTrue to set the flag , false to reset the flag
Return values
0If set successfully.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_getNumberOfItems()

int ccurRTDB_getNumberOfItems ( void )

Return the number of RTDB items defined in the data base.

Return values
Thenumber of RTDB items that exist in the currently loaded RTDB.

◆ ccurRTDB_getMaxNumberOfItems()

int ccurRTDB_getMaxNumberOfItems ( void )

Return the maximum number of RTDB items that can be stored in the RTDB.

Return values
Themaximum number of RTDB items that are loaded in the RTDB.

◆ ccurRTDB_getMaxNumberOfStrings()

int ccurRTDB_getMaxNumberOfStrings ( void )

Return the maximum number of string RTDB items that can be stored in the RTDB.

Return values
Themaximum number of string RTDB items that are loaded in the RTDB.

◆ ccurRTDB_getFrameRate()

double ccurRTDB_getFrameRate ( void )

Return the frame rate in Hz the simulator is running at. This is the inverse of the frame length returned by ccurRTDB_getFrameLength .

Return values
Theframe rate.

◆ ccurRTDB_setFrameLength()

void ccurRTDB_setFrameLength ( int frameLength)

Set the frame length in micro seconds for this test (This is set by the scheduler when starting a test).

◆ ccurRTDB_getFrameLength()

int ccurRTDB_getFrameLength ( void )

Return the frame duration in micro seconds. This is set by the scheduler process at test start up and is defined by the parameters specified when the particular test session was created.

Return values
Thelength of the frame in micro seconds.

◆ ccurRTDB_getFrameCount()

unsigned int ccurRTDB_getFrameCount ( )

Return the current frame count of the running test.

Return values
Thevalue current frame count.

◆ ccurRTDB_incrementFrameCount()

void ccurRTDB_incrementFrameCount ( )

Increment the frame count of the running test.

◆ ccurRTDB_setFrameCount()

void ccurRTDB_setFrameCount ( unsigned int frameCount)

Set the frame count of the currently running.

Parameters
frameCountThe value of the frame count to set.

◆ ccurRTDB_setRunning()

void ccurRTDB_setRunning ( int running)

Set the simulator running flag to to running.

Parameters
running: 1 the scheduler has initialized, 2 the test is running This call does not start the test by itself. It simply sets a flags to indicate that a test is currently running.

◆ ccurRTDB_setStopped()

void ccurRTDB_setStopped ( )

Set the Simulator running flag to stop. This does not stop the test.

◆ ccurRTDB_isRunning()

int ccurRTDB_isRunning ( )

Return whether a test is currently running.

Return values
0for stopped
10for initializing
20for initialization complete
30for running
4for init script
5for I/O shutdown
6for test post-processing

◆ ccurRTDB_testGetStartTimeStamp()

unsigned long long ccurRTDB_testGetStartTimeStamp ( )

Return TSC time stamp for beginning of test run.

Return values
Thetime stamp as an unsigned long long.

◆ ccurRTDB_getItemMeta()

int ccurRTDB_getItemMeta ( const char * pointName,
RTDBItemMeta * meta )

Return the meta data descriptor for a RTDB item

Parameters
pointNamethe name of the RTDB item
metaPointer to a RTDBItemMeta where the routine stores the meta data.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setItemMeta()

int ccurRTDB_setItemMeta ( const char * pointName,
RTDBItemMeta * meta )

Set the item meta data.

Parameters
pointNameThe name of the item for which to set the meta data.
metaPointer to a RTDBItemMeta where the routine stores the meta data.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setLoggingFlagP()

int ccurRTDB_setLoggingFlagP ( RTDBItem * pItem)

Set the logging flag for the item.
Only RTDB items with the logging flag enabled can be logged at run time. Not to be confused with logging enable call which can toggle the logging at run time and thus turn logging on and off during a run. This call and ccurRTDB_resetLoggingFlag call can only be used during a script initialization phase. Items which do not have the logging flag set via this call or by configuring their logging behavior in the RTDB will never be logged during a run.

See also
ccurRTDB_resetLoggingFlag .
Parameters
pItemPointer to the item on which we set the logging flag.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setLoggingFlag()

int ccurRTDB_setLoggingFlag ( const char * pointName)

Set the logging flag for the item.
Only RTDB items with the logging flag enabled can be logged at run time. Not to be confused with logging enable call which can toggle the logging at run time and thus turn logging on and off during a run. This call and ccurRTDB_resetLoggingFlag call can only be used during a script initialization phase. Items which do not have the logging flag set via this call or by configuring their logging behavior in the RTDB will never be logged during a run.

See also
ccurRTDB_resetLoggingFlag .
Parameters
pointNameThe name of the RTDB item on which we set the logging flag.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_resetLoggingFlagP()

int ccurRTDB_resetLoggingFlagP ( RTDBItem * pItem)

Reset the logging flag for the item. Only RTDB items with the logging flag enabled will be logged at run time. Not to be confused with logging enable which can toggle the logging of an item at run time and thus turn logging on and off during a run.

Parameters
pItemPointer to the item on which we reset the logging flag.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_resetLoggingFlag()

int ccurRTDB_resetLoggingFlag ( const char * pointName)

Reset the logging flag for the item. Only RTDB items with the logging flag enabled will be logged at run time. Not to be confused with logging enable which can toggle the logging of an item at run time and thus turn logging on and off during a run.

Parameters
pointNameThe name of the RTDB item on which we reset the logging flag.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_setLoggingFlagAll()

int ccurRTDB_setLoggingFlagAll ( void )

Set the logging flag for all the items in the RTDB.

Warning
This function swipes through the entire RTDB and can be very slow depending on the size of the RTDB.
See also
ccurRTDB_resetToDefault
This function should only be called by user script at initialization before the data collecting processes initialize since after they determine which items have to be logged for a test run.
ccurRTDB_resetLoggingFlag .
Return values
0always.

◆ ccurRTDB_setLoggingEnable()

int ccurRTDB_setLoggingEnable ( const char * pointName,
char enable )

Toggle the dynamic logging flag for the specified point name.
This flag is automatically toggled at initialization for all points which are to be logged. I.e. those that have the logging flag on.

See also
ccurRTDB_setLoggingFlag. Also, this flag cannot be turned off during the initialization phase of a user script since the data logger waits for the script initialization routine (ccurCScript_init) to complete before setting the METAFL_ARCHIVEENABLE bit on.
This call will also turn the RTDBFL_ARCHIVEPAUSED real-time flags that is recorded by the data logger on/off so that the data extraction routine knows whether data logging for the specific item has been paused.
Parameters
pointNameThe name of the RTDB item on which we set the logging flag.
enableIf true, the point values will be logged. When false, logging is disabled.
Return values
0On success.
-1RTDB_POINTNOTFOUND On failure .

◆ ccurRTDB_setLoggingEnableP()

int ccurRTDB_setLoggingEnableP ( RTDBItem * pItem,
char enable )

Toggle the dynamic logging flag for the item whose address is supplied.
This flag is automatically toggled at initialization for all points which are to be logged. I.e. those that have the logging flag on.

See also
ccurRTDB_setLoggingFlag. Only items that have been configured with logging enabled when the RTDB is loaded can have their logging flag dynamically turned on or off at run time.
Also, this flag cannot be turned off during the initialization phase of a user script since the data logger waits for the script initialization routine (ccurCScript_init) to complete before setting the METAFL_ARCHIVEENABLE bit on.
This call will also turn the RTDBFL_ARCHIVEPAUSED real-time flags that is recorded by the data logger on/off so that the data extraction routine knows whether data logging for the specific item has been paused.
Parameters
pItemPointer to the RTDB item on which we set the logging flag.
enableIf true, the point values will be logged. When false, logging is disabled.
Return values
0On success.
<0 RTDB_POINTNOTFOUND On failure.

◆ ccurRTDB_resetToDefault()

int ccurRTDB_resetToDefault ( )


Reset all RTDB items in the database to their default value.

Warning
This function goes through all entries in the RTDB item hash table and can be very slow depending on the size of your RTDB. The hash table is over dimensioned with respect to the total number of items it can hold in order to minimize collisions and increase determinism on item searches. The maximum number of items in the RTDB is determined by cfgsrv at startup. The default is 25000 items.
and can be modified by passing -p number_of_items on the command line when starting cfgsrv.
The items that have the meta flags METAFL_HASDEFAULT are reset to the default value. The other items are set to 0. The items real-time flags is reset to 0.
Return values
0

◆ ccurRTDB_setRTDBInitialConditionValues()

int ccurRTDB_setRTDBInitialConditionValues ( void )

Set all RTDB items in the database to their initial condition value as determined by the initial condition set defined for the test.

Return values
0No error
-1if error opening the initial condition file.

◆ ccurRTDB_setRTDBInitCondLogging()

int ccurRTDB_setRTDBInitCondLogging ( void )

Set all logging enable/disbale defined by the initial condition set defined for the test.

Return values
0No error
-1if error opening the initial condition file.

◆ ccurRTDB_setRTDBShutDownValues()

int ccurRTDB_setRTDBShutDownValues ( void )

Set all RTDB items in the database to their shutdown values as determined by the initial condition set called ShutDown defined for the test.

Return values
0No error
-1if error opening the initial condition file.

◆ ccurRTDB_getDBMetaInfo()

int ccurRTDB_getDBMetaInfo ( RTDBMetaInfo * p)

Get a copy of the RTDB meta information structure

Parameters
pPointer to RTDBMetaIndo structure where the information is returned.
Return values
0When successful.
<0 RTDB_NOTMAPPED if the RTDB is not mapped in the caller addressing space.

◆ ccurRTDB_isDBLoaded()

int ccurRTDB_isDBLoaded ( )

Check whether the RTDB has been loaded from file.

Return values
1If a DB is loaded in memory.
0If a DB is not loaded in memory.

◆ ccurRTDB_setDBLoaded()

void ccurRTDB_setDBLoaded ( int b)

Set a DB is loaded in memory.

Parameters
bboolean that indicates whether a RTDB is loaded into shared memory.

◆ ccurRTDB_setDBName()

void ccurRTDB_setDBName ( const char * dbName)

Set the name of the RTDB that is loaded into memory.

Parameters
dbNameNULL terminated string with the name of RTDB.

◆ ccurRTDB_setDBOffset()

void ccurRTDB_setDBOffset ( const char * dbName,
int offset )

Set the byte offset where this RTDB is loaded.

Parameters
dbNameNULL terminated string with the name of RTDB.
offsetinteger with the offset for the RTDB.

◆ ccurRTDB_getDBOffset()

int ccurRTDB_getDBOffset ( const char * dbName)

Get the byte offset where this RTDB is loaded.

Parameters
dbNameNULL terminated string with the name of RTDB.
Returns
The offset where this RTDB is loaded

◆ ccurRTDB_isDBNameLoaded()

int ccurRTDB_isDBNameLoaded ( const char * dbName)

Return whether this RTDB has already been loaded.

Parameters
dbNameNULL terminated string with the name of RTDB.
Returns
True if this RTDB has been loaded already.

◆ ccurRTDB_setBoardDB()

int ccurRTDB_setBoardDB ( int boardId,
int boardNum,
const char * dbName )

Set the name of the RTDB where the hardwarerecord for this boardId and board instance was found.

Parameters
boardIdThe boardId.
boardNumThe board instance.
dbNameNULL terminated string with the name of RTDB.
Returns
-1 if this board is already in use by another RTDB that has been loaded. -2 if there is no room in the table for this board.0 otherwise.

◆ ccurRTDB_getBoardDB()

const char * ccurRTDB_getBoardDB ( int boardId,
int boardNum )

Return the name of the RTDB corresponding to this boardId and board instance.

Parameters
boardIdThe boardId.
boardNumThe board instance.

◆ ccurRTDB_setDBDescription()

void ccurRTDB_setDBDescription ( const char * dbDescription)

Set the data base description for the RTDB loaded into memory .

Parameters
dbDescriptionA NULL terminated string with the text for the RTDB description/comments.

◆ ccurRTDB_setDBCheckSum()

void ccurRTDB_setDBCheckSum ( unsigned int cks)

Set the data base checksum value.

Parameters
cksvalue of the calculated checksum for the RTDB.

◆ ccurRTDB_getDBCheckSum()

unsigned int ccurRTDB_getDBCheckSum ( void )

Get the checksum value of the currently loaded RTDB. This value is calculated at startup time by the scheduler process when reading in the RTDB file signal.db

◆ ccurRTDB_setTestSession()

void ccurRTDB_setTestSession ( const char * testId,
const char * sessionId )

Set the the test and session id for the currently running test

Parameters
testIdNULL terminated string with the test id.
sessionIdNULL terminated string withe the session id.

◆ ccurRTDB_setSnapshotConfig()

void ccurRTDB_setSnapshotConfig ( const char * snapshotNameTemplate,
int snapshotFormat,
int snapshotMask,
const char * snapshotNameMask )

Set the the RTDB snapshot configuration for the running test. This is set by the scheduler when loading the test.

Parameters
snapshotNameTemplateTemplate name for the snapshot file name.
snapshotFormatThe format to save the snapshot in. One of CAPTURE_CSV, CAPTURE_MAT,etc.
snapshotMaskA mask of SNAPSHOT)PARAMETERS, SNAPSHOT_SIGNALS, etc to select what type of RTDB items to write to the file.
snapshotNameMaskA regular expression matching the name of the items to write to the file.

◆ ccurRTDB_getTestSession()

void ccurRTDB_getTestSession ( char * testId,
char * sessionId )

Get the the test and session id for the currently running test.

Parameters
testIdBuffer address then the test id is returned.
sessionIdBuffer address then the session id is returned.

◆ ccurRTDB_getSnapshotConfig()

void ccurRTDB_getSnapshotConfig ( char * snapshotNameTemplate,
int * snapshotFormat,
int * snapshotMask,
char * snapshotNameMask )

Get the the RTDB snapshot configuration for the running test.

Parameters
snapshotNameTemplateTemplate name for the snapshot file name.
snapshotFormatThe format to save the snapshot in. One of CAPTURE_CSV, CAPTURE_MAT,etc.
snapshotMaskA mask of SNAPSHOT)PARAMETERS, SNAPSHOT_SIGNALS, etc to select what type of RTDB items to write to the file.
snapshotNameMaskA regular expression matching the name of the items to write to the file.

◆ ccurRTDB_setTestInitCondition()

void ccurRTDB_setTestInitCondition ( const char * initCondName)

Set the the test initial conditions set name.

Parameters
initCondNameNULL terminated string with the initial conditions name.

◆ ccurRTDB_getTestInitCondition()

void ccurRTDB_getTestInitCondition ( char * initCondName)

Get the the test initial conditions set name.

Parameters
initCondNameNULL terminated string with the initial conditions name.

◆ ccurRTDB_resumeDLogger()

void ccurRTDB_resumeDLogger ( )

Resume the Data logger client.

◆ ccurRTDB_pauseDLogger()

void ccurRTDB_pauseDLogger ( )

Pause the Data logger client.

◆ ccurRTDB_newItemDLogger()

void ccurRTDB_newItemDLogger ( int newHashIndex,
char * oldName )

Notify the Data logger that a spare item has been renamed.

◆ ccurRTDB_stopCircularLogger()

void ccurRTDB_stopCircularLogger ( )

Stop the crash loop circular logger. Once it has been stopped, this circular logger cannot be restarted.

◆ ccurRTDB_isDLoggerRunning()

int ccurRTDB_isDLoggerRunning ( )

Check whether the data logger client is running.

Return values
1if the data logger is running
0if the data logger is not running. We might be in playback mode.

◆ ccurRTDB_isCLoggerRunning()

int ccurRTDB_isCLoggerRunning ( )

Check whether the circular logger is running. By default the circular logger is always running until stopped.

Return values
1if the circular data logger is running
0if the circular data logger is not running. We might be in playback mode.

◆ ccurRTDB_setCircularLoggerLockBehavior()

void ccurRTDB_setCircularLoggerLockBehavior ( int behavior)

Set how the data logger is to behave with respect to treating locking of circular logger files.

Parameters
behaviorBehavior for the data logger lock. One of CIRCLOGGER_XXX

◆ ccurRTDB_getCircularLoggerLockBehavior()

int ccurRTDB_getCircularLoggerLockBehavior ( void )

Get the behavior of the data logger locking of circular logger files.

Return values
integerwith lock behavior. One of CIRCLOGGER_XXX.

◆ ccurRTDB_setDataLoggerDirectIO()

void ccurRTDB_setDataLoggerDirectIO ( int directIO)

Set whether to do direct I/O in the data logger. When direct I/O is set (the default). The data logger buffers around 1 second of data before writing to disk. This means that the data is no available until after the buffers have filled and have been flushed. When direct I/O is not on, the O/S buffers the write to disk and this might end up consuming a lot of system memory.

◆ ccurRTDB_getDBName()

void ccurRTDB_getDBName ( char * dbName)

Returns the data base name that is currently loaded.

Parameters
dbNamestring pointer where the DB name is placed.

◆ ccurRTDB_getItemList()

int ccurRTDB_getItemList ( RTDBItemPairPtr * list,
int * n,
int pointType,
const char * pattern )


Return a list of RTDB <name,pointer> pairs where the item name matches the regular expression pattern.

Warning
This functions reads the whole RTDB and can be potentially slow. It should not be used in a real-time context.
Parameters
listPointer to a RTDBItemPairPtr where to store the list of items. This is allocated by the call.
nPointer to an integer variable where the number of items matching the pattern is returned.
pointTypeThe type of point to match against, i.e. RTDBAI or -1 to match any point type.
patternA regular expression pattern to match the item name against. e.g. "^I.*" to get all the items beginning with 'I'. This is a deprecated parameter and is not used anymore, it is kept in here to maintain the method signature.
Return values
0On success.

◆ ccurRTDB_getItemName()

const char * ccurRTDB_getItemName ( const RTDBItem * p)

Get the name of the RTDB item .

Parameters
pThe address of the RTDB item for which we want the name.
Return values
Apointer to the item name On success.
NULLif the item cannot be found in the RTDB item table.

◆ ccurRTDB_getItemAddress()

int ccurRTDB_getItemAddress ( const char * name,
RTDBItem ** p )

Get the address of the RTDB item name

Parameters
nameThe name of the item to get the address of
pThe address of the RTDB item is returned here if the call is successful.
Return values
0On success.
<0 If the point could not be found; RTDB_POINTNOTFOUND.

◆ ccurRTDB_getItemCVTValueAddress()

void * ccurRTDB_getItemCVTValueAddress ( const char * name)

Get the address of the item value in the CVT table.
The pointer can be derefenced if the user knows the datatype (i.e. char,float.double,etc.) of the RTDB item.

// Sample code
double *pVal = curRTDB_getItemCVTValueAddress("autotrans_demo.SWthrottle");
if (pVal == NULL) {
Log_Error("Can't find RTDB item 'autotrans_demo.SWthrottle'\n");
return -1;
}
// Assuming that autotrans_demo.SWthrottle is defined as a CVT type 'double'
double throttle = *pVal;
#define Log_Error(format,...)
Definition simerrors.h:859
Parameters
nameThe name of the item to get the address of
Return values
NULLOn error if the item name cannot be found.
Theaddress of the CVT value.

◆ ccurRTDB_getItemAltValueAddress()

void * ccurRTDB_getItemAltValueAddress ( const char * name)

Get the address of the item value in the Alternate value table.
The pointer can be derefenced if the user knows the datatype (i.e. char,float.double,etc.) of the RTDB item.

// Sample code
double *pVal = ccurRTDB_getItemAltValueAddress("autotrans_demo.SWthrottle");
if (pVal == NULL) {
Log_Error("Can't find RTDB item 'autotrans_demo.SWthrottle'\n");
return -1;
}
// Assuming that autotrans_demo.SWthrottle is defined as a CVT type 'double'
double throttle = *pVal;
void * ccurRTDB_getItemAltValueAddress(const char *name)
Definition rtdbutils.c:6087
Parameters
nameThe name of the item to get the address of
Return values
NULLOn error if the item name cannot be found.
Theaddress of the alternate value.

◆ ccurRTDB_regexItemAddress()

int ccurRTDB_regexItemAddress ( const char * regex,
RTDBItem ** p,
char * name )

Get the address of the RTDB item matching regular expression regex.
The matching is case-sensitive. See the manpage for regex(7).

Parameters
regexThe regular expression to match item names against.
pThe address of the RTDB item when a unique match is found.
nameWhen not NULL, buffer to hold the item name when found.
Return values
>=0number of matched items.
-1regex compile/match error (see cfgsrv.log for details).
<-1Error code corresponding to an internal API call failure.

◆ ccurRTDB_globItemAddress()

int ccurRTDB_globItemAddress ( const char * glob,
RTDBItem ** p,
char * name )

Get the address of the RTDB item matching a glob pattern.
The matching is case-sensitive. See the manpage for glob(7).

Parameters
globThe glob pattern to match item names against.
pThe address of the RTDB item when a unique match is found.
nameWhen not NULL, buffer to hold the item name when found.
Return values
>=0number of matched items.
-1pattern matching error (see cfgsrv.log for details).
<-1Error code corresponding to an internal API call failure.

◆ ccurRTDB_getHardwareConfigAddress()

int ccurRTDB_getHardwareConfigAddress ( const char * name,
HardwareConfig ** p )

Get the address of the hardware mapping record /

Parameters
nameThe name of the record to get the address of.
pThe address of the Hardware Config record is returned here if the call is successful.
Return values
0On success.
<0 If the record could not be found; RTDB_POINTNOTFOUND.

◆ ccurRTDB_getEUConversionAddress()

int ccurRTDB_getEUConversionAddress ( const char * name,
EUConversion ** p )

Get the address of the EU conversion record record /

Parameters
nameThe name of the EU conversion record to get the address of.
pThe address of the EU conversion record is returned here if the call is successful.
Return values
0On success.
<0 If the EU record could not be found; RTDB_POINTNOTFOUND.

◆ ccurRTDB_resolveIOMappings()

int ccurRTDB_resolveIOMappings ( const char * name,
RTDBItem * pItem,
char * errString )

Resolve the I/O mappings for the given items. The name of the mapped hardware records is in meta.HardwareRecord[]. This will free the memory allocate for the record name and also reserve memory for the raw values by setting a value to RTDBItemMEta.rawOffset[].

Parameters
nameThe name of the item since it is not in the RTDBItemMeta and we need to print an error message.
pItemPointer to the item for which to resolve the mappings.
errStringpointer where the error message is returned.
Return values
0No error, all the I/O mappings for the item were resolved successfully.
-1On error. The hardware record name could not be resolved or the pointer to the item is null.

◆ ccurRTDB_resolveEUConversion()

int ccurRTDB_resolveEUConversion ( const char * name,
RTDBItem * pItem,
char * errString )

Resolve the EU conversion from name to hash index for the given item. This will free the memory allocate for the record name.

Parameters
nameThe name of the item since it is not in the RTDBItemMeta and we need to print an error message.
pItemPointer to the item for which to resolve the EU conversion.
errStringpointer where the error message is returned.
Return values
0No error, all the EU conversion record for the item was resolved successfully.
-1On error. The EU conversion record name could not be resolved or the pointer to the item is null.

◆ ccurRTDB_getItemIndex()

int ccurRTDB_getItemIndex ( const char * name)

Get the hash table index of the named RTDB item

Parameters
nameThe name of the item to get the address of
Return values
>=0 The hash index On success.
-1if the named item was not found.

◆ ccurRTDB_getHardwareConfigIndex()

int ccurRTDB_getHardwareConfigIndex ( const char * name)

Get the hash table index of the named Hardware Config Record item

Parameters
nameThe name of the item to get the address of
Return values
>=0 The hash index On success.
-1if the named record was not found.

◆ ccurRTDB_itemIndexToAddress()

RTDBItem * ccurRTDB_itemIndexToAddress ( int index)
inline

Return the address of a RTDB item given its hash table index.
This is useful to pass item reference between applications with different address space. The index of an item is immutable in the RTDB but the address of the item is not because it belongs to the process address space.

Parameters
indexThe hash table index of the item.
Return values
Theaddress of the item.

◆ ccurRTDB_hardwareConfigIndexToAddress()

HardwareConfig * ccurRTDB_hardwareConfigIndexToAddress ( int index)
inline

Return the address of a HardwareConfig record given its hash table index.
This is usefully to pass item reference between applications with different address space. The index of an item is immutable in the RTDB but the address of the item is not because it belongs to the process address space.

Parameters
indexThe hash table index of the item.
Return values
Theaddress of the HardwareConfig record.

◆ ccurRTDB_setLoggedUser()

void ccurRTDB_setLoggedUser ( const char * userName)

Set the name of the logged user that is starting a test.

Parameters
userNamePointer to the user name
Return values
None

◆ ccurRTDB_getLoggedUser()

const char * ccurRTDB_getLoggedUser ( void )

Return the name of the logged user.

Return values
Pointerto the logged user name.

◆ ccurRTDB_scriptInitStdIO()

void ccurRTDB_scriptInitStdIO ( void )

Initialize the Script standard IO shared memory.

◆ ccurRTDB_getScriptStdIOAddress()

ScriptStdIO * ccurRTDB_getScriptStdIOAddress ( void )

Return the address in the caller's address of the Script standard IO shared memory.

Return values
Theaddress of the Script shared memory.

◆ ccurRTDB_writeStdOut()

int ccurRTDB_writeStdOut ( char * str)

Write data to the script pseudo standard out.

Parameters
strCharacter buffer where to output.
Return values
Alwaysreturns 0

◆ ccurRTDB_euPhysicalToRaw()

double ccurRTDB_euPhysicalToRaw ( RTDBItemMeta * meta,
double euValue )
inline

Convert a value from physical engineering units to raw value.

Parameters
metaPointer to the RTDBItemMeta for the item.
euValuethe physical value to convert to raw units.
Return values
Theconverted value.

◆ ccurRTDB_euRawToPhysical()

double ccurRTDB_euRawToPhysical ( RTDBItemMeta * meta,
double rawValue )
inline

Convert a value from raw units to physical engineering units .
If the conversion cannot be inverted because the polynomial conversion is non linear, euConversionError is set and the rawValue is returned.

Parameters
metaPointer to the RTDBItemMeta for the item.
rawValuethe raw value to convert.
Return values
Theconverted value.

◆ ccurRTDB_asyncGetLastRXIntervalP()

int ccurRTDB_asyncGetLastRXIntervalP ( const RTDBItem * pItem)

Returns the interval in micro seconds between the last 2 updates of the point into the RTDB.
This is only valid for input points mapped to asynchronous devices such as ARINC 429 or AFDX.
It is used to check that the transmitting device is transmitting at a regular interval.

Deprecated
Replaced with ccurAsyncIO_asyncGetLastRXIntervalP()

◆ ccurRTDB_asyncGetLastRXInterval()

int ccurRTDB_asyncGetLastRXInterval ( const char * pointName)

Returns the interval in micro seconds between the last 2 updates of the point into the RTDB.
This is only valid for input points mapped to asynchronous devices such as ARINC 429 or AFDX.
It is used to check that the transmitting device is transmitting at a regular interval.

Deprecated
Replaced with ccurAsyncIO_asyncGetLastRXInterval()

◆ ccurRTDB_asyncGetTimeSinceLastRXP()

int ccurRTDB_asyncGetTimeSinceLastRXP ( const RTDBItem * pItem)

Returns the number of micro seconds elapsed since the specified data point was last updated in the RTDB.
This is only valid for input points mapped to asynchronous devices such as ARINC 429 or AFDX.
It is used to check that the transmitting device has not timed out.

Deprecated
Replaced with ccurAsyncIO_asyncGetTimeSinceLastRXP()

◆ ccurRTDB_asyncGetTimeSinceLastRX()

int ccurRTDB_asyncGetTimeSinceLastRX ( const char * pointName)

Returns the number of micro seconds elapsed since the specified data point was last updated in the RTDB.
This is only valid for input points mapped to asynchronous devices such as ARINC 429 or AFDX.
It is used to check that the transmitting device has not timed out.

Deprecated
Replaced with ccurAsyncIO_asyncGetTimeSinceLastRX()

◆ ccurRTDB_asyncGetRXTimeStampP()

unsigned long long ccurRTDB_asyncGetRXTimeStampP ( const RTDBItem * pItem)

Returns the time stamp in hardware ticks (_rdtsc()) when the last update on the point took place.
This is only valid for input points mapped to asynchronous devices such as ARINC 429 or AFDX.

Deprecated
Replaced with ccurAsyncIO_asyncGetRXTimeStampP()

◆ ccurRTDB_formImport()

void ccurRTDB_formImport ( const char * formName,
char inputsOnly )

Import the values defined in a form into the RTDB of a running test.

Parameters
formNameThe name of the form.
inputsOnlyIf non-zero, only set the values of items defined as input

◆ ccurRTDB_formCapture()

int ccurRTDB_formCapture ( const char * formName,
const char * nameTemplate,
int captureType,
double period,
int runCount )

Capture values of RTDB items and save to a file. The set of items is defined by the RTViewer form name.

Parameters
formNameThe name of the form that defines the items to be captured.
nameTemplateA template to form the name of the capture file. The template can contains predefined tokens such as:
$testname $sessionname $formname $date $time $framecount $seqnum
captureTypeDefine the format to write the capture file: one of (0 == CSV, 1 == Initial Condition, 2 == RTForm, 3 == MAT file)
periodThe period in seconds when capturing multiple records, only apply for CSV.
runCountThe number of records to capture , only apply for CSV.

◆ ccurRTDB_snapshot()

void ccurRTDB_snapshot ( void )

Take a snapshot of the RTDB loaded in memory.
Group of items can be selected. See Control Center documentation for more info

◆ ccurRTDB_addUnit()

int ccurRTDB_addUnit ( int uClass,
const char * name,
double A,
double B )

Add a Unit to the database.

Parameters
uClassThe unit class.
nameThe unit name.
AThe A conversion factor to convert to the base unit of the class.
BThe B conversion factor to convert to the base unit of the class.
Return values
>=0The index in RTDB of the newly allocated item.
<0 On failure

◆ ccurRTDB_mapModelCVT()

int ccurRTDB_mapModelCVT ( const char * pgmName,
void * cvtTable,
int cvtSize )

Map a user Model CVTTABLE struct at the offset at which it has been loaded. This applies when multiple RTDB's are loaded by the scheduler.
Group of items can be selected. See Control Center documentation for more info

Parameters
pgmNameString with the user model name. Usually argv[0] from the command line.
cvtTableThe address of the CVTTable struct.
cvtSizeThe size of the CVTTable struct
Returns
-1 in case of failure.

◆ ccurRTDB_modelDataExchangeInit()

int ccurRTDB_modelDataExchangeInit ( const char * modelName)

Initialize the data structure necessary to support model data exchange.

Parameters
modelNameString with the user model name. Usually argv[1] from the command line.
Returns
-1 in case of failure.

◆ ccurRTDB_modelCopyInputs()

void ccurRTDB_modelCopyInputs ( void )

Copy the output variables from other models to this model's inputs. This call should be placed in the simulation loop after the ccurSched_waitNextFrame() call. This call will perform unit conversion between the output items from other models and inputs into this model. If model exchange has not been configured for this model, nothing happens and this call returns immediately.