AIDA Datatypes, Macros And Constants

The AIDA system defines its own datatypes and some preprocessor macros to be highly portable. The following datatypes are guaranteed to be defined on every platform where AIDA is available (ISO C datatypes like char, int, double etc. are not listed here). These datatypes are defined in portab.h. The definitions are not shown here since these are platform dependent. Naming conventions for variables are described in detail in portab.h.

AIDA Datatypes

handle This is an opaque type that is used to address AIDA stacks. A handle is generated every time a new stack is created and is needed for all operations on AIDA stacks.
wchar This is a wide character type of an unknown width. It is used for UNICODE C strings.
xchar This is a context dependent character type. In a UNICODE environment it is defined as wchar, in an ASCII environment it is defined as char. It is used for context dependent C strings.
int8 This is a signed integer type of 8 bits width.
int16 This is a signed integer type of 16 bits width.
int32 This is a signed integer type of 32 bits width.
byte This is an unsigned integer type of 8 bits width.
word This is an unsigned integer type of 16 bits width.
dword This is an unsigned integer type of 32 bits width.
tstQword This is a structure used for values with 64 bits width. tstQword contains two 32 bit unsigned members: dwLow and dwHigh.
bool This is a boolean type. bool is not used within AIDA data structures since its size may differ between C and C++.
tstTimeVal This is a structure used to store absolute and relative time values with a resolution of 1ns. tstTimeVal contains two members, dwMSec and dwNSec. dwMSec is an unsigned 32 bit value with a resolution of 1ms. This member wraps approx. every 49 days. dwNSec contains the ns part of the time value and a flag (bit 31) indicating relative time values. The dwNSec member may have values from 0..999999 (excluding the relative flag).

AIDA Macros

True Defined as true.
False Defined as false.
On_Cfg Defined as (1==1) (for use in configuration switches etc.).
Off_Cfg Defined as (0==1) (for use in configuration switches etc.).
STR This macro is deprecated. Do not use any more.
XSTR(xsString), HSTR(hsString), LSTR(lsString) Macros to generate context sensitive, ANSI and wide character strings. XSTR() generates context sensitive strings while HSTR() generates ANSI strings and LSTR() generates wide character strings.
bBinByte(value) This macro can be used to convert a binary value into a byte, e. g. bBinByte(11001001) —> ((byte)0xC9).
min(value1, value2) This macro returns the lower of both values. Attention: The values may be referenced more than once!
max(value1, value2) This macro returns the higher of both values. Attention: The values may be referenced more than once!
AIDA_pstGetNextStatusHeader(pstEvent, pstCurStatusHeader) To be used with status events only. This macro returns the address of the next status block after pstCurStatusHeader in a status event or NULL if pstEvent does not contain further status blocks. pstCurStatusHeader is the address of a status block returned by a call to AIDA_pstGetNextStatusHeader or NULL to retrieve the first status block of pstEvent.

AIDA Constants

true, false The possible values a variable of the type bool may have. Depending on the language used (C, C++) these may either be the C++ true/false or a value of a bool enum.
AIDA_stTimeoutImmediate, AIDA_stTimeoutInfinite Common values for tstTimeVal. Both are relative time values.
AIDA_stTimeoutImmediate specifies an immediate timeout. When used in wait functions the function will return immediately, when used in events the event will be processed as soon as possible.
AIDA_stTimeoutInfinite specifies an infinite timeout. When used in wait functions the function will return only after the wait condition is satisfied. This value must not be used in events.
AIDA_dwTimeoutRelMask This value is a mask for the relative flag in tstTimeVal.dwNSec.

See Also

AIDA Overview