![]() |
MAK Data Logger API Documentation for HLA
|
Indexes packets in a file. More...
Inheritance diagram for MAKLogger::DtLgrEntityTracker:
Collaboration diagram for MAKLogger::DtLgrEntityTracker:Classes | |
| struct | NetTrackerEntry |
| A tracker entry used for encoding. More... | |
| struct | NetTrackerEntryHeader |
| The entries stored in the packet. More... | |
| struct | NetTrackerTable |
| The table stored at the beginning of the packet followed by the net entries. More... | |
| struct | TrackerEntry |
| An entry in the internal list of tracked entities. More... | |
Public Types | |
| typedef int | EntryHandle |
| typedef int | TrackerUpdateId |
Public Member Functions | |
| DtLgrEntityTracker () | |
| CTOR. | |
| virtual | ~DtLgrEntityTracker () |
| DTOR. | |
| virtual void | parsePacket (const DtPacket &packet) |
| Reads a packet to see if it updates any tracked entity info. | |
| virtual EntryHandle | addEntry (double firstTime, double lastTime, const DtString &name, const DtString &type, DtForceType force, DtLgrEntityTracker::EntryHandle handle=-1) |
| Adds an entry for a first time, last time, and name. | |
| virtual EntryHandle | addTemporaryEntry (const DtString &name) |
| Adds a temporary entry that will not be saved across tape loads. | |
| virtual EntryHandle | findEntry (const DtString &name) const |
| Looks up an entry. | |
| virtual void | clearEntries () |
| Remove all entries. | |
| virtual int | entityCount () const |
| Gets the number of entities currently in the tracker. | |
| virtual EntryHandle | entityId (const DtPacket &packet) const |
| Returns entity ID of a packet. | |
| virtual DtString | entityName (const DtPacket &packet) const |
| Returns unique entity name of a packet – protocol-specific. | |
| virtual DtString | entityType (const DtPacket &packet) const |
| Returns entity type of a packet – protocol-specific. | |
| virtual DtForceType | entityForce (const DtPacket &packet) const |
| Returns force of a packet – protocol-specific. | |
| virtual DtPacket * | encodePacket () const |
| Encode tracker into packet. | |
| virtual void | decodePacket (const DtPacket *) |
| Decode tracker table packet. | |
| virtual double | entityFirstTime (EntryHandle handle) const |
| Returns the first time of indexed entity. | |
| virtual double | entityLastTime (EntryHandle handle) const |
| Returns the last time of indexed entity. | |
| virtual DtString | entityName (EntryHandle handle) const |
| Returns the name of indexed entity. | |
| virtual DtString | entityType (EntryHandle handle) const |
| Returns the type of indexed entity. | |
| virtual DtForceType | entityForce (EntryHandle handle) const |
| Returns the force of indexed entity. | |
| virtual bool | isPermanentEntry (EntryHandle handle) const |
| Returns whether the specified index is a known non-temporary entity. | |
| virtual void | deserializeFromString (const DtString &data) |
| Replace current state with serialized state in string. | |
| virtual DtString | serialize () |
| Return a serialized representation of current state. | |
| virtual void | setManager (DtLgrBaseSimManager *manager) |
| Set the tracker's associated sim manager This is only required within subclassed trackers that require a sim manager connection to decode some of the info, for instance the HLA trackers that need FOM info to find the type and force. | |
| virtual EntryHandle | begin () const |
| Returns the first valid entry handle. | |
| virtual EntryHandle | end () const |
| Returns an entry handle immediately beyond the last valid entry handle. | |
| virtual DtLgrEntityTracker::TrackerUpdateId | lastUpdateId () const |
Protected Types | |
| typedef std::vector< TrackerEntry > | TrackerEntryList |
| The format encoded in the entity table packet (all in network byte order) is as follows: | |
| typedef std::map< DtString, EntryHandle > | TrackerEntryIndex |
Protected Attributes | |
| TrackerEntryList | myTrackedEntities |
| TrackerEntryIndex | myEntityIndex |
| DtLgrBaseSimManager * | myManager |
| TrackerUpdateId | myLastUpdateId |
Private Member Functions | |
| DtLgrEntityTracker (const DtLgrEntityTracker &) | |
| Not Implemented. | |
| DtLgrEntityTracker & | operator= (const DtLgrEntityTracker &) |
| Not Implemented. | |
Indexes packets in a file.
| typedef int MAKLogger::DtLgrEntityTracker::EntryHandle |
|
protected |
|
protected |
The format encoded in the entity table packet (all in network byte order) is as follows:
Header:
DtNetU32 numEntries: total number of entities in the tracker DtNetU32 unused: number of blank entities at the end
Entries:
DtNetInt32 entrySize: total size in bytes of this entry, also the offset to the next entry DtNetFloat64 firstTime: the first time the entity appears DtNetFloat64 lastTime: the last time the entity appears DtNetInt32 force: the force ID of the entity DtNetInt32 nameSize: the number of bytes in the name DtNetInt32 typeSize: the number of bytes in the type char[nameSize] name: the name as a C string char[typeSize] type: the type as a C string char[0-3] padding: padding to bring entrySize to a multiple of four, all zeroes
| typedef int MAKLogger::DtLgrEntityTracker::TrackerUpdateId |
| MAKLogger::DtLgrEntityTracker::DtLgrEntityTracker | ( | ) |
CTOR.
|
virtual |
DTOR.
|
private |
Not Implemented.
|
virtual |
Adds an entry for a first time, last time, and name.
|
virtual |
Adds a temporary entry that will not be saved across tape loads.
If it already exists as either a normal or temporary entry, the existing handle will be returned.
|
virtual |
Returns the first valid entry handle.
|
virtual |
Remove all entries.
|
virtual |
Decode tracker table packet.
The existing entries will be cleared and replaced with the entries stored in the packet. throw DtInvalidInput if the packet is not an entity tracker table packet.
|
virtual |
Replace current state with serialized state in string.
|
virtual |
Encode tracker into packet.
|
virtual |
Returns an entry handle immediately beyond the last valid entry handle.
|
virtual |
Gets the number of entities currently in the tracker.
|
virtual |
Returns the first time of indexed entity.
|
virtual |
Returns force of a packet – protocol-specific.
Reimplemented in MAKLogger::DtLgrHlaEntityTracker, and MAKLogger::DtLgrDisEntityTracker.
|
virtual |
Returns the force of indexed entity.
|
virtual |
Returns entity ID of a packet.
|
virtual |
Returns the last time of indexed entity.
Returns unique entity name of a packet – protocol-specific.
Reimplemented in MAKLogger::DtLgrHlaEntityTracker, and MAKLogger::DtLgrDisEntityTracker.
|
virtual |
Returns the name of indexed entity.
Returns entity type of a packet – protocol-specific.
Reimplemented in MAKLogger::DtLgrHlaEntityTracker, and MAKLogger::DtLgrDisEntityTracker.
|
virtual |
Returns the type of indexed entity.
|
virtual |
Looks up an entry.
|
virtual |
Returns whether the specified index is a known non-temporary entity.
|
virtual |
|
private |
Not Implemented.
|
virtual |
Reads a packet to see if it updates any tracked entity info.
Reimplemented in MAKLogger::DtLgrHlaEntityTracker, and MAKLogger::DtLgrDisEntityTracker.
|
virtual |
Return a serialized representation of current state.
|
virtual |
Set the tracker's associated sim manager This is only required within subclassed trackers that require a sim manager connection to decode some of the info, for instance the HLA trackers that need FOM info to find the type and force.
|
protected |
|
protected |
|
protected |
|
protected |