![]() |
VR-Forces 5.0.2 Developer's Guide
|
Base class for any radios on VrfObjects. A DtVrfRadio acts as the interface between an entity and a DtCommModel. Callbacks can be registered on a radio for receipt of various message types, and messages can be sent though the radio by calling sendMessage().
Public Member Functions | |
| DtVrfRadio (DtRadioCreationParams ¶ms) | |
| virtual | ~DtVrfRadio () |
| virtual bool | init () |
| virtual DtString | type () const |
| virtual bool | sendMessage (DtVrfObjectMessage *message) |
| template<typename messageType > | |
| void | addMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| template<typename messageType > | |
| void | removeMessageCallback (const messageType &type, DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| virtual bool | readyToSend () const |
| virtual void | tick () |
| virtual void | receiveMessage (const DtVrfObjectMessage *message) |
| virtual void | setReadyToSend (bool val) |
| virtual DtLocalObject * | vrfObject () |
| virtual double | sampleRate () const |
| virtual void | processReadCommModelSettings (const DtSettingsObject *settings) |
| virtual int | radioId () const |
| virtual void | addMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| virtual void | removeMessageCallback (DtVrfObjectMessageCallbackFcn fcn, void *usr) |
| virtual const DtVrfRadioTransmitter * | radioTransmitter () const |
| virtual DtVrfRadioTransmitter * | radioTransmitter () |
Static Public Member Functions | |
| static DtVrfRadio * | create (DtRadioCreationParams ¶ms) |
| static void | setFactory (DtVrfRadioFactory *factory) |
| static DtVrfRadio * | createRadio (const DtString &typeString, DtLocalObject *vrfObject, const DtVrfRadioDescriptor *descriptor) |
| static void | readCommModelSettingsCallback (const DtSettingsObject *settings, void *usr) |
Protected Types | |
| typedef std::deque < DtVrfObjectMessagePtr > | DtMessageQueue |
Static Protected Attributes | |
| static DtVrfRadioFactory * | theFactory |
Private Member Functions | |
| DtVrfRadio () | |
| DtVrfRadio (const DtVrfRadio &orig) | |
| DtVrfRadio & | operator= (const DtVrfRadio &orig) |
|
protected |
|
private |
Not implemented.
|
private |
Not implemented.
| DtVrfRadio::DtVrfRadio | ( | DtRadioCreationParams & | params | ) |
|
virtual |
|
private |
Not implemented.
|
virtual |
Virtual init. Must be called after construction.
|
virtual |
|
virtual |
Fills in the sender name, and sends the message out to any designated recipients.
|
virtual |
Callback which is called for every message that is received by this interface.
|
virtual |
Callback which is called for every message that is received by this interface.
|
inline |
|
inline |
|
virtual |
Indicates whether or not this radio is currently clear to send messages. Depending on the comm model that this radio is associated with, it may not be able to send a message because the radio network is busy. When it is not ready to send, calls to sendMessage() will cause the message to be queued for later sending.
|
virtual |
Called every simulation tick. Tick the radio transmitter, if present.
|
virtual |
This method pushes this message into the message executive, and any appropriate callbacks are invoked. This method should only be called by a DtCommModel.
|
virtual |
Changes the readyToSend state of this radio. This method should only be called by a DtCommModel.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
Static creator function that can be registered with factories.
|
static |
Sets the static factory to the specified radio factory.
|
static |
Uses the static factory to create a new DtRadio subclass and returns it.
|
static |
If this radio's comm-model-name is "default-radio-comm-model" this callback is registered with the DtVrfSimSettingsManager and will switch between the "default-internal-radio-comm-model" and the "default-external-radio-comm-model" based on the "use-external-comm-model" back-end setting.
See commModelParams.mtl in the config directory for the definitions of the comm models, and vrfSimSettings.xml for the current state of "use-external-comm-model".
|
virtual |
|
virtual |
The ID of this radio.
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
The radio network which this radio is part of.
|
protected |
|
protected |
|
protected |