![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtMessageExecutive: More...

Public Member Functions | |
| DtMessageExecutive () | |
| default constructor | |
| virtual | ~DtMessageExecutive () |
| destructor | |
| DtMessageExecutive (const DtMessageExecutive &orig) | |
| copy constructor | |
| DtMessageExecutive & | operator= (const DtMessageExecutive &orig) |
| assignment operator | |
| virtual void | addMessageCallback (int type, DtMessageCallbackFcn fcn, void *usrData) |
| Add/Remove a function to be called when a particular message type is received. | |
| virtual void | removeMessageCallback (int type, DtMessageCallbackFcn fcn, void *usrData) |
| virtual void | addSimMessageCallback (DtMessageCallbackFcn fcn, void *usrData) |
| Add/Remove DtSimMessage callback functions. | |
| virtual void | removeSimMessageCallback (DtMessageCallbackFcn fcn, void *usrData) |
| virtual void | processMessage (const DtSimMessage &msg) const |
| Call the callbacks registered for the Radio message's type. | |
| virtual int | numCallbacks (int type) const |
| Get the number of callbacks registered for a radio message type. | |
| virtual int | indexType (const DtSimMessage &message) const =0 |
| Returns the string to be used as index onto the message exec list. | |
Static Public Member Functions | |
| static unsigned | generateMessageId () |
| advances theSplitId and returns the value | |
| static unsigned | maximumSignalDataSize () |
| returns the maximum number of bytes that can be sent in a signal interaction's data field. | |
| static DtTime | timeoutCheckInterval () |
| static void | setTimeoutCheckInterval (DtTime nSecs) |
| static DtTime | timeoutDuration () |
| static void | setTimeoutDuration (DtTime nSecs) |
| static int | maximumContentSize () |
| returns the maximum number of bytes that can be added to a data interaction, and not overrun the maximum packet buffer size in VR-Link. | |
| static void | setMaximumContentSize (int sz) |
| returns the maximum number of bytes that can be added to a data interaction, and not overrun the maximum packet buffer size in VR-Link. | |
Protected Member Functions | |
| virtual void | addMessageCallback (int type, DtMessageCallbackInfo *info) |
| Add/Remove callback info for a particular radio message type. | |
| virtual void | removeMessageCallback (int, const DtMessageCallbackInfo &info) |
| void | emptyList () |
| Empty the list. | |
| void | copyList (const DtMessageExecutive &orig) |
| Copy the list. | |
Protected Attributes | |
| DtList | mySimMsgCbs |
| DtHashlist | myListOfCbLists |
| Each element of myCbList will be a DtList of callbacks. | |
Static Protected Attributes | |
| static int | theMaximumContentSize |
| static unsigned | theMaxSignalDataSize |
| static unsigned | theSplitId |
| static DtTime | theTimeoutCheckInterval |
| static DtTime | theTimeoutDuration |
class DtMessageExecutive:
DtMessageExecutive is an abstract base class. Derived classes are used to manage callbacks on particular message types. For example, as task message executive would have a list of callback lists indexed ty task type. All indices are ints, and are provided to the executive by overriding the pure virtual function indexType().
default constructor
| virtual DtMessageExecutive::~DtMessageExecutive | ( | ) | [virtual] |
destructor
| DtMessageExecutive::DtMessageExecutive | ( | const DtMessageExecutive & | orig | ) |
copy constructor
| DtMessageExecutive& DtMessageExecutive::operator= | ( | const DtMessageExecutive & | orig | ) |
assignment operator
| virtual void DtMessageExecutive::addMessageCallback | ( | int | type, |
| DtMessageCallbackFcn | fcn, | ||
| void * | usrData | ||
| ) | [virtual] |
Add/Remove a function to be called when a particular message type is received.
| virtual void DtMessageExecutive::removeMessageCallback | ( | int | type, |
| DtMessageCallbackFcn | fcn, | ||
| void * | usrData | ||
| ) | [virtual] |
| virtual void DtMessageExecutive::addSimMessageCallback | ( | DtMessageCallbackFcn | fcn, |
| void * | usrData | ||
| ) | [virtual] |
Add/Remove DtSimMessage callback functions.
| virtual void DtMessageExecutive::removeSimMessageCallback | ( | DtMessageCallbackFcn | fcn, |
| void * | usrData | ||
| ) | [virtual] |
| virtual void DtMessageExecutive::processMessage | ( | const DtSimMessage & | msg | ) | const [virtual] |
Call the callbacks registered for the Radio message's type.
Reimplemented in DtRadioMessageExecutive.
| virtual int DtMessageExecutive::numCallbacks | ( | int | type | ) | const [virtual] |
Get the number of callbacks registered for a radio message type.
| virtual int DtMessageExecutive::indexType | ( | const DtSimMessage & | message | ) | const [pure virtual] |
Returns the string to be used as index onto the message exec list.
For example, to create a TaskMessageExecutive, this function could upcast the simMsg to a task msg, and then return the task()->type().
Implemented in DtRadioMessageExecutive, and DtInterfaceMessageExecutive.
| static unsigned DtMessageExecutive::generateMessageId | ( | ) | [static] |
advances theSplitId and returns the value
| static int DtMessageExecutive::maximumContentSize | ( | ) | [static] |
returns the maximum number of bytes that can be added to a data interaction, and not overrun the maximum packet buffer size in VR-Link.
| static void DtMessageExecutive::setMaximumContentSize | ( | int | sz | ) | [static] |
returns the maximum number of bytes that can be added to a data interaction, and not overrun the maximum packet buffer size in VR-Link.
| static unsigned DtMessageExecutive::maximumSignalDataSize | ( | ) | [static] |
returns the maximum number of bytes that can be sent in a signal interaction's data field.
| static DtTime DtMessageExecutive::timeoutCheckInterval | ( | ) | [static] |
| static void DtMessageExecutive::setTimeoutCheckInterval | ( | DtTime | nSecs | ) | [static] |
| static DtTime DtMessageExecutive::timeoutDuration | ( | ) | [static] |
| static void DtMessageExecutive::setTimeoutDuration | ( | DtTime | nSecs | ) | [static] |
| virtual void DtMessageExecutive::addMessageCallback | ( | int | type, |
| DtMessageCallbackInfo * | info | ||
| ) | [protected, virtual] |
Add/Remove callback info for a particular radio message type.
| virtual void DtMessageExecutive::removeMessageCallback | ( | int | , |
| const DtMessageCallbackInfo & | info | ||
| ) | [protected, virtual] |
| void DtMessageExecutive::emptyList | ( | ) | [protected] |
Empty the list.
Non-virtual since called in dtor.
| void DtMessageExecutive::copyList | ( | const DtMessageExecutive & | orig | ) | [protected] |
Copy the list.
Non-virtual since called in ctor.
DtList DtMessageExecutive::mySimMsgCbs [protected] |
DtHashlist DtMessageExecutive::myListOfCbLists [protected] |
Each element of myCbList will be a DtList of callbacks.
The key for the hashlist is the msg type.
int DtMessageExecutive::theMaximumContentSize [static, protected] |
unsigned DtMessageExecutive::theMaxSignalDataSize [static, protected] |
unsigned DtMessageExecutive::theSplitId [static, protected] |
DtTime DtMessageExecutive::theTimeoutCheckInterval [static, protected] |
DtTime DtMessageExecutive::theTimeoutDuration [static, protected] |