![]() |
VR-Forces 4.0.4 Class Documentation
|
Derived from DtSimEntityNetInterface, DtSimRemoteEntityNetInterface provides an interface between the local representation of a remote entity and it's network (VR-Link) representation. More...

Public Member Functions | |
| DtSimRemoteEntityNetInterface (const DtString &name, DtVrfObject *simObject, DtReaderWriterRegistry *parentRegistry=0, bool publishObject=true) | |
| read/writable constructor | |
| DtSimRemoteEntityNetInterface (const DtSimRemoteEntityNetInterface &orig, DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor; NOTE: The publisher is not copied, because VR-Link does not provide a copy constructor (or clone or assignment function) for a publisher. | |
| const DtSimRemoteEntityNetInterface & | operator= (const DtSimRemoteEntityNetInterface &orig) |
| assignment operator; see note on copy constructor above | |
| virtual | ~DtSimRemoteEntityNetInterface () |
| destructor; calls destroyPublisher() | |
| virtual bool | init () |
| override of base class init(). | |
| virtual void | onTick () |
| override of base class onTick(), calls updateFromReflectedObject() | |
| virtual void | updateFromReflectedObject ()=0 |
| this will copy from whatever type of reflected object and associated network state repository the deriving class uses to the local state repository | |
| virtual void | setupFromNetworkRepository () |
| initializes parts of the local repository from the network state rep. | |
| virtual void | setReflectedObject (DtReflectedObject *reflectedObject) |
| For local entities, a publisher can be created or supplied via a set<>Publisher call. | |
| virtual const DtReflectedObject * | reflectedObject () const |
| virtual DtReflectedObject * | reflectedObject () |
| virtual bool | isLocal () const |
| This network interface is for local entities. | |
| virtual bool | isAggregate () const =0 |
| virtual void | setUpdateReceived (bool updateReceived) |
| Setting update received to true will cause updateFromRemoteObject() to be called on the next tick. | |
| virtual bool | updateReceived () const |
| Check to see if an update has been received from the network. | |
Static Public Member Functions | |
| static const DtSimRemoteEntityNetInterface * | isRemoteEntityNetInterface (const DtSimObjectNetInterface *objNetInterface) |
| This function will return the objNetInterface passed in, cast to a DtSimRemoteEntityNetInterface*, provided the objNetInterface is indeed an remote entity network interface. | |
| static DtSimRemoteEntityNetInterface * | isRemoteEntityNetInterface (DtSimObjectNetInterface *objNetInterface) |
| static void | reflectedObjectUpdateCallbackFunction (DtReflectedObject *obj, void *userData) |
Protected Member Functions | |
| DtSimRemoteEntityNetInterface () | |
| default constructor | |
Protected Attributes | |
| DtReflectedObject * | myReflectedObject |
| Pointer to the VR-Link Reflected Object (may be a DtReflectedEntity, DtReflectedExtAggregate, etc. | |
| bool | myUpdateReceived |
| Set to true by post-update callback; set to false after update has been processed. | |
Derived from DtSimEntityNetInterface, DtSimRemoteEntityNetInterface provides an interface between the local representation of a remote entity and it's network (VR-Link) representation.
This is an abstract class whose deriving classes will represent different types of entities, such as individual, aggregate, and eventually, environmental
| DtSimRemoteEntityNetInterface::DtSimRemoteEntityNetInterface | ( | ) | [protected] |
default constructor
| DtSimRemoteEntityNetInterface::DtSimRemoteEntityNetInterface | ( | const DtString & | name, |
| DtVrfObject * | simObject, | ||
| DtReaderWriterRegistry * | parentRegistry = 0, |
||
| bool | publishObject = true |
||
| ) |
read/writable constructor
| DtSimRemoteEntityNetInterface::DtSimRemoteEntityNetInterface | ( | const DtSimRemoteEntityNetInterface & | orig, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor; NOTE: The publisher is not copied, because VR-Link does not provide a copy constructor (or clone or assignment function) for a publisher.
Therefore, you must call init() on the copy after construction, or call setPublisher() with a user constructed publisher
| virtual DtSimRemoteEntityNetInterface::~DtSimRemoteEntityNetInterface | ( | ) | [virtual] |
destructor; calls destroyPublisher()
| const DtSimRemoteEntityNetInterface& DtSimRemoteEntityNetInterface::operator= | ( | const DtSimRemoteEntityNetInterface & | orig | ) |
assignment operator; see note on copy constructor above
| virtual bool DtSimRemoteEntityNetInterface::init | ( | ) | [virtual] |
override of base class init().
Registers for post update callbacks on reflected object.
Reimplemented from DtSimObjectNetInterface.
Reimplemented in DtVrfAggregateRemoteEntityNetInterface, and DtVrfIndividualRemoteEntityNetInterface.
| virtual void DtSimRemoteEntityNetInterface::onTick | ( | ) | [virtual] |
override of base class onTick(), calls updateFromReflectedObject()
Implements DtSimObjectNetInterface.
Reimplemented in DtVrfAggregateRemoteEntityNetInterface, and DtVrfIndividualRemoteEntityNetInterface.
| virtual void DtSimRemoteEntityNetInterface::updateFromReflectedObject | ( | ) | [pure virtual] |
this will copy from whatever type of reflected object and associated network state repository the deriving class uses to the local state repository
Implemented in DtVrfIndividualRemoteEntityNetInterface, DtSimAggregateRemoteEntityNetInterface, DtSimIndividualRemoteEntityNetInterface, and MyIndividualRemoteEntityNetInterface.
| virtual void DtSimRemoteEntityNetInterface::setupFromNetworkRepository | ( | ) | [virtual] |
initializes parts of the local repository from the network state rep.
This needs to be done after the call to setReflectedObject()
| virtual void DtSimRemoteEntityNetInterface::setReflectedObject | ( | DtReflectedObject * | reflectedObject | ) | [virtual] |
For local entities, a publisher can be created or supplied via a set<>Publisher call.
For remote entities a reflected object is used instead, and must always be supplied (there is no create equivalent to the local entity network interface). This function also sets the network state repository pointer (myBaseNetworkState) to the repository created by this reflected object
| virtual const DtReflectedObject* DtSimRemoteEntityNetInterface::reflectedObject | ( | ) | const [virtual] |
| virtual DtReflectedObject* DtSimRemoteEntityNetInterface::reflectedObject | ( | ) | [virtual] |
| virtual bool DtSimRemoteEntityNetInterface::isLocal | ( | ) | const [inline, virtual] |
This network interface is for local entities.
Implements DtSimObjectNetInterface.
| virtual bool DtSimRemoteEntityNetInterface::isAggregate | ( | ) | const [pure virtual] |
Implemented in DtSimAggregateRemoteEntityNetInterface, and DtSimIndividualRemoteEntityNetInterface.
| virtual void DtSimRemoteEntityNetInterface::setUpdateReceived | ( | bool | updateReceived | ) | [virtual] |
Setting update received to true will cause updateFromRemoteObject() to be called on the next tick.
| virtual bool DtSimRemoteEntityNetInterface::updateReceived | ( | ) | const [virtual] |
Check to see if an update has been received from the network.
| static const DtSimRemoteEntityNetInterface* DtSimRemoteEntityNetInterface::isRemoteEntityNetInterface | ( | const DtSimObjectNetInterface * | objNetInterface | ) | [static] |
This function will return the objNetInterface passed in, cast to a DtSimRemoteEntityNetInterface*, provided the objNetInterface is indeed an remote entity network interface.
| static DtSimRemoteEntityNetInterface* DtSimRemoteEntityNetInterface::isRemoteEntityNetInterface | ( | DtSimObjectNetInterface * | objNetInterface | ) | [static] |
| static void DtSimRemoteEntityNetInterface::reflectedObjectUpdateCallbackFunction | ( | DtReflectedObject * | obj, |
| void * | userData | ||
| ) | [static] |
DtReflectedObject* DtSimRemoteEntityNetInterface::myReflectedObject [protected] |
Pointer to the VR-Link Reflected Object (may be a DtReflectedEntity, DtReflectedExtAggregate, etc.
).
bool DtSimRemoteEntityNetInterface::myUpdateReceived [protected] |
Set to true by post-update callback; set to false after update has been processed.