SIMulation Workbench Documentation SIMulation Workbench Documentation

RTDB Access API
[SimWB RT functions]

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  IOAFDXVirtualLink
struct  IORS232Message
struct  IOFlexRayMessage
struct  IOMemoryRegion
struct  IOArionObject
struct  IORtadbMessage
struct  IOBoardDef
struct  ScriptStdIO

Defines

#define MAX_NAMESPACE   128
#define NI_BOARD_MASK   0x100

Typedefs

typedef struct RTDBItemPairRTDBItemPairPtr
typedef char ItemName [MAX_TAGLEN]

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.


Define Documentation

#define MAX_NAMESPACE   128

Utility object to retrieve initial condition for data items.

#define NI_BOARD_MASK   0x100

The board identification.


Typedef Documentation

typedef struct RTDBItemPair* RTDBItemPairPtr
typedef char ItemName[MAX_TAGLEN]

Utility object that defines the name of an RTDB item.


Enumeration Type Documentation

enum PointType

Type of data points supported in the RTDB.

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

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

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

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 
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

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)

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.

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.

Links speed for ARINC 429 channel.

Enumerator:
SPEED_LOW 
SPEED_HIGH 

Parity for ARINC 429 channel

Enumerator:
PARITY_NONE 
PARITY_EVEN 
PARITY_ODD 

Serial type for serial device

Enumerator:
RS_232 
RS_422 
RS_423 
RS_485 

Function Documentation

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()
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()
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()
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()
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()
AFDXResidentMessage* ccurRTDB_afdxGetMessageTable ( void   ) 

Returns a pointer to the resident message table AFDXMessageTable.

Return values:
The address of the resident message table.
See also:
AFDXMessageTable.
Return values:
< 0 RTDB_AFDXMSGNOTFOUND if message was not found in table.
void ccurRTDB_afdxInitMessageTable ( void   ) 

Initialize afdx message table.

void ccurRTDB_arinc429InitTable ( void   ) 

Initialize CAN message table.

ARINC429LabelProperties* ccurRTDB_arinc429GetLabelTable ( void   ) 

Returns a pointer to the ARINC429 label table .

Return values:
The address 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) .
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:
boardId integer with the board Id. Either ARINC429 or BTI_Lx429 or DD_429_92
boardNum The board number (first board is 1) where the label is defined.
channelNum The channel number (0-15).
labelNum The label number.
Return values:
The index of the specified label in the table or -1 if it cannot be foumd.
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()
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()
void ccurRTDB_canInitTable ( void   ) 

Initialize CAN message table.

CANIdProperties* ccurRTDB_canGetCANIdTable ( void   ) 

Returns a pointer to the CAN Id's table .

Return values:
The address 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) .
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:
boardId The board type where the CAN is defined. I.e. one of CANIO_ESD405(15) or CANIO_PEAK (21).
boardNum The board number (first board is 1) where the CAN is defined.
netNum The net number (0-3).
canId The CAN id.
type Input or output of the CAN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The index of the CAN id in the table or -1 if it cannot be foumd.
CANIdProperties* ccurAsyncIO_canGetCANId ( int  boardId,
int  boardNum,
int  netNum,
int  canId,
int  type 
)

Return a pointerto of the specified CAN id record.

Parameters:
boardId The board type where the CAN is defined. I.e. one of CANIO_ESD405(15) or CANIO_PEAK (21).
boardNum The board number (first board is 0) where the CAN is defined.
netNum The net number (0-3).
canId The CAN id.
type Input or output of the CAN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The pointer to the CAN id record on success. NULL if the record cannot be found.
CIGIResidentMessage* ccurRTDB_cigiIOGetMessageTable ( void   ) 

Returns a pointer to the resident message table CIGIMessageTable.

Return values:
The address of the resident message table.
See also:
CIGIMessageTable.
void ccurRTDB_cigiIOInitMessageTable ( void   ) 

Initialize CIGI message table.

FDXResidentMessage* ccurRTDB_fdxIOGetMessageTable ( void   ) 

Returns a pointer to the resident message table FDXMessageTable.

Return values:
The address of the resident message table.
See also:
FDXMessageTable.
void ccurRTDB_fdxIOInitMessageTable ( void   ) 

Initialize FDX message table.

void ccurRTDB_linInitTable ( void   ) 

Initialize LIN message table.

LINIdProperties* ccurRTDB_linGetLINIdTable ( void   ) 

Returns a pointer to the LIN Id's table .

Return values:
The address 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) .
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:
boardId The board type where the LIN is defined. I.e. one of BABY_LIN(72) .
boardNum The board number (first board is 1) where the LIN is defined.
netNum The net number (0-3).
frameId The LIN frame id.
type Input or output of the LIN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The index of the LIN id in the table or -1 if it cannot be foumd.
LINIdProperties* ccurAsyncIO_linGetLINId ( int  boardId,
int  boardNum,
int  netNum,
int  canId,
int  type 
)

Return a pointerto of the specified LIN id record.

Parameters:
boardId The board type where the LIN is defined. I.e. one of BABY_LIN(72) .
boardNum The board number (first board is 0) where the LIN is defined.
netNum The net number (0-3).
canId The LIN id.
type Input or output of the LIN id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The pointer to the LIN id record on success. NULL if the record cannot be found.
NETResidentMessage* ccurRTDB_netIOGetMessageTable ( void   ) 

Returns a pointer to the resident message table NETMessageTable.

Return values:
The address of the resident message table.
See also:
NETMessageTable.
void ccurRTDB_netIOInitMessageTable ( void   ) 

Initialize NET message table.

void ccurRTDB_sentInitTable ( void   ) 

Initialize SENT message table.

SENTIdProperties* ccurRTDB_sentGetSENTIdTable ( void   ) 

Returns a pointer to the SENT Id's table .

Return values:
The address 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) .
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:
boardId The 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)
boardNum The board number (first board is 1) where the SENT id is defined.
channelNum The channel number (0-11).
sentId The value of the SENT id.
type Input or output of the SENT id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The index of the SENT id in the table or -1 if it cannot be foumd.
SENTIdProperties* ccurAsyncIO_sentGetSENTId ( int  boardId,
int  boardNum,
int  channelNum,
int  sentId,
int  type 
)

Return a pointerto of the specified SENT id record.

Parameters:
boardId The 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)
boardNum The board number (first board is 0) where the SENT id is defined.
channelNum The channel number (0-11).
sentId The value of the SENT id.
type Input or output of the SENT id. Must be SimWB_DIR_INPUT or SimWB_DIR_OUTPUT.
Return values:
The pointer to the SENT id record on success. NULL if the record cannot be found.
UDPResidentMessage* ccurRTDB_udpIOGetMessageTable ( void   ) 

Returns a pointer to the resident message table NETMessageTable.

Return values:
The address of the resident message table.
See also:
NETMessageTable.
void ccurRTDB_udpIOInitMessageTable ( void   ) 

Initialize NET message table.

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:
maxPoints The maximum number of items we want to store in the RTDB including model parameters.
maxCVTEntries The maximum number of entries in the CVT and Alternate value tables.
maxStringVariables The maximum number of string variables that the RTDB will contain.
Return values:
0 On success.
-1 On failure. errno will be set with error corresponding to the system call that failed.
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:
0 Always.
void ccurRTDB_resetCVTtoZero ( void   ) 

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

int ccurRTDB_mapDB (  ) 

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

Return values:
0 On success.
-1 On failure. errno will be set with error corresponding to the system call that failed.
volatile void* ccurRTDB_getCVTTableAddress (  ) 

Return a pointer to the CVT table.

Return values:
Pointer to the CVT in the process addressing space.
volatile void* ccurRTDB_getAlternateTableAddress (  ) 

Return a pointer to the alternate value table.

Return values:
Pointer to the alternate value table in the process addressing space.
volatile void* ccurRTDB_getRawTableAddress (  ) 

Return a pointer to the raw value table.

Return values:
Pointer to the raw value table in the process addressing space.
int ccurRTDB_getCVTSize ( void   ) 

Return the size of the CVT table.

Return values:
The size of the CVT table in bytes.
int ccurRTDB_deleteItem ( const char *  key  ) 

Remove an item from the RTDB.

Parameters:
key The name of the item to remove
Return values:
0 on success.
< 0 RTDB_POINTNOTFOUND if the item is not in the RTDB.
int ccurRTDB_addItem ( const char *  key,
RTDBItemMetaPair itemMeta 
)

Add a RTDB item to the database.

Parameters:
key The name of the item
itemMeta Pointer to the item meta data to store in the RTDB.
Return values:
>=0 The index in RTDB of the newly allocated item.
< 0 On failure ( RTDB_POINTEXISTS , RTDB_DBNOROOM )
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:
itemIndex The index pRTDB where this item is at. This comes from a previous call to ccurRTDB_addItem.
pointType The point type for this new item.
cvtType The CVT type for this new item.
Return values:
==0 When successful. This routine only fails when the spare item table if full.
< 0 On failure ( RTDB_DBNOROOM )
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:
newName The name to use for the new item.
pointType The point type defining the type of point to take .
cvtType The CVT type for this new item.
Return values:
>=i 0 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. )
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:
oldName The name of the item to be renamed.
newName The name to use for the new item.
Return values:
>=i 0 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. )
int ccurRTDB_addHardwareConfig ( const char *  key,
HardwareConfig cfg 
)

Add a HardwareConfig Record to the RTDB.

Parameters:
key The name of the item
cfg Pointer to the HardwareRecord in the RTDB.
Return values:
>=0 The index in HardwareConfig table of the newly allocated item.
< 0 On failure ( RTDB_POINTEXISTS , RTDB_DBNOROOM )
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:
p Pointer to the RTDB item.
Return values:
The size of the item.
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p The address of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p The address of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p The address of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p Pointer to the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p Pointer to the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p Pointer to the RTDB item.
Return values:
0 The length of the string on success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p Pointer to the RTDB item.
value Pointer to the value for the string variable.
length The length in bytes of the data in the string variable.
Return values:
0 On success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
p Pointer to the RTDB item.
Return values:
0 The length of the string on success.
< 0 On failure (RTDB_POINTNOTFOUND , RTDB_NOTSTRINGVAR , RTDB_NOSTRINGMEMORY )
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:
pointName The name of the RTDB item.
Return values:
The CVT value of the RTDB item or 0 if the item is a string variable.
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:
p Pointer to the RTDB item.
Return values:
The CVT value of the RTDB item or 0 if the item is a string variable.
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:
pointName The name of the RTDB item.
Return values:
The alternate value of the RTDB item or 0 if the item is a string variable.
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:
p Pointer to the RTDB item.
Return values:
The alternate value of the RTDB item or 0 if the item is a string variable.
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:
pointName The name of the RTDB item.
Return values:
The CVT value of the RTDB item or 0 if the item is a string variable.
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:
p Pointer to the RTDB item.
Return values:
The CVT value of the RTDB item or 0 if the item is a string variable.
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:
pointName The name of RTDB item.
varValue The value to be set.
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:
p Pointer to the RTDB item.
varValue The value to be set.
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:
pointName The name of the RTDB item.
varValue The value to be set.
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:
p Pointer to the RTDB item.
varValue The value to be set.
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:
pointName The name of the RTDB item.
varValue The value to be set.
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:
p Pointer to the RTDB item.
varValue The value to be set.
double ccurRTDB_getRawValueDouble ( const char *  pointName  ) 

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

Parameters:
pointName The name of the RTDB item.
Return values:
The raw value of the RTDB item or 0 if the item is a string variable.
double ccurRTDB_getRawValuePDouble ( const RTDBItem p  ) 

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

Parameters:
p Pointer to the RTDB item.
Return values:
The raw value of the RTDB item or 0 if the item is a string variable.
int ccurRTDB_getCVTValueP ( const RTDBItem p,
ItemValueDef value 
)

Return the CVT value of an RTDB item by address.

Parameters:
p Pointer to the RTDB item.
value Pointer 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:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_getCVTValuePMaxElements ( const RTDBItem p,
ItemValueDef value,
int  max 
)

Return the CVT value of an RTDB item by address.

Parameters:
p Pointer to the RTDB item.
value Pointer to an ItemValueDef where the value is stored.
max The 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:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_getCVTValuePScalar ( const RTDBItem p,
ItemValueDefScalar value,
int  index 
)

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

Parameters:
p Pointer to the RTDB item.
value Pointer to an ItemValueDef where the value is stored.
index into array. Use 0 for RTDB item defined as scalars.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_getCVTValue ( const char *  pointName,
ItemValueDef value 
)

Return the CVT value of an RTDB item.

Parameters:
pointName The name of the RTDB item.
value Pointer 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:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_getAlternateValueP ( const RTDBItem p,
ItemValueDef value 
)

Return the alternate value of an RTDB item by address.

Parameters:
p The address of the RTDB item.
value Pointer 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:
0 On success.
< 0 RTDB_POINTNOTFOUND
int ccurRTDB_getAlternateValuePScalar ( const RTDBItem p,
ItemValueDefScalar value,
int  index 
)

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

Parameters:
p The address of the RTDB item.
value Pointer to an ItemValueDef where the value is stored.
index The element value to return when this RTDB item is defined as an array. Use 0 for items that are defined as scalars.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND
int ccurRTDB_getAlternateValue ( const char *  pointName,
ItemValueDef value 
)

Return the alternate value of an RTDB item by name.

Parameters:
pointName The name of the RTDB item.
value Pointer 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:
0 On success.
< 0 RTDB_POINTNOTFOUND
int ccurRTDB_setCVTValue ( const char *  pointName,
ItemValue value 
)

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

Parameters:
pointName the name of the RTDB item.
value pointer to the value for the item.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_setCVTValueP ( const RTDBItem p,
ItemValue value 
)

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

Parameters:
p Pointer to the RTDB item.
value pointer to the value for the item.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND or RTDB_NOTINCVT
int ccurRTDB_setAlternateValueP ( RTDBItem p,
ItemValue value 
)

Set the alternate value for RTDB item given its address.

Parameters:
p Pointer to the RTDB item.
value pointer to the value for the item.
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND or RTDB_NOSTRINGVAR
int ccurRTDB_setAlternateValue ( char *  pointName,
ItemValue value 
)

Set the alternate value for RTDB item pointName.

Parameters:
pointName Name of the RTDB item.
value pointer to the value for the item.
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND or RTDB_NOSTRINGVAR
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:
p The address of the RTDB item.
value pointer to the value for the item.
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND, RTDB_NOSTRINGVAR
int ccurRTDB_setAlternateFlag ( const char *  pointName,
int  enable 
)

Set/Reset the Item Alternate flag.

Parameters:
pointName The name of the RTDB item.
enable True to set the flag , false to reset the flag
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND On failure.
int ccurRTDB_setAlternateFlagP ( RTDBItem pItem,
int  enable 
)

Set/Reset the Item Alternate flag.

Parameters:
pItem The address of the RTDB item.
enable True to set the flag , false to reset the flag
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND On failure.
int ccurRTDB_setOperatorFlag ( const char *  pointName,
int  enable 
)

Set/Reset the Item operator flag.

Parameters:
pointName The name of the RTDB item.
enable True to set the flag , false to reset the flag
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND On failure.
int ccurRTDB_setOperatorFlagP ( RTDBItem pItem,
int  enable 
)

Set/Reset the Item operator flag.

Parameters:
pItem The address of the RTDB item.
enable True to set the flag , false to reset the flag
Return values:
0 If set successfully.
< 0 RTDB_POINTNOTFOUND On failure.
int ccurRTDB_getNumberOfItems ( void   ) 

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

Return values:
The number of RTDB items that exist in the currently loaded RTDB.
int ccurRTDB_getMaxNumberOfItems ( void   ) 

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

Return values:
The maximum number of RTDB items that are loaded in the RTDB.
int ccurRTDB_getMaxNumberOfStrings ( void   ) 

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

Return values:
The maximum number of string RTDB items that are loaded in the RTDB.
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:
The frame rate.
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).

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:
The length of the frame in micro seconds.
unsigned int ccurRTDB_getFrameCount (  ) 

Return the current frame count of the running test.

Return values:
The value current frame count.
void ccurRTDB_incrementFrameCount (  ) 

Increment the frame count of the running test.

void ccurRTDB_setFrameCount ( unsigned int  frameCount  ) 

Set the frame count of the currently running.

Parameters:
frameCount The value of the frame count to set.
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.
void ccurRTDB_setStopped (  ) 

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

int ccurRTDB_isRunning (  ) 

Return whether a test is currently running.

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

Return TSC time stamp for beginning of test run.

Return values:
The time stamp as an unsigned long long.
int ccurRTDB_getItemMeta ( const char *  pointName,
RTDBItemMeta meta 
)

Return the meta data descriptor for a RTDB item

Parameters:
pointName the name of the RTDB item
meta Pointer to a RTDBItemMeta where the routine stores the meta data.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
int ccurRTDB_setItemMeta ( const char *  pointName,
RTDBItemMeta meta 
)

Set the item meta data.

Parameters:
pointName The name of the item for which to set the meta data.
meta Pointer to a RTDBItemMeta where the routine stores the meta data.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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:
pItem Pointer to the item on which we set the logging flag.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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:
pointName The name of the RTDB item on which we set the logging flag.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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:
pItem Pointer to the item on which we reset the logging flag.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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:
pointName The name of the RTDB item on which we reset the logging flag.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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:
0 always.
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:
pointName The name of the RTDB item on which we set the logging flag.
enable If true, the point values will be logged. When false, logging is disabled.
Return values:
0 On success.
-1 RTDB_POINTNOTFOUND On failure .
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:
pItem Pointer to the RTDB item on which we set the logging flag.
enable If true, the point values will be logged. When false, logging is disabled.
Return values:
0 On success.
< 0 RTDB_POINTNOTFOUND On failure.
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 
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:
0 No error
-1 if error opening the initial condition file.
int ccurRTDB_setRTDBInitCondLogging ( void   ) 

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

Return values:
0 No error
-1 if error opening the initial condition file.
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:
0 No error
-1 if error opening the initial condition file.
int ccurRTDB_getDBMetaInfo ( RTDBMetaInfo p  ) 

Get a copy of the RTDB meta information structure

Parameters:
p Pointer to RTDBMetaIndo structure where the information is returned.
Return values:
0 When successful.
< 0 RTDB_NOTMAPPED if the RTDB is not mapped in the caller addressing space.
int ccurRTDB_isDBLoaded (  ) 

Check whether the RTDB has been loaded from file.

Return values:
1 If a DB is loaded in memory.
0 If a DB is not loaded in memory.
void ccurRTDB_setDBLoaded ( int  b  ) 

Set a DB is loaded in memory.

Parameters:
b boolean that indicates whether a RTDB is loaded into shared memory.
void ccurRTDB_setDBName ( const char *  dbName  ) 

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

Parameters:
dbName NULL terminated string with the name of RTDB.
void ccurRTDB_setDBOffset ( const char *  dbName,
int  offset 
)

Set the byte offset where this RTDB is loaded.

Parameters:
dbName NULL terminated string with the name of RTDB.
offset integer with the offset for the RTDB.
int ccurRTDB_getDBOffset ( const char *  dbName  ) 

Get the byte offset where this RTDB is loaded.

Parameters:
dbName NULL terminated string with the name of RTDB.
Returns:
The offset where this RTDB is loaded
int ccurRTDB_isDBNameLoaded ( const char *  dbName  ) 

Return whether this RTDB has already been loaded.

Parameters:
dbName NULL terminated string with the name of RTDB.
Returns:
True if this RTDB has been loaded already.
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:
boardId The boardId.
boardNum The board instance.
dbName NULL 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.
const char* ccurRTDB_getBoardDB ( int  boardId,
int  boardNum 
)

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

Parameters:
boardId The boardId.
boardNum The board instance.
void ccurRTDB_setDBDescription ( const char *  dbDescription  ) 

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

Parameters:
dbDescription A NULL terminated string with the text for the RTDB description/comments.
void ccurRTDB_setDBCheckSum ( unsigned int  cks  ) 

Set the data base checksum value.

Parameters:
cks value of the calculated checksum for the RTDB.
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

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

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

Parameters:
testId NULL terminated string with the test id.
sessionId NULL terminated string withe the session id.
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:
snapshotNameTemplate Template name for the snapshot file name.
snapshotFormat The format to save the snapshot in. One of CAPTURE_CSV, CAPTURE_MAT,etc.
snapshotMask A mask of SNAPSHOT)PARAMETERS, SNAPSHOT_SIGNALS, etc to select what type of RTDB items to write to the file.
snapshotNameMask A regular expression matching the name of the items to write to the file.
void ccurRTDB_getTestSession ( char *  testId,
char *  sessionId 
)

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

Parameters:
testId Buffer address then the test id is returned.
sessionId Buffer address then the session id is returned.
void ccurRTDB_getSnapshotConfig ( char *  snapshotNameTemplate,
int *  snapshotFormat,
int *  snapshotMask,
char *  snapshotNameMask 
)

Get the the RTDB snapshot configuration for the running test.

Parameters:
snapshotNameTemplate Template name for the snapshot file name.
snapshotFormat The format to save the snapshot in. One of CAPTURE_CSV, CAPTURE_MAT,etc.
snapshotMask A mask of SNAPSHOT)PARAMETERS, SNAPSHOT_SIGNALS, etc to select what type of RTDB items to write to the file.
snapshotNameMask A regular expression matching the name of the items to write to the file.
void ccurRTDB_setTestInitCondition ( const char *  initCondName  ) 

Set the the test initial conditions set name.

Parameters:
initCondName NULL terminated string with the initial conditions name.
void ccurRTDB_getTestInitCondition ( char *  initCondName  ) 

Get the the test initial conditions set name.

Parameters:
initCondName NULL terminated string with the initial conditions name.
void ccurRTDB_resumeDLogger (  ) 

Resume the Data logger client.

void ccurRTDB_pauseDLogger (  ) 

Pause the Data logger client.

void ccurRTDB_newItemDLogger ( int  newHashIndex,
char *  oldName 
)

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

void ccurRTDB_stopCircularLogger (  ) 

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

int ccurRTDB_isDLoggerRunning (  ) 

Check whether the data logger client is running.

Return values:
1 if the data logger is running
0 if the data logger is not running. We might be in playback mode.
int ccurRTDB_isCLoggerRunning (  ) 

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

Return values:
1 if the circular data logger is running
0 if the circular data logger is not running. We might be in playback mode.
void ccurRTDB_setCircularLoggerLockBehavior ( int  behavior  ) 

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

Parameters:
behavior Behavior for the data logger lock. One of CIRCLOGGER_XXX
int ccurRTDB_getCircularLoggerLockBehavior ( void   ) 

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

Return values:
integer with lock behavior. One of CIRCLOGGER_XXX.
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.

void ccurRTDB_getDBName ( char *  dbName  ) 

Returns the data base name that is currently loaded.

Parameters:
dbName string pointer where the DB name is placed.
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:
list Pointer to a RTDBItemPairPtr where to store the list of items. This is allocated by the call.
n Pointer to an integer variable where the number of items matching the pattern is returned.
pointType The type of point to match against, i.e. RTDBAI or -1 to match any point type.
pattern A 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:
0 On success.
const char* ccurRTDB_getItemName ( const RTDBItem p  ) 

Get the name of the RTDB item .

Parameters:
p The address of the RTDB item for which we want the name.
Return values:
A pointer to the item name On success.
NULL if the item cannot be found in the RTDB item table.
int ccurRTDB_getItemAddress ( const char *  name,
RTDBItem **  p 
)

Get the address of the RTDB item name

Parameters:
name The name of the item to get the address of
p The address of the RTDB item is returned here if the call is successful.
Return values:
0 On success.
< 0 If the point could not be found; RTDB_POINTNOTFOUND.
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;
Parameters:
name The name of the item to get the address of
Return values:
NULL On error if the item name cannot be found.
The address of the CVT value.
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;
Parameters:
name The name of the item to get the address of
Return values:
NULL On error if the item name cannot be found.
The address of the alternate value.
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:
regex The regular expression to match item names against.
p The address of the RTDB item when a unique match is found.
name When not NULL, buffer to hold the item name when found.
Return values:
>=0 number of matched items.
-1 regex compile/match error (see cfgsrv.log for details).
<-1 Error code corresponding to an internal API call failure.
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:
glob The glob pattern to match item names against.
p The address of the RTDB item when a unique match is found.
name When not NULL, buffer to hold the item name when found.
Return values:
>=0 number of matched items.
-1 pattern matching error (see cfgsrv.log for details).
<-1 Error code corresponding to an internal API call failure.
int ccurRTDB_getHardwareConfigAddress ( const char *  name,
HardwareConfig **  p 
)

Get the address of the hardware mapping record /

Parameters:
name The name of the record to get the address of.
p The address of the Hardware Config record is returned here if the call is successful.
Return values:
0 On success.
< 0 If the record could not be found; RTDB_POINTNOTFOUND.
int ccurRTDB_getEUConversionAddress ( const char *  name,
EUConversion **  p 
)

Get the address of the EU conversion record record /

Parameters:
name The name of the EU conversion record to get the address of.
p The address of the EU conversion record is returned here if the call is successful.
Return values:
0 On success.
< 0 If the EU record could not be found; RTDB_POINTNOTFOUND.
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:
name The name of the item since it is not in the RTDBItemMeta and we need to print an error message.
pItem Pointer to the item for which to resolve the mappings.
errString pointer where the error message is returned.
Return values:
0 No error, all the I/O mappings for the item were resolved successfully.
-1 On error. The hardware record name could not be resolved or the pointer to the item is null.
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:
name The name of the item since it is not in the RTDBItemMeta and we need to print an error message.
pItem Pointer to the item for which to resolve the EU conversion.
errString pointer where the error message is returned.
Return values:
0 No error, all the EU conversion record for the item was resolved successfully.
-1 On error. The EU conversion record name could not be resolved or the pointer to the item is null.
int ccurRTDB_getItemIndex ( const char *  name  ) 

Get the hash table index of the named RTDB item

Parameters:
name The name of the item to get the address of
Return values:
>= 0 The hash index On success.
-1 if the named item was not found.
int ccurRTDB_getHardwareConfigIndex ( const char *  name  ) 

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

Parameters:
name The name of the item to get the address of
Return values:
>= 0 The hash index On success.
-1 if the named record was not found.
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:
index The hash table index of the item.
Return values:
The address of the item.
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:
index The hash table index of the item.
Return values:
The address of the HardwareConfig record.
void ccurRTDB_setLoggedUser ( const char *  userName  ) 

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

Parameters:
userName Pointer to the user name
Return values:
None 
const char* ccurRTDB_getLoggedUser ( void   ) 

Return the name of the logged user.

Return values:
Pointer to the logged user name.
void ccurRTDB_scriptInitStdIO ( void   ) 

Initialize the Script standard IO shared memory.

ScriptStdIO* ccurRTDB_getScriptStdIOAddress ( void   ) 

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

Return values:
The address of the Script shared memory.
int ccurRTDB_writeStdOut ( char *  str  ) 

Write data to the script pseudo standard out.

Parameters:
str Character buffer where to output.
Return values:
Always returns 0
double ccurRTDB_euPhysicalToRaw ( RTDBItemMeta meta,
double  euValue 
) [inline]

Convert a value from physical engineering units to raw value.

Parameters:
meta Pointer to the RTDBItemMeta for the item.
euValue the physical value to convert to raw units.
Return values:
The converted value.
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:
meta Pointer to the RTDBItemMeta for the item.
rawValue the raw value to convert.
Return values:
The converted value.
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()
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()
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()
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()
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()
void ccurRTDB_formImport ( const char *  formName,
char  inputsOnly 
)

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

Parameters:
formName The name of the form.
inputsOnly If non-zero, only set the values of items defined as input
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:
formName The name of the form that defines the items to be captured.
nameTemplate A template to form the name of the capture file. The template can contains predefined tokens such as:
$testname $sessionname $formname $date $time $framecount $seqnum
captureType Define the format to write the capture file: one of (0 == CSV, 1 == Initial Condition, 2 == RTForm, 3 == MAT file)
period The period in seconds when capturing multiple records, only apply for CSV.
runCount The number of records to capture , only apply for CSV.
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

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

Add a Unit to the database.

Parameters:
uClass The unit class.
name The unit name.
A The A conversion factor to convert to the base unit of the class.
B The B conversion factor to convert to the base unit of the class.
Return values:
>=0 The index in RTDB of the newly allocated item.
< 0 On failure
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:
pgmName String with the user model name. Usually argv[0] from the command line.
cvtTable The address of the CVTTable struct.
cvtSize The size of the CVTTable struct
Returns:
-1 in case of failure.
int ccurRTDB_modelDataExchangeInit ( const char *  modelName  ) 

Initialize the data structure necessary to support model data exchange.

Parameters:
modelName String with the user model name. Usually argv[1] from the command line.
Returns:
-1 in case of failure.
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.