VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
DtNetworkManagerInterface Class Referenceabstract

DtNetworkManagerInterface is the base class which all network interfaces must be derived from. It represents a connection from the sim engine to the network, such as for DIS or HLA. The DtNetworkInterfaceManager manages all instances of DtNetworkManagerInterface. Normally there is just a single DtNetworkManagerInterface created, but it is possible to have multiple.

Inheritance diagram for DtNetworkManagerInterface:
Inheritance graph
[legend]

Public Types

enum  AddEventResult { DoNotContinue = 0, Continue = 0x00000001 }
 

Public Member Functions

 DtNetworkManagerInterface ()
 
virtual ~DtNetworkManagerInterface ()
 
virtual void beginFrame (double simTime)=0
 
virtual bool preAdvanceFrame ()=0
 
virtual void advanceFrame (double *networkFrameTime=nullptr)=0
 
virtual const chartype () const =0
 
virtual bool stateDataAdded (makVrf::DtStateData *)=0
 
virtual void stateDataAboutToBeRemoved (const makVrf::DtStateData *)=0
 
virtual bool printDataToStream (const DtUUID &, DtOutputStream &) const =0
 
virtual void setInterest (const DtVector &geocentricCenter, double radius)=0
 
virtual bool init (DtCommunicationManager *)=0
 
virtual void reserve (unsigned numToReserve)=0
 
virtual void setNumCallbackThreads (unsigned)=0
 
virtual void setEnabled (bool)=0
 
virtual std::string protocol () const =0
 
virtual void setRunFullyThreaded (bool)=0
 
virtual void printReflectedObjectCounts () const =0
 
virtual void requestUpdatesForRemoteNonVrfObjects () const =0
 
virtual const makVrf::DtStateDatastateDataForGlobalId (const DtString &) const =0
 
virtual void setCoordinateSystem (const Coordinate_System *)=0
 
virtual void setParameterDatabase (DtVrfParameterDb *)=0
 
virtual unsigned int maxNameLengthForType (const DtObjectType &) const =0
 
virtual void setVrfSessionId (int)=0
 
virtual void setVrfMessageVersionSupported (int)=0
 
virtual void startScenarioLoad (bool)=0
 
virtual void endScenarioLoad (bool)=0
 
virtual void setSiteAppId (int, int)=0
 
virtual AddEventResult addEvent (const makVrfEvents::DtEvent &, bool &selfReflected)=0
 
virtual AddEventResult sendEvent (const makVrfEvents::DtEvent &)=0
 
virtual void setEventManager (makVrfEvents::DtEventManager *)=0
 
virtual void resetSimulation ()=0
 
virtual void setFrameRateMode (const DtString &mode, double deltaTime, bool manageTime=false)=0
 
virtual void rewindScenario ()=0
 
virtual void run ()=0
 
virtual void pause ()=0
 
virtual bool typeIsPublishable (const DtEntityType &) const =0
 
virtual void setSimTime (double)=0
 
virtual void setTimeMultiplier (double)=0
 
virtual void setExerciseStartTime (double)=0
 
virtual bool validateScenario (const DtScenario &, DtString &error) const =0
 
virtual double determineSimTime (double &dt)
 
virtual bool hasSimulationTime () const =0
 
virtual void removeAndDeleteAll ()=0
 
virtual bool needsUnpublishedDatabase () const =0
 
virtual bool selfReflecting () const =0
 
virtual void setSelfReflecting (bool)=0
 
virtual bool rediscoverObjects ()=0
 
virtual bool publishingOnLegionNetwork () const =0
 
virtual void beginBulkCreate ()
 
virtual void endBulkCreate ()
 

Member Enumeration Documentation

When adding an event, return a flag that represent the result of the addEvent. Return DoNotContinue if this event should stop at this event manager.

Enumerator
DoNotContinue 
Continue 

Constructor & Destructor Documentation

DtNetworkManagerInterface::DtNetworkManagerInterface ( )
inline

constructor

virtual DtNetworkManagerInterface::~DtNetworkManagerInterface ( )
inlinevirtual

Member Function Documentation

virtual void DtNetworkManagerInterface::beginFrame ( double  simTime)
pure virtual

Called when the frame is stated. The sim time passed in will be that from determineSimTime call.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::preAdvanceFrame ( )
pure virtual

Called when the frame wants to be advanced. Called before state data advance. Return false to not continue advancing frame. This can be useful if the network is still processing and the application doesn't want to block.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::advanceFrame ( double networkFrameTime = nullptr)
pure virtual

Called when the frame wants to be advanced and possibly process the network. If networkFrameTime is supplied, return the amount of time spent processing network messages.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual const char* DtNetworkManagerInterface::type ( ) const
pure virtual

Type to uniquely identify this manager.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::stateDataAdded ( makVrf::DtStateData )
pure virtual

Called when state data is added. Return true to signal that this network interface is handling the publication of this state data and no other interface should. Called in interface insertion order.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::stateDataAboutToBeRemoved ( const makVrf::DtStateData )
pure virtual

Called when state data is about to be removed.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::printDataToStream ( const DtUUID ,
DtOutputStream &   
) const
pure virtual

Given the SimStateID, print data to the stream. Return try if the given data is published by this network interface.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setInterest ( const DtVector geocentricCenter,
double  radius 
)
pure virtual

In case the interface wants to do interest management, the interest of this back-end.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::init ( DtCommunicationManager )
pure virtual

Called when added to the network interface manager. Return false to not add to manager.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::reserve ( unsigned  numToReserve)
pure virtual

Connector dependent. Reserve data for the number of objects to be created.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setNumCallbackThreads ( unsigned  )
pure virtual

If supported, number of network threads to use.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setEnabled ( bool  )
pure virtual

Whether or not the communication manager is enabled for receiving information.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual std::string DtNetworkManagerInterface::protocol ( ) const
pure virtual

Descriptive text of the network protocol.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setRunFullyThreaded ( bool  )
pure virtual

Whether or not to run fully threaded.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::printReflectedObjectCounts ( ) const
pure virtual

Print non locally simulated object count to the screen.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::requestUpdatesForRemoteNonVrfObjects ( ) const
pure virtual

If there are objects on other simulation systems, and the network protocol supports the request, request to force an update of any non simulated VR-Forces object.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual const makVrf::DtStateData* DtNetworkManagerInterface::stateDataForGlobalId ( const DtString ) const
pure virtual

Given the global object designator, return the state data associated with it.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setCoordinateSystem ( const Coordinate_System )
pure virtual

Sets the coordinate system used in this simulation.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setParameterDatabase ( DtVrfParameterDb )
pure virtual

VRF specific for creating network interfaces from parameter data.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual unsigned int DtNetworkManagerInterface::maxNameLengthForType ( const DtObjectType ) const
pure virtual

If the network interface supports it, the maximum name of a marking text.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setVrfSessionId ( int  )
pure virtual

If used, the session id this VRF session is in.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setVrfMessageVersionSupported ( int  )
pure virtual

If used the message version this VRF session uses.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::startScenarioLoad ( bool  )
pure virtual

Called when starting scenario load. True is passed in to reuse identifiers if network dependent.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::endScenarioLoad ( bool  )
pure virtual

Called when ending scenario load. True is passed in to reuse identifiers if network dependent.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setSiteAppId ( int  ,
int   
)
pure virtual

The site and app id of this back-end.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual AddEventResult DtNetworkManagerInterface::addEvent ( const makVrfEvents::DtEvent ,
bool selfReflected 
)
pure virtual

Send this event on the network. selfReflected will return true if the act of adding the event also adds it to the event manager as a process of sending on the network.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual AddEventResult DtNetworkManagerInterface::sendEvent ( const makVrfEvents::DtEvent )
pure virtual

Sends event on network without adding to event manager if immediately self reflected.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setEventManager ( makVrfEvents::DtEventManager )
pure virtual

Sets the event manager to use process messages received from the netowkr.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::resetSimulation ( )
pure virtual

Called when the simulation is ending and wants to reset.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setFrameRateMode ( const DtString mode,
double  deltaTime,
bool  manageTime = false 
)
pure virtual

Sets the mode for the exercise clock.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::rewindScenario ( )
pure virtual

Called when the scenario is rewound.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::run ( )
pure virtual

Puts the simulation into run mode by letting the network connections know.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::pause ( )
pure virtual

Puts the simulation into pause mode by letting the network connections know.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::typeIsPublishable ( const DtEntityType &  ) const
pure virtual

Returns true if the entity type is publishable by this connection.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setSimTime ( double  )
pure virtual

Sets the current simulation time.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setTimeMultiplier ( double  )
pure virtual

Sets the current time multiplier.

Implemented in makVrf::DtLegionNetworkInterface, and makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::setExerciseStartTime ( double  )
pure virtual

Start day/date time of the exercise.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::validateScenario ( const DtScenario ,
DtString error 
) const
pure virtual

Return false if this scenario is not valid.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual double DtNetworkManagerInterface::determineSimTime ( double dt)
inlinevirtual

Determine the next simulation time. Implement only if hasSimulationTime returns true.

Reimplemented in makVrf::DtVrlinkNetworkInterface.

virtual bool DtNetworkManagerInterface::hasSimulationTime ( ) const
pure virtual

Return true if this network interface also deals with simulation time.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::removeAndDeleteAll ( )
pure virtual

Called when all objects are being deleted, will indicate that all remotes will eventually need to be rediscovered.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::needsUnpublishedDatabase ( ) const
pure virtual

Return true if this connection uses the simulation database to publish on (as a legion connection does). If so then this connection will also need to let the system know it needs to provide an unpublished database.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::selfReflecting ( ) const
pure virtual

Returns true if any of the connections are self reflecting.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::setSelfReflecting ( bool  )
pure virtual

Sets all connections (if supported) to self reflecting. This will only apply to current handlers, not ones that are added after this is called.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::rediscoverObjects ( )
pure virtual

Rediscover all remote objects.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual bool DtNetworkManagerInterface::publishingOnLegionNetwork ( ) const
pure virtual

Whether or not this interface publishes on the legion network.

Implemented in makVrf::DtVrlinkNetworkInterface, and makVrf::DtLegionNetworkInterface.

virtual void DtNetworkManagerInterface::beginBulkCreate ( )
inlinevirtual

Signaling the start/end of bulk object creation.

Reimplemented in makVrf::DtVrlinkNetworkInterface.

virtual void DtNetworkManagerInterface::endBulkCreate ( )
inlinevirtual

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)