EXI event code definitions and functions.


Classes

struct  OSEXIEventCode
 A structure representing a production's event code. More...
struct  OSEXIEventCodeGroup
 An EventCodeGroup is a group of related event codes. More...

Defines

#define rtEXISetEventCode1(pEventCode, part1)   rtEXISetEventCode3(pEventCode, part1, OSINT32_MIN, OSINT32_MIN)
 This macro sets a one-part event code.
#define rtEXISetEventCode2(pEventCode, part1, part2)   rtEXISetEventCode3(pEventCode, part1, part2, OSINT32_MIN)
 This macro sets a two-part event code.
#define rtEXIEventCodeGroupHasPart1(pecgrp, part1)   rtxDynBitSetTestBit(&pecgrp->part1Set,part1)
 This macro returns true if there is an event code in this group whose length is 1 and whose first part is equal to part1.
#define rtEXIEventCodeGroupHasPart2(pecgrp, part2)   rtxDynBitSetTestBit(&pecgrp->part2Set,part2)
 This macro returns true if there is an event code in this group whose length is 2 and whose first part is equal to part2.

Functions

EXTERNEXI int rtEXIEventCodeCompare (const OSEXIEventCode *pec1, const OSEXIEventCode *pec2)
 This function compares two event codes.
EXTERNEXI OSEXIEventCodertEXIEventCodeCopy (OSCTXT *pctxt, const OSEXIEventCode *pec)
 This function does a deep-copy of an event code structure.
EXTERNEXI OSBOOL rtEXIEventCodesEqual (const OSEXIEventCode *pec1, const OSEXIEventCode *pec2)
 This function compares two event codes for equality.
EXTERNEXI char * rtEXIEventCodeToString (OSCTXT *pctxt, const OSEXIEventCode *pec)
 This function returns a string representation of the given event code in dot notation (part1.part2.part3).
EXTERNEXI OSUINT32 rtEXIEventCodeLength (const OSEXIEventCode *pec)
 This function returns the length of the given event code.
EXTERNEXI OSEXIEventCodertEXINewEventCode1 (OSCTXT *pctxt, OSINT32 part1)
 This function allocates and initializes a one-part event code.
EXTERNEXI OSEXIEventCodertEXINewEventCode2 (OSCTXT *pctxt, OSINT32 part1, OSINT32 part2)
 This function allocates and initializes a two-part event code.
EXTERNEXI OSEXIEventCodertEXINewEventCode3 (OSCTXT *pctxt, OSINT32 part1, OSINT32 part2, OSINT32 part3)
 This function allocates and initializes a three-part event code.
EXTERNEXI void rtEXISetEventCode3 (OSEXIEventCode *pEventCode, OSINT32 part1, OSINT32 part2, OSINT32 part3)
 This function sets a three-part event code.
EXTERNEXI void rtEXIEventCodePrint (const OSEXIEventCode *pEventCode)
 This function prints information on the given event code to stdout.
EXTERNEXI void rtEXIEventCodeGroupInit (OSCTXT *pctxt, OSEXIEventCodeGroup *pecgrp)
 This function initializes an event code group structure.
EXTERNEXI OSEXIEventCodeGrouprtEXINewEventCodeGroup (OSCTXT *pctxt)
 This function allocates and initializes a new event code group structure.
EXTERNEXI int rtEXIEventCodeGroupAdd (OSEXIEventCodeGroup *pecgrp, const OSEXIEventCode *pec)
 This function adds an event code to an event code group and updates the maximum part variables.
EXTERNEXI OSEXIEventCodeGrouprtEXIEventCodeGroupCopy (const OSEXIEventCodeGroup *pecgrp)
 This function performs a deep copy of the given event group.
EXTERNEXI void rtEXIEventCodeGroupFreeMem (OSEXIEventCodeGroup *pecgrp)
 This function frees all memory associated with an event group.
EXTERNEXI int rtEXIEventCodeGroupGetBitsPart1 (OSEXIEventCodeGroup *pecgrp)
 This function returns the number of bits necessary to encode the max part1 value in this group.
EXTERNEXI int rtEXIEventCodeGroupGetBitsPart2 (OSEXIEventCodeGroup *pecgrp)
 This function returns the number of bits necessary to encode the max part2 value in this group.
EXTERNEXI int rtEXIEventCodeGroupGetBitsPart3 (OSEXIEventCodeGroup *pecgrp)
 This function returns the number of bits necessary to encode the max part3 value in this group.
EXTERNEXI void rtEXIEventCodeGroupIncrPart1 (OSCTXT *pctxt, OSEXIEventCodeGroup *pecgrp)
 This function increments part1 in all event codes in this group, as well as the max part1 value.

Define Documentation

#define rtEXISetEventCode1 ( pEventCode,
part1   )     rtEXISetEventCode3(pEventCode, part1, OSINT32_MIN, OSINT32_MIN)

This macro sets a one-part event code.

Parameters:
pEventCode Pointer to event code structure.
part1 Part 1 of the event code.

Definition at line 172 of file rtEXIEventCode.h.

#define rtEXISetEventCode2 ( pEventCode,
part1,
part2   )     rtEXISetEventCode3(pEventCode, part1, part2, OSINT32_MIN)

This macro sets a two-part event code.

Parameters:
pEventCode Pointer to event code structure.
part1 Part 1 of the event code.
part2 Part 2 of the event code.

Definition at line 182 of file rtEXIEventCode.h.


Function Documentation

EXTERNEXI int rtEXIEventCodeCompare ( const OSEXIEventCode pec1,
const OSEXIEventCode pec2 
)

This function compares two event codes.

Event codes are first compared based on length and then partwise.

Parameters:
pec1 Pointer to event code to compare.
pec2 Pointer to event code to compare.
Returns:
Comparison result: < 0 = (ec1 < ec2), 0 = (ec1 == ec2), > 0 = (ec1 > ec2)

EXTERNEXI OSEXIEventCode* rtEXIEventCodeCopy ( OSCTXT *  pctxt,
const OSEXIEventCode pec 
)

This function does a deep-copy of an event code structure.

Parameters:
pctxt Pointer to context block structure.
pec Pointer to event code to copy.
Returns:
Copied structure. Memory for the new structure is allocated with the rtxMemAlloc run-time functions and thus must be freed with an rtxMemFree* function. If memory allocation fails, NULL is returned.

EXTERNEXI int rtEXIEventCodeGroupAdd ( OSEXIEventCodeGroup pecgrp,
const OSEXIEventCode pec 
)

This function adds an event code to an event code group and updates the maximum part variables.

Parameters:
pecgrp Pointer to event code group structure.
pec Pointer to event code to add.
Returns:
Status of operation: 0 if success, negative status code if failure.

EXTERNEXI OSEXIEventCodeGroup* rtEXIEventCodeGroupCopy ( const OSEXIEventCodeGroup pecgrp  ) 

This function performs a deep copy of the given event group.

This includes copying the group list as well as all its members.

Parameters:
pecgrp Pointer to event code group structure.
Returns:
Copied group structure. Memory for the new structure is allocated with the rtxMemAlloc run-time functions and thus must be freed with an rtxMemFree* function. If memory allocation fails, NULL is returned.

EXTERNEXI void rtEXIEventCodeGroupFreeMem ( OSEXIEventCodeGroup pecgrp  ) 

This function frees all memory associated with an event group.

Parameters:
pecgrp Pointer to event code group structure.

EXTERNEXI int rtEXIEventCodeGroupGetBitsPart1 ( OSEXIEventCodeGroup pecgrp  ) 

This function returns the number of bits necessary to encode the max part1 value in this group.

Parameters:
pecgrp Pointer to event code group structure.
Returns:
Number of bits.

EXTERNEXI int rtEXIEventCodeGroupGetBitsPart2 ( OSEXIEventCodeGroup pecgrp  ) 

This function returns the number of bits necessary to encode the max part2 value in this group.

Parameters:
pecgrp Pointer to event code group structure.
Returns:
Number of bits.

EXTERNEXI int rtEXIEventCodeGroupGetBitsPart3 ( OSEXIEventCodeGroup pecgrp  ) 

This function returns the number of bits necessary to encode the max part3 value in this group.

Parameters:
pecgrp Pointer to event code group structure.
Returns:
Number of bits.

EXTERNEXI void rtEXIEventCodeGroupIncrPart1 ( OSCTXT *  pctxt,
OSEXIEventCodeGroup pecgrp 
)

This function increments part1 in all event codes in this group, as well as the max part1 value.

Parameters:
pctxt Pointer to a context block structure.
pecgrp Pointer to event code group structure.

EXTERNEXI void rtEXIEventCodeGroupInit ( OSCTXT *  pctxt,
OSEXIEventCodeGroup pecgrp 
)

This function initializes an event code group structure.

Parameters:
pctxt Pointer to a context block structure.
pecgrp Pointer to event code group structure.

EXTERNEXI OSUINT32 rtEXIEventCodeLength ( const OSEXIEventCode pec  ) 

This function returns the length of the given event code.

Parameters:
pec Pointer to event code.
Returns:
Length of event code (0 - 3)

EXTERNEXI void rtEXIEventCodePrint ( const OSEXIEventCode pEventCode  ) 

This function prints information on the given event code to stdout.

Parameters:
pEventCode Pointer to event code structure.

EXTERNEXI OSBOOL rtEXIEventCodesEqual ( const OSEXIEventCode pec1,
const OSEXIEventCode pec2 
)

This function compares two event codes for equality.

A deep compare is done (i.e. will return TRUE if either the pointers are equal or all parts inside are equal).

Parameters:
pec1 Pointer to event code to compare.
pec2 Pointer to event code to compare.
Returns:
Boolean comparison result.

EXTERNEXI char* rtEXIEventCodeToString ( OSCTXT *  pctxt,
const OSEXIEventCode pec 
)

This function returns a string representation of the given event code in dot notation (part1.part2.part3).

Memory is allocated for the string using the rtxMemAlloc run-time function and must be freed using one the rtxMemFree functions.

Parameters:
pctxt Pointer to context block structure.
pec Pointer to event code.
Returns:
Pointer to string version of code or NULL if no dynamic memory is available.

EXTERNEXI OSEXIEventCode* rtEXINewEventCode1 ( OSCTXT *  pctxt,
OSINT32  part1 
)

This function allocates and initializes a one-part event code.

Parameters:
pctxt Pointer to context block structure.
part1 Part 1 of the event code.
Returns:
Pointer to allocated event code structure. NULL if no dynamic memory available.

EXTERNEXI OSEXIEventCode* rtEXINewEventCode2 ( OSCTXT *  pctxt,
OSINT32  part1,
OSINT32  part2 
)

This function allocates and initializes a two-part event code.

Parameters:
pctxt Pointer to context block structure.
part1 Part 1 of the event code.
part2 Part 2 of the event code.
Returns:
Pointer to allocated event code structure. NULL if no dynamic memory available.

EXTERNEXI OSEXIEventCode* rtEXINewEventCode3 ( OSCTXT *  pctxt,
OSINT32  part1,
OSINT32  part2,
OSINT32  part3 
)

This function allocates and initializes a three-part event code.

Parameters:
pctxt Pointer to context block structure.
part1 Part 1 of the event code.
part2 Part 2 of the event code.
part3 Part 3 of the event code.
Returns:
Pointer to allocated event code structure. NULL if no dynamic memory available.

EXTERNEXI OSEXIEventCodeGroup* rtEXINewEventCodeGroup ( OSCTXT *  pctxt  ) 

This function allocates and initializes a new event code group structure.

Parameters:
pctxt Pointer to a context block structure.
Returns:
Pointer to new event code group structure or NULL if no dynamic memory available.

EXTERNEXI void rtEXISetEventCode3 ( OSEXIEventCode pEventCode,
OSINT32  part1,
OSINT32  part2,
OSINT32  part3 
)

This function sets a three-part event code.

Parameters:
pEventCode Pointer to event code structure.
part1 Part 1 of the event code.
part2 Part 2 of the event code.
part3 Part 3 of the event code.