MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtLgrHlaServerExerciseConnection Class Reference

Replacement of DtExerciseConnection in order adjust time in override of RTI send update/interaction Time is adjusted to accommodate for jumps before sending update/interaction to RTI. More...

+ Inheritance diagram for DtLgrHlaServerExerciseConnection:
+ Collaboration diagram for DtLgrHlaServerExerciseConnection:

Public Member Functions

 DtLgrHlaServerExerciseConnection (const DtExerciseConnInitializer &init, InitializationStatus *status=0)
 This constructor takes a DtExerciseConnInitializer and creates an exercise connection based on the parameters set within the initializer. More...
 
 DtLgrHlaServerExerciseConnection (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(0), const char *fedFileName=0, InitializationStatus *status=0)
 Constructor. More...
 
 DtLgrHlaServerExerciseConnection (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=0, void *fomMapInitData=0, InitializationStatus *status=0)
 Constructor. More...
 
virtual ~DtLgrHlaServerExerciseConnection ()
 destructor More...
 
virtual void setSimManager (MAKLogger::DtLgrHlaSimulationManager *simMgrPtr)
 Set the Logger sim manager used to adjust time. More...
 
virtual void send (const DtStateMsg &msg)
 Send a state message to the network. More...
 
- Public Member Functions inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
 DtServerExerciseConnection (const DtExerciseConnInitializer &init, InitializationStatus *status=0)
 This constructor takes a DtExerciseConnInitializer and creates an exercise connection based on the parameters set within the initializer. More...
 
 DtServerExerciseConnection (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(0), const char *fedFileName=0, InitializationStatus *status=0)
 Constructor. More...
 
 DtServerExerciseConnection (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=0, void *fomMapInitData=0, InitializationStatus *status=0)
 Constructor. More...
 
virtual ~DtServerExerciseConnection ()
 Destructor. More...
 
virtual const DtStringclientExecName () const
 Return the execution name to be used by clients. More...
 
virtual DtServerRtiAmbassadorserverRtiAmb ()
 Access to the RTI ambassador as a DtServerRtiAmbassador. More...
 
virtual const DtStringfedFileName () const
 Get the FED file used by the exercise connection. More...
 
virtual const std::wstring & mimModule () const
 Get the MIM Module given to the exercise connection. More...
 
virtual const DtStringmimModuleAscii () const
 Get the MIM Module given to the exercise connection. More...
 
virtual const std::vector
< std::wstring > & 
fomModules () const
 Get the FOM Modules given to the exercise connection. More...
 
virtual const std::vector
< DtString > & 
fomModulesAscii () const
 Get the FOM Modules given to the exercise connection. More...
 
virtual void getFomModules (std::vector< std::wstring > &allFomModules) const
 Get the FOM Modules used by the exercise connection including main FOM Module and MIM if specified. More...
 
virtual void getFomModules (std::vector< DtString > &allFomModules) const
 Get the FOM Modules used by the exercise connection including main FOM Module and MIM if specified. More...
 
virtual
DtServerFederateAmbassador
serverFederateAmbassador ()
 Access to the federate ambassador as a DtServerFederateAmbassador. More...
 
virtual void setReceiveSelfReflect (unsigned long clientID, bool enableReceiveSelfReflect)
 Enable/disable the reception of self reflects so that the given client will receive self reflects from other clients (enabled by default) More...
 
virtual bool receiveSelfReflectEnabled (unsigned long clientID)
 Return receive self reflect status for given client - true if client exists and enabled. More...
 
virtual void prepareToResign ()
 Set flag to indicate server should prepare to resign. More...
 
virtual void readyToResign (DtClientExerciseConnection *client)
 Client indicates that its ready to resign. More...
 
virtual void rejoined (DtClientExerciseConnection *client)
 Client indicates that its rejoined. More...
 
virtual void forceResign ()
 Client forces resign without waiting for other clients. More...
 
virtual bool doResign () const
 Return true if instructed to do resign. More...
 
virtual bool resignReady () const
 Return true when resign all clients indicate readiness. More...
 
virtual bool resignComplete () const
 Return true when resign has completed. More...
 
virtual bool resignOK () const
 Indicates whether the resign completed successfully or not (e.g., exception thrown) More...
 
virtual bool isJoined () const
 Indicates if server is joined or not. More...
 
virtual bool resign ()
 Process resign from federation Return boolean: operation successful? More...
 
virtual bool rejoin (DtString const &execName)
 Process a rejoin to federation Return boolean: operation successful? More...
 
virtual bool clientsRejoined () const
 Indicates whether all clients have completed rejoin. More...
 
virtual void connect (DtClientExerciseConnection *client)
 Connect the client to this server. More...
 
virtual void disconnect (DtClientExerciseConnection *client)
 Disconnect the client from this server. More...
 
virtual DtClientConnectionMapclientConnections ()
 Get the client connections. More...
 
virtual unsigned int nextConnectionID ()
 Get the next connection ID ID of 0 is invalid - no open slots. More...
 
virtual void addConnectionAddedCallback (DtAddConnectionCb cbFunction, void *usr)
 Add callback for when client connections are added. More...
 
virtual void removeConnectionAddedCallback (DtAddConnectionCb cbFunction, void *usr)
 Remove callback for when client connections are added. More...
 
virtual void addConnectionRemovedCallback (DtRemoveConnectionCb cbFunction, void *usr)
 Add callback for when client connections are removed. More...
 
virtual void removeConnectionRemovedCallback (DtRemoveConnectionCb cbFunction, void *usr)
 Remove callback for when client connections are removed. More...
 
virtual int invokeCallbacks (DtClientExerciseConnection *client, double maximum=-1, double minimum=0)
 Invoke the service calls queued for this client Continue calling while the callbacks are executed and elapsed time does not exceed maximum. More...
 
virtual void getLateJoinDiscoveries (DtClientExerciseConnection *lateJoiner)
 Generate discoveries on the given late joiner for any objects already registered by existing clients. More...
 
virtual bool lockServiceCall ()
 Get mutually exclusive access to RTI Ambassador for callback processing. More...
 
virtual void unlockServiceCall ()
 Release mutually exclusive access to RTI Ambassador from callback processing. More...
 
virtual bool serviceCallLocked ()
 Query if RTI Ambassador is locked while processing callbacks. More...
 
virtual bool enterServiceCall ()
 Get mutually exclusive access to RTI Ambassador for service calls. More...
 
virtual void exitServiceCall ()
 Release mutually exclusive access to RTI Ambassador from service calls. More...
 
virtual bool inServiceCall ()
 Query if RTI Ambassador is locked while processing service calls. More...
 

Static Public Member Functions

static DtServerExerciseConnectioncreate (const DtExerciseConnInitializer &init, InitializationStatus *status=0)
 Base class creators. More...
 
static DtServerExerciseConnectioncreate (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(0), const char *fedFileName=0, InitializationStatus *status=0)
 Base class creators. More...
 
static DtServerExerciseConnectioncreate (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=0, void *fomMapInitData=0, InitializationStatus *status=0)
 Base class creators. More...
 
- Static Public Member Functions inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
static DtServerExerciseConnectionsetInstance (DtServerExerciseConnection *serverExConn, bool replace=false)
 Set the server exercise connection. More...
 
static DtServerExerciseConnectiongetInstance (bool blocking=true)
 Return the created server connection. More...
 
static DtServerExerciseConnectioncreate (const DtExerciseConnInitializer &init, InitializationStatus *status=0)
 Creators. More...
 
static DtServerExerciseConnectioncreate (const char *execName, const char *federateType, DtFomMapper *mapper=DtRprFomMapper::create(0), const char *fedFileName=0, InitializationStatus *status=0)
 Creators. More...
 
static DtServerExerciseConnectioncreate (const char *execName, const char *federateType, const char *dsoName, const char *fedFileName=0, void *fomMapInitData=0, InitializationStatus *status=0)
 Creators. More...
 

Protected Member Functions

virtual void rtiSend (DtInteraction &msg, RTI::InteractionClassHandle handle, const RTI::RegionHandleSet *region)
 Perform the specific RTI send call. More...
 
- Protected Member Functions inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
void init (InitializationStatus *status=0)
 Perform some generic initialization during construction. More...
 
virtual bool reSubscribeAndPublish ()
 Walk through FOM and resubscribe and republish to each class. More...
 
virtual void removeAllObjects ()
 Remove all objects. More...
 

Protected Attributes

MAKLogger::DtLgrHlaSimulationManagermySimMgr
 
- Protected Attributes inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
DtClientConnectionMap myClientConnections
 The client connections. More...
 
unsigned int myNextConnectionID
 Next Connection ID. More...
 
DtAddConnectionCbMap myAddConnCb
 Callbacks for when a client connection is added. More...
 
DtRemoveConnectionCbMap myRemoveConnCb
 Callbacks for when a client connection is added. More...
 
std::set< unsigned int > myPendingReadyToResign
 Clients that need to indicate readiness to resign. More...
 
std::set< unsigned int > myPendingRejoined
 Clients that need to indicate rejoin completed. More...
 
bool myDoResign
 Indicates resign start/finish. More...
 
DtMutex * myCallbackMutex
 Mutex to synchronize access to RTI and Federate Ambassadors. More...
 
unsigned int myLockService
 Server is processing callbacks. More...
 
unsigned int myInService
 Client or server is processing a service call. More...
 
DtServerFederateAmbassadormyServerFederateAmbassador
 Access to the Federate Ambassador as a DtServerFederateAmbassador. More...
 
DtServerRtiAmbassadormyServerRtiAmbassador
 Access to the RTI Ambassador as a DtServerRtiAmbassador. More...
 
bool myResignOK
 Indicates whether the resign completed successfully or not (e.g., exception thrown) More...
 
bool myIsJoined
 Indicates that server is joined to federation. More...
 
std::vector< DtStringmyFomModulesAscii
 Keep a local copy of fom modules to support creation of client exercise connections. More...
 
DtString myMimFomModuleAscii
 Keep a local copy of MIM module to support creation of client exercise connections. More...
 
std::vector< std::wstring > myFomModules
 
std::wstring myMimFomModule
 

Private Member Functions

 DtLgrHlaServerExerciseConnection (const DtLgrHlaServerExerciseConnection &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtLgrHlaServerExerciseConnectionoperator= (const DtLgrHlaServerExerciseConnection &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Additional Inherited Members

- Static Public Attributes inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
static bool theCreateServerConnectionFailed
 Indicates failure to create the server connection. More...
 
- Static Protected Attributes inherited from MAKTrafficClientServerExConn::DtServerExerciseConnection
static DtServerExerciseConnectiontheServerConnection
 

Detailed Description

Replacement of DtExerciseConnection in order adjust time in override of RTI send update/interaction Time is adjusted to accommodate for jumps before sending update/interaction to RTI.

Constructor & Destructor Documentation

DtLgrHlaServerExerciseConnection::DtLgrHlaServerExerciseConnection ( const DtExerciseConnInitializer &  init,
InitializationStatus *  status = 0 
)

This constructor takes a DtExerciseConnInitializer and creates an exercise connection based on the parameters set within the initializer.

DtLgrHlaServerExerciseConnection::DtLgrHlaServerExerciseConnection ( const char *  execName,
const char *  federateType,
DtFomMapper *  mapper = DtRprFomMapper::create(0),
const char *  fedFileName = 0,
InitializationStatus *  status = 0 
)

Constructor.

Mapper is a pointer to a new'ed FOM Mapper to use. The FOM Mapper's init() function will be called by the DtLgrHlaServerExerciseConnection constructor. The default value for mapper is a new'ed DtRprFomMapper. The mapper is deleted by DtLgrHlaServerExerciseConnection destructor. If mapper is NULL, we create one using the creator function passed to setFomMapperCreator (default is an empty FOM Mapper). The FOM Mapper's init function is called after the RTI is initialized. If fedFileName is NULL, <execName>.fed is used. Use status when you want to know whether the exercise connection has successfully initialized itself (see note above under "Error enumerations").

DtLgrHlaServerExerciseConnection::DtLgrHlaServerExerciseConnection ( const char *  execName,
const char *  federateType,
const char *  dsoName,
const char *  fedFileName = 0,
void *  fomMapInitData = 0,
InitializationStatus *  status = 0 
)

Constructor.

Similar to above, but rather than passing a FOM Mapper, pass the name of a shared library (DSO or DLL) that contains a FOM Mapper creation function called DtCreateFomMapper (and a FOM Mapper destruction function called DtDeleteFomMapper. fomMapInitData is a pointer to arbitrary data that you wish to have passed to the FOM Mapper creation function in your FOM Mapper shared library.

virtual DtLgrHlaServerExerciseConnection::~DtLgrHlaServerExerciseConnection ( )
virtual

destructor

DtLgrHlaServerExerciseConnection::DtLgrHlaServerExerciseConnection ( const DtLgrHlaServerExerciseConnection other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

static DtServerExerciseConnection* DtLgrHlaServerExerciseConnection::create ( const DtExerciseConnInitializer &  init,
InitializationStatus *  status = 0 
)
static

Base class creators.

static DtServerExerciseConnection* DtLgrHlaServerExerciseConnection::create ( const char *  execName,
const char *  federateType,
DtFomMapper *  mapper = DtRprFomMapper::create(0),
const char *  fedFileName = 0,
InitializationStatus *  status = 0 
)
static

Base class creators.

static DtServerExerciseConnection* DtLgrHlaServerExerciseConnection::create ( const char *  execName,
const char *  federateType,
const char *  dsoName,
const char *  fedFileName = 0,
void *  fomMapInitData = 0,
InitializationStatus *  status = 0 
)
static

Base class creators.

DtLgrHlaServerExerciseConnection& DtLgrHlaServerExerciseConnection::operator= ( const DtLgrHlaServerExerciseConnection other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void DtLgrHlaServerExerciseConnection::rtiSend ( DtInteraction msg,
RTI::InteractionClassHandle  handle,
const RTI::RegionHandleSet *  region 
)
protectedvirtual

Perform the specific RTI send call.

If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.

virtual void DtLgrHlaServerExerciseConnection::send ( const DtStateMsg &  msg)
virtual

Send a state message to the network.

If using Time Management this may throw DtVrlInvalidTimeException if the time set was below LBTS.

virtual void DtLgrHlaServerExerciseConnection::setSimManager ( MAKLogger::DtLgrHlaSimulationManager simMgrPtr)
virtual

Set the Logger sim manager used to adjust time.

Member Data Documentation

MAKLogger::DtLgrHlaSimulationManager* DtLgrHlaServerExerciseConnection::mySimMgr
protected

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)