Home > Support > Documentation

rtEXIEventCodeGroup.h File Reference

EXI event code definitions and functions. More...

#include "rtexisrc/rtEXIEventCode.h"
#include "rtxsrc/rtxDynBitSet.h"
#include "rtxsrc/rtxSList.h"

Go to the source code of this file.


Classes

struct  OSEXIEventCodeGroup
 An EventCodeGroup is a group of related event codes. More...

Defines

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

Detailed Description

EXI event code definitions and functions.

Definition in file rtEXIEventCodeGroup.h.


Function Documentation

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