MAK Data Logger API Documentation for HLA
lgrEntityTracker.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrEntityTracker_H_
10 #define lgrEntityTracker_H_
11 
12 #include "lgrCore.h"
13 #include "filePosition.h"
14 
15 #include <vector>
16 #include <map>
17 #include <vlutil/vlNetTypes.h>
18 #include <vlutil/vlString.h>
19 #include <vlpi/disEnums.h>
20 
21 namespace MAKLogger
22 {
23  class DtPacket;
24  class DtLgrBaseSimManager;
25 
29  {
30  public:
31  typedef int EntryHandle;
32 
33  public:
36 
38  virtual ~DtLgrEntityTracker();
39 
40  private:
44  DtLgrEntityTracker& operator=(const DtLgrEntityTracker&);
45  public:
47  virtual void parsePacket(const DtPacket& packet);
48 
51  virtual EntryHandle addEntry(double firstTime, double lastTime, const DtString& name,
52  const DtString& type, DtForceType force, DtLgrEntityTracker::EntryHandle handle = -1);
53 
58  virtual EntryHandle addTemporaryEntry(const DtString& name);
59 
62  virtual EntryHandle findEntry(const DtString& name) const;
63 
65  virtual void clearEntries();
66 
68  virtual int entityCount() const;
69 
71  virtual EntryHandle entityId(const DtPacket& packet) const;
72 
74  virtual DtString entityName(const DtPacket& packet) const;
75 
77  virtual DtString entityType(const DtPacket& packet) const;
78 
80  virtual DtForceType entityForce(const DtPacket& packet) const;
81 
83  virtual DtPacket* encodePacket() const;
84 
89  virtual void decodePacket(const DtPacket*);
90 
92  virtual double entityFirstTime(EntryHandle handle) const;
93 
95  virtual double entityLastTime(EntryHandle handle) const;
96 
98  virtual DtString entityName(EntryHandle handle) const;
99 
101  virtual DtString entityType(EntryHandle handle) const;
102 
104  virtual DtForceType entityForce(EntryHandle handle) const;
105 
107  virtual bool isPermanentEntry(EntryHandle handle) const;
108 
110  virtual void deserializeFromString(const DtString& data);
111 
113  virtual DtString serialize();
114 
120  virtual void setManager(DtLgrBaseSimManager* manager);
121 
123  virtual EntryHandle begin() const;
124 
126  virtual EntryHandle end() const;
127 
128 
129  typedef int TrackerUpdateId;
130  virtual DtLgrEntityTracker::TrackerUpdateId lastUpdateId() const;
131 
132  protected:
133 
136  {
137  bool temporary;
138 
139  double firstTime;
140  double lastTime;
141  DtForceType force;
144  };
145 
148  {
149  DtNetInt32 entrySize;
150 
151  DtNetFloat64 firstTime;
152  DtNetFloat64 lastTime;
153 
154  DtNetInt32 force;
155 
156  DtNetInt32 nameSize;
157  DtNetInt32 typeSize;
158  };
159 
162  {
163  struct NetTrackerEntryHeader header;
164  char name[1];
165  char type[1];
166  };
167 
170  {
171  DtNetU32 numEntries;
172  DtNetU32 unused;
173  };
174 
194 
195  typedef std::vector<TrackerEntry> TrackerEntryList;
197 
198  typedef std::map<DtString, EntryHandle> TrackerEntryIndex;
200 
203 
204  };
205 }
206 
207 #endif

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)