|
VR-Engage
2.2
|
#include <cigiSession.h>
Public Types | |
| using | ConfigPtr = std::shared_ptr<DtInitializer> |
| using | EntityPubPtr = std::shared_ptr<DtCigiSimEntityPublisher> |
Public Types inherited from makVre::DtSpSubClass< DtCigiSession > | |
| using | Super |
| using | Ptr |
| using | Sptr |
| using | Wptr |
Public Types inherited from makVre::DtSpObject | |
| using | Ptr = DtSpObject* |
| using | Sptr = std::shared_ptr<DtSpObject> |
| using | Wptr = std::weak_ptr<DtSpObject> |
Public Member Functions | |
| DtCigiSession () | |
| virtual | ~DtCigiSession () override |
| virtual unsigned int | version () const |
| virtual Sptr | setHost (DtCigiHost &host) |
| virtual DtCigiHost & | host () |
| virtual Sptr | setConfig (ConfigPtr config) |
| virtual ConfigPtr | config () |
| virtual Sptr | setIgAddress (std::string address) |
| virtual std::string | igAddress () |
| virtual void | init () |
| virtual void | tick (double dt) |
| virtual unsigned int | frame () const |
| virtual void | advanceFrame () |
| virtual bool | igOnline () |
| virtual bool | igRunning () |
| virtual void | endSession () |
| virtual bool | endingSession () |
| virtual bool | sessionEnded () |
| virtual DtCigiIgControlPublisher::Sptr | rootPublisher () |
| virtual void | resetPublishers () |
| virtual void | addListener (DtCigiListenerBase::Sptr listener) |
| virtual void | requestFrameReceipt (DtCigiPublisherBase::Wptr publisher) |
| virtual void | frameConfirmedReceived (unsigned int receivedFrame) |
| virtual Cigi_int8 | terrainDatabaseId () |
| virtual Cigi_uint16 | claimNextEntitytId (DtCigiPublisherBase::Sptr forWho) |
| virtual bool | useExtendedEntityType () |
| virtual bool | findShortEntityType (const DtEntityType &entityType, Cigi_uint16 &found_id) |
| virtual bool | findCigiPartId (const DtEntityType &entityType, unsigned int partType, Cigi_uint8 &found_id) |
| virtual bool | findMuzzleFlashType (const DtEntityType &munitionType, Cigi_uint16 &found_id) |
| virtual bool | findDetonationType (const DtEntityType &munitionType, Cigi_uint16 &found_id) |
| virtual bool | publishOwnshipOnly () |
| virtual bool | findCigiViewType (const std::string &sensor, Cigi_uint8 &found_type) |
| virtual int | firstViewId () |
| EntityPubPtr | findEntity (const DtEntityIdentifier &entityId) |
| EntityPubPtr | findOrCreateEntity (const DtEntityIdentifier &entityId) |
| virtual DtInitTable | findConfigTableByType (const std::string &mapName, const DtEntityType &entityType) |
| template<typename FIND_T, typename RETURN_T = FIND_T> | |
| bool | findConfigParam (DtInitTable table, const std::string paramName, RETURN_T &ret) |
| template<class CREATE_T> | |
| std::shared_ptr< CREATE_T > | createVersioned () |
Public Member Functions inherited from makVre::DtSpSubClass< DtCigiSession > | |
| DtSpSubClass () | |
| virtual | ~DtSpSubClass () |
| Sptr | self () |
| std::string | type () const override |
Public Member Functions inherited from makVre::DtSpObject | |
| DtSpObject () | |
| virtual | ~DtSpObject () |
| Sptr | self () |
| virtual void | setName (const std::string &name) |
| virtual std::string | name () const |
Protected Types | |
| using | SortedTypeSet = std::set<DtEntityType> |
| using | SortedTypeSetMap = std::map<std::string, SortedTypeSet> |
| using | BestTypeMatchMap = std::map<DtEntityType, DtInitTable> |
| using | BestTypeMatchMapMap = std::map<std::string, BestTypeMatchMap> |
| using | CigiIdMap = std::map<Cigi_uint16, DtCigiPublisherBase::Wptr> |
| using | FrameReceiptRequest = std::pair<DtCigiPublisherBase::Wptr, unsigned int> |
| using | FrameReceiptMap = std::map<void*, FrameReceiptRequest> |
| using | ListenerMap = std::map<Cigi_uint16, DtCigiListenerBase::Sptr> |
Protected Member Functions | |
| virtual void | openSocket () |
| virtual void | initRootPublisher () |
| virtual void | initListeners () |
| virtual void | startSession () |
| virtual DtCigiStartOfFrameListener::Sptr | igStatus () |
| virtual void | checkForIncomingPackets () |
| virtual void | packAndSendFrame () |
| virtual void | updateTerrainDatabaseId () |
| virtual bool | findCigiDatabaseId (const std::string &terrain, Cigi_int8 &found_id) |
Protected Attributes | |
| DtCigiHost * | myHost |
| ConfigPtr | myConfig |
| unsigned int | myVersion |
| std::string | myOverrideIgAddress |
| std::shared_ptr< DtInetSocket > | mySocket |
| DtInetEndpoint | myIgEndpoint |
| std::shared_ptr< CigiHostSession > | mySession |
| DtCigiIgControlPublisher::Sptr | myIgControl |
| unsigned int | myFrame |
| double | myLastFrameTime |
| double | myShutdownStarted |
| Cigi_int8 | myTerrainDatabaseId |
| SortedTypeSetMap | mySortedTypeSetMap |
| BestTypeMatchMapMap | myBestTypeMatchMapMap |
| CigiIdMap | myCigiIdMap |
| Cigi_uint16 | myLastUsedId |
| FrameReceiptMap | myFrameReceiptMap |
| ListenerMap | myListenerMap |
| bool | myFakeIgHeartbeat |
| bool | myShuttingDown |
Protected Attributes inherited from makVre::DtSpObject | |
| std::string | myName |
Additional Inherited Members | |
Static Public Member Functions inherited from makVre::DtSpSubClass< DtCigiSession > | |
| static std::string | Type () |
| static std::shared_ptr< DtCigiSession > | create () |
| static void | registerCreator () |
| static std::shared_ptr< DtCigiSession > | createVersion (unsigned int version) |
| static void | registerCreatorVersion (unsigned int version) |
Static Public Member Functions inherited from makVre::DtSpObject | |
| template<class AS_T> | |
| static std::shared_ptr< AS_T > | cast (Sptr p) |
| template<class AS_T> | |
| static std::shared_ptr< AS_T > | unsafe_cast (Sptr p) |
Static Protected Member Functions inherited from makVre::DtSpSubClass< DtCigiSession > | |
| static std::shared_ptr< DtBaseCreator< DtCigiSession > > & | creator () |
| static std::shared_ptr< DtBaseCreator< DtCigiSession > > & | creatorVersion (unsigned int version) |
| using makVre::DtCigiSession::ConfigPtr = std::shared_ptr<DtInitializer> |
| using makVre::DtCigiSession::EntityPubPtr = std::shared_ptr<DtCigiSimEntityPublisher> |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| makVre::DtCigiSession::DtCigiSession | ( | ) |
|
overridevirtual |
|
virtual |
CIGI Major Version for this Session.
Referenced by createVersioned().
|
virtual |
References host().
|
virtual |
Referenced by setHost().
|
virtual |
Referenced by setConfig().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Called once per Sim tick. Processes all incoming CIGI packets and may send outgoing CIGI packets.
DtCigiSession::tick is called from DtCigiHost::tick which is connected to DtSimObjectManager::signal_advanceFrame.
DtCigiSession::ticks process all CIGI packets received from the IG and dispatches them to the correct Listeners.
If a Start Of Frame is received from the IG indicating that the IG has advanced a frame, then advanceFrame() will be called and the Publishers will be ticked and called upon to update and write CIGI packet data. If no Start Of Frame has been received for the configured updTimeout time, the IG will be marked as offline.
If the IG is offline, Publishers will not be ticked, nor called to update and write CIGI data; except for the root DtCigiIgControlPublisher publisher, which will continue to heartbeat IGCtrl CIGI packets once per second.
| dt | Elapsed time in seconds since the last tick. |
|
virtual |
Returns the Session frame number.
The Session frame number is published by DtCigiIgControlPublisher. The Session frame number does not correspond to the IG frame number, but the Session frame number does advances when the IG frame number advances.
|
virtual |
Advances the Session frame number, updates Publishers and sends CIGI data.
advanceFrame ticks the root Publisher (which in turn ticks all child Publishers), then calls packAndSendFrame(), which will call upon Publishers to update and write CIGI data.
|
virtual |
Returns online status of IG.
The IG is considered online if a Start Of Frame packet has been received within the configured udpTimeout window, and the Start Of Frame packet does not indicate that the IG is in Offline Maintenance mode.
|
virtual |
Returns true if the IG is online and has indicated that it is in Operate mode.
|
virtual |
Begins the process of shutting down the Session.
IG Control Mode is set to Standby and all published CIGI entity states are set to Remove/Destroyed. The Session will continue to tick until receipt of entity removal is confirmed or the IG times out, at which point the IP socket is closed and sessionEnded() will return true.
|
virtual |
Returns true if endSession() has been called.
|
virtual |
Returns true if the process started by endSession() is complete.
|
virtual |
Returns a smart pointer to the root Publisher, a DtCigiIgControlPublisher class.
|
virtual |
Marks all publishers as dirty and clears list of publishers waiting for receipt confirmation.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Gets the next available CIGI EntityID.
| forWho | Publisher this ID will be assigned to. ID is freed when Publisher is deleted. |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
In Publish Ownship Only mode, only the entity(s) with a ViewControl attached are published.
|
virtual |
|
virtual |
| EntityPubPtr makVre::DtCigiSession::findEntity | ( | const DtEntityIdentifier & | entityId | ) |
Find the SimEntityPublisher associted with the given DtEntityIdentifier.
| entityId | DtEntityIdentifier of the Sim Entity to find. |
| EntityPubPtr makVre::DtCigiSession::findOrCreateEntity | ( | const DtEntityIdentifier & | entityId | ) |
Find the SimEntityPublisher associated with the given entityId, or create one if not found.
| entityId | DtEntityIdenifier of the Sim Entity to find, or to create a Publisher for. |
|
virtual |
|
inline |
|
inline |
Creates a new Publisher of the type registered for the given CREATE_T and Session version.
| CREATE_T | Type of Publisher to create. This is usually an abstract base type, and the actual instance will be a derived concete "V#" class. |
References version().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |