![]() |
VR-Forces Development_Version Class Documentation
|
The central class of a DtVrfObject for all communications to and from the object. More...
Classes | |
| struct | DtInfluenceCbInfo |
Public Member Functions | |
| virtual | ~DtVrfObjectCommunicationInterface () |
| virtual void | createRadiosFromDescriptorList () |
| Creates radios from descriptor list. | |
| virtual void | createRadiosFromDescriptorList (const DtRadioDescriptorList &descList) |
| Creates radios from descriptor list. | |
| virtual void | sendSimInternalMessage (DtVrfObjectMessage *message) |
| Sends the specified message though the DtSimInternalCommunicationInterface. | |
| virtual DtVrfRadio * | lookupRadio (int radioId) |
| virtual DtVrfRadio * | lookupRadio (const DtString &radioName) |
| virtual DtVrfRadio * | defaultRadio () |
| DtSimInternalCommunicationInterface * | simInternalCommunicationInterface () |
| virtual void | sendInfluence (const DtInfluenceInteraction &influence) |
| Send an influence interaction. | |
| virtual void | tick () |
| Called each simulation tick. | |
| virtual bool | sendRadioMessage (const DtString &radioName, DtVrfObjectMessage *message) |
| Sends the specified message though the radio system. | |
| virtual bool | sendRadioMessage (int radioId, DtVrfObjectMessage *message) |
| Sends though the radio with the specified ID. | |
| virtual bool | sendRadioMessage (DtVrfObjectMessage *message) |
| Sends though the default radio. | |
| virtual void | addMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called for every message that is received by this interface. | |
| virtual void | removeMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called for every message that is received by this interface. | |
| template<typename messageType > | |
| void | addMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific type of object message is processed. | |
| template<typename messageType > | |
| void | removeMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific type of object message is processed. | |
| virtual void | addMessageCallbackByCategory (int category, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific category of object message is processed. | |
| virtual void | removeMessageCallbackByCategory (int category, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| Callback which is called when a specific category of object message is processed. | |
| virtual void | addInfluenceCallback (DtInfluenceInterCb fcn, void *usr) |
| Register a callback to be called when an influence interaction is received for this object. | |
| virtual void | removeInfluenceCallback (DtInfluenceInterCb fcn, void *usr) |
| Register a callback to be called when an influence interaction is received for this object. | |
Static Public Member Functions | |
| static DtVrfObjectCommunicationInterface * | create (DtVrfObject *vrfObject) |
| Calls constructor and init(), and returns the result. | |
Protected Types | |
| typedef std::map < DtSymbolString, DtVrfRadio * > | DtRadioMap |
Protected Member Functions | |
| DtVrfObjectCommunicationInterface (DtVrfObject *vrfObject) | |
| Use the create() method instead of calling the constructor. | |
| virtual bool | init () |
| Virtual init, called from the create() method. | |
Protected Attributes | |
| DtVrfObject * | myVrfObject |
| DtVrfObjectMessageExecutive | myMessageExecutive |
| DtSimInternalCommunicationInterface * | mySimInternalInterface |
| DtRadioMap | myRadios |
| DtVrfRadio * | myDefaultRadio |
| std::set< DtInfluenceCbInfo > | myInfluenceCbs |
Private Member Functions | |
| DtVrfObjectCommunicationInterface () | |
| Not Implemented. | |
| DtVrfObjectCommunicationInterface (const DtVrfObjectCommunicationInterface &orig) | |
| Not Implemented. | |
| DtVrfObjectCommunicationInterface & | operator= (const DtVrfObjectCommunicationInterface &orig) |
| Not Implemented. | |
| virtual void | processVrfObjectMessage (const DtVrfObjectMessage *msg) |
| Callback processing method for messages received from one of the contained message interfaces. | |
| static void | vrfObjectMessageCallback (const DtVrfObjectMessage *msg, void *usr) |
| Callback processing method for messages received from one of the contained message interfaces. | |
| virtual void | processInfluence (DtInfluenceInteraction *msg) |
| Callback processing method for received influence interactions. | |
| static void | influenceCallback (DtInfluenceInteraction *msg, void *usr) |
| Callback processing method for received influence interactions. | |
The central class of a DtVrfObject for all communications to and from the object.
This class manages all communications on a specific DtVrfObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList) is called.
|
protected |
|
private |
Not Implemented.
|
private |
Not Implemented.
|
protected |
Use the create() method instead of calling the constructor.
|
virtual |
|
private |
Not Implemented.
|
static |
Calls constructor and init(), and returns the result.
Upon return, invoke one of these: createRadiosFromDescriptorList(); or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList); to supply radio creation parameters to the communication interface.
|
protectedvirtual |
Virtual init, called from the create() method.
|
virtual |
Creates radios from descriptor list.
Called from DtVrfObject::createCommunicationsInterface()
|
virtual |
Creates radios from descriptor list.
Called from DtVrfObject::createCommunicationsInterface(const DtRadioDescriptorList&)
|
virtual |
Sends the specified message though the DtSimInternalCommunicationInterface.
Messages sent this way are intended to be internal simulation types of messages, meaning that they will not be sent over simulated radios, and are guaranteed to get to their addressee.
|
virtual |
Sends the specified message though the radio system.
Specify the name of the radio to use, or send though the default radio. Message sender information will be set in the message.
|
virtual |
Sends though the radio with the specified ID.
Radio IDs are assigned based on their order in the OPE file, starting with 0 and incrementing by 1.
|
virtual |
Sends though the default radio.
The default radio is the first radio listed in the radio list for the entity.
|
virtual |
|
virtual |
|
virtual |
| DtSimInternalCommunicationInterface* DtVrfObjectCommunicationInterface::simInternalCommunicationInterface | ( | ) |
|
virtual |
Callback which is called for every message that is received by this interface.
This includes sim internal messages, and messages from any radio.
|
virtual |
Callback which is called for every message that is received by this interface.
This includes sim internal messages, and messages from any radio.
|
inline |
Callback which is called when a specific type of object message is processed.
The type parameter is the content type of the message. This includes sim internal messages, and messages from any radio.
|
inline |
Callback which is called when a specific type of object message is processed.
The type parameter is the content type of the message. This includes sim internal messages, and messages from any radio.
|
virtual |
Callback which is called when a specific category of object message is processed.
Categories are general message types such as: DtTaskMessageType, DtReportMessageType, DtSetDataRequestMessageType, and DtAdminMessageType. This includes sim internal messages, and messages from any radio.
|
virtual |
Callback which is called when a specific category of object message is processed.
Categories are general message types such as: DtTaskMessageType, DtReportMessageType, DtSetDataRequestMessageType, and DtAdminMessageType. This includes sim internal messages, and messages from any radio.
|
virtual |
Send an influence interaction.
|
virtual |
Register a callback to be called when an influence interaction is received for this object.
|
virtual |
Register a callback to be called when an influence interaction is received for this object.
|
virtual |
Called each simulation tick.
Ticks any radios owned by this communication interface.
|
staticprotected |
Callback processing method for messages received from one of the contained message interfaces.
|
protectedvirtual |
Callback processing method for messages received from one of the contained message interfaces.
|
staticprotected |
Callback processing method for received influence interactions.
|
protectedvirtual |
Callback processing method for received influence interactions.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |