MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
MAKLogger::DtLgrDisEntityTracker Class Reference

Indexes packets in a file. More...

+ Inheritance diagram for MAKLogger::DtLgrDisEntityTracker:
+ Collaboration diagram for MAKLogger::DtLgrDisEntityTracker:

Public Member Functions

virtual ~DtLgrDisEntityTracker ()
 DTOR. More...
 
virtual void parsePacket (const DtPacket &packet, const DtAbsoluteTime *time=0)
 Reads a packet to update tracked entity info Use time for packet if given; otherwise, use packet time. More...
 
virtual DtLgrEntityTrackercreateFromPacket (const DtPacket &packet)
 Create a tracker from table packet. More...
 
virtual DtString entityName (const DtPacket &packet) const
 Returns entity ID of a packet. More...
 
virtual DtString entityType (const DtPacket &packet) const
 Returns entity type of a packet. More...
 
virtual DtForceType entityForce (const DtPacket &packet) const
 Returns entity force of a packet. More...
 
virtual DtString entityMarking (const DtPacket &packet) const
 Returns entity marking of a packet – protocol-specific. More...
 
- Public Member Functions inherited from MAKLogger::DtLgrEntityTracker
virtual ~DtLgrEntityTracker ()
 DTOR. More...
 
virtual void simInitialize (DtLgrBaseSimManager *simMgr)
 After connecting to the simulation, perform some initialization. More...
 
virtual EntryHandle begin () const
 Returns the first valid entry handle. More...
 
virtual EntryHandle end () const
 Returns an entry handle immediately beyond the last valid entry handle. More...
 
virtual
DtLgrEntityTracker::TrackerUpdateId 
lastUpdateId () const
 Return a counter which when compared to a previously retrieved value indicates that this tracker has been updated if the values are different. More...
 
virtual EntryHandle addEntry (double firstTime, double lastTime, const DtString &name, const DtString &type, DtForceType force, const DtString &marking, DtLgrEntityTracker::EntryHandle handle=-1)
 Adds a tracked entry using the provided data. More...
 
virtual EntryHandle addEntry (const TrackerEntry &entry, DtLgrEntityTracker::EntryHandle handle=-1)
 Adds the given tracked entry. More...
 
virtual EntryHandle addTemporaryEntry (const DtString &name)
 Adds a temporary entry with the given name that will not be saved across tape loads. More...
 
virtual EntryHandle addTemporaryMarking (const DtString &marking)
 Adds a temporary entry with the given marking and since a name is necessary the marking will also be used as its name. More...
 
virtual EntryHandle findEntry (const DtString &name) const
 Looks up an entry. More...
 
virtual int entityCount () const
 Gets the number of entities currently in the tracker. More...
 
virtual void clearEntries ()
 Remove all entries. More...
 
virtual bool isPermanentEntry (EntryHandle handle) const
 Returns whether the specified index is a known non-temporary entity. More...
 
virtual const TrackerEntryentry (DtLgrEntityTracker::EntryHandle handle) const
 Return the entry with the given handle. More...
 
virtual double entityFirstTime (EntryHandle handle) const
 Returns the first time of indexed entity. More...
 
virtual double entityLastTime (EntryHandle handle) const
 Returns the last time of indexed entity. More...
 
virtual DtString entityName (EntryHandle handle) const
 Returns the name of indexed entity. More...
 
virtual DtString entityType (EntryHandle handle) const
 Returns the type of indexed entity. More...
 
virtual DtForceType entityForce (EntryHandle handle) const
 Returns the force of indexed entity. More...
 
virtual DtString entityMarking (EntryHandle handle) const
 Returns the marking of indexed entity. More...
 
virtual void parsePackets (const DtMessageBuffer &packetBuffer, const DtAbsoluteTime *time=0)
 Reads a buffer of packets to update tracked entity info Use time for packets if given. More...
 
virtual EntryHandle entityId (const DtPacket &packet) const
 Returns entry handle of the entity in the packet if packet specifies an entity and the entity is already tracked; otherwise, entry handle is invalid. More...
 
virtual int encodedSize () const
 Return size of encoded data. More...
 
virtual DtPacketencodePacket () const
 Encode tracker into packet. More...
 
virtual void decodePacket (const DtPacket *)
 Decode tracker table packet. More...
 
virtual void deserializeFromString (const DtString &data)
 Replace current state with serialized state in string. More...
 
virtual DtString serialize ()
 Return a serialized representation of current state. More...
 
virtual DtString serializeAdded ()
 Return a serialized representation of current state. More...
 

Protected Member Functions

 DtLgrDisEntityTracker (const DtLgrDisEntityTracker &)
 Not Implemented. More...
 
DtLgrDisEntityTrackeroperator= (const DtLgrDisEntityTracker &)
 Not Implemented. More...
 
- Protected Member Functions inherited from MAKLogger::DtLgrEntityTracker
virtual TrackerEntry makeInvalidEntry () const
 Makes an empty tracker entry. More...
 
virtual unsigned encodedEntrySize (const TrackerEntry &entry, bool includePadding=true) const
 Return the size required to encode the given entry. Size of padding is included by default. More...
 
virtual char * encodeEntry (char *entryData, const TrackerEntry &entry) const
 Encode tracker entry into the given data buffer. More...
 
virtual const char * decodeEntry (const char *entryData)
 Decode tracker entry data and add the entry to the table. More...
 
virtual void advanceToNextToken (const char *&data, const char *dataEnd)
 Skip over current token and get pointer to the next token in serialized buffer. More...
 
bool getFloat (const char *&token, const char *dataEnd, const DtString &tokenName, float &value)
 
bool getInt (const char *&token, const char *dataEnd, const DtString &tokenName, int &value)
 
bool getString (const char *&token, const char *dataEnd, const DtString &tokenName, DtString &value)
 
virtual void deserializeEntryFromString (const char **data, const char *dataEnd)
 Deserialize an entry from the given data up to the given end. More...
 
virtual void serializeEntry (DtString &serialized, unsigned index, const TrackerEntry &entry)
 Append the entry with the given index to the given serialized data. More...
 

Additional Inherited Members

- Public Types inherited from MAKLogger::DtLgrEntityTracker
typedef int TrackerUpdateId
 
typedef int EntryHandle
 
typedef std::set
< DtLgrEntityTracker::EntryHandle
EntryHandleSet
 
- Protected Types inherited from MAKLogger::DtLgrEntityTracker
enum  TrackedDataIndex { DtTrackName = 0, DtTrackType = 1, DtTrackMarking = 2 }
 
typedef std::vector< TrackerEntryTrackerEntryList
 The format encoded in the entity table packet (all in network byte order) is as follows: More...
 
typedef std::map< DtString,
EntryHandle
TrackerEntryIndex
 
- Protected Attributes inherited from MAKLogger::DtLgrEntityTracker
DtLgrBaseSimManagermySimMgr
 The simulation manager. More...
 
TrackerEntryList myTrackedEntities
 The tracked entities. More...
 
std::map< unsigned int,
TrackerEntry
myAddedEntities
 Recently added tracked entities (as of last serialize) Includes temporary entities. More...
 
TrackerEntryIndex myEntityIndex
 Map of tracked entity handles by name. More...
 
TrackerUpdateId myLastUpdateId
 The update ID counter. More...
 
int myNumberTrackedData
 Number of variable tracked data in an encoded entry. More...
 
int myAlignmentSize
 Byte alignment size. More...
 
const TrackerEntry myInvalidEntry
 An invalid entry. More...
 
const char myFieldSeparator
 Serialize field separator. More...
 
const DtString myFieldSeparatorString
 Serialize field separator. More...
 
- Static Protected Attributes inherited from MAKLogger::DtLgrEntityTracker
static DtString theSerializeLabel
 

Detailed Description

Indexes packets in a file.

Constructor & Destructor Documentation

virtual MAKLogger::DtLgrDisEntityTracker::~DtLgrDisEntityTracker ( )
virtual

DTOR.

MAKLogger::DtLgrDisEntityTracker::DtLgrDisEntityTracker ( const DtLgrDisEntityTracker )
protected

Not Implemented.

Member Function Documentation

virtual DtLgrEntityTracker* MAKLogger::DtLgrDisEntityTracker::createFromPacket ( const DtPacket packet)
virtual

Create a tracker from table packet.

A new tracker with the decoded data will be returned. throw DtInvalidInput if the packet is not an entity tracker table packet.

Implements MAKLogger::DtLgrEntityTracker.

Reimplemented in MAKLogger::DtLgrDisLegacyEntityTracker.

virtual DtForceType MAKLogger::DtLgrDisEntityTracker::entityForce ( const DtPacket packet) const
virtual

Returns entity force of a packet.

Implements MAKLogger::DtLgrEntityTracker.

virtual DtString MAKLogger::DtLgrDisEntityTracker::entityMarking ( const DtPacket packet) const
virtual

Returns entity marking of a packet – protocol-specific.

Implements MAKLogger::DtLgrEntityTracker.

virtual DtString MAKLogger::DtLgrDisEntityTracker::entityName ( const DtPacket packet) const
virtual

Returns entity ID of a packet.

Implements MAKLogger::DtLgrEntityTracker.

virtual DtString MAKLogger::DtLgrDisEntityTracker::entityType ( const DtPacket packet) const
virtual

Returns entity type of a packet.

Implements MAKLogger::DtLgrEntityTracker.

DtLgrDisEntityTracker& MAKLogger::DtLgrDisEntityTracker::operator= ( const DtLgrDisEntityTracker )
protected

Not Implemented.

virtual void MAKLogger::DtLgrDisEntityTracker::parsePacket ( const DtPacket packet,
const DtAbsoluteTime time = 0 
)
virtual

Reads a packet to update tracked entity info Use time for packet if given; otherwise, use packet time.

Reimplemented from MAKLogger::DtLgrEntityTracker.


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)