MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrDataViewSet.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrDataViewSet_H_
10 #define lgrDataViewSet_H_
11 
12 #include <lgrCore/lgrCore.h>
13 
14 #include <deque>
15 #include <map>
16 #include <vector>
18 #include <vlutil/vlSmartPointers.h>
19 #include <vlutil/vlString.h>
20 
21 namespace MAKLogger
22 {
23  class DtPacket;
24  class DtMessageIOInfo;
25  class DtMessageInput;
26 
28  typedef std::shared_ptr<DtLgrDataViewSet> DtLgrDataViewSetSP;
29 
34  {
35  public:
36 
38  class DataPoint
39  {
40  public:
41  DataPoint() : myTime(-1.0), myType(255), mySize(0) {}
42  DataPoint(unsigned char typeValue, double timeValue, unsigned short sizeValue)
43  : myTime(timeValue), myType(typeValue), mySize(sizeValue) {}
44  DataPoint(const DataPoint &other)
45  : myTime(other.myTime), myType(other.myType), mySize(other.mySize) {}
46  virtual ~DataPoint() {}
47 
48  public:
49  DataPoint &operator=(const DataPoint &other)
50  {if (&other == this) return *this; myTime = other.myTime; myType = other.myType; mySize = other.mySize; return *this;}
51  void setTime(double value) {myTime = value;}
52  double time() const {return myTime;}
53  unsigned long getWholeTime() const { return myTime;}
54  void setSize(short value) {mySize = value;}
55  unsigned short size() const {return mySize;}
56  void setType(char value) {myType = value;}
57  unsigned char type() const {return myType;}
58 
59  protected:
60  double myTime;
61  unsigned short mySize;
62  unsigned char myType;
63  };
64 
65  typedef std::deque<DataPoint> DataPointSet;
66  typedef std::map<unsigned long, size_t> DataPointIndexMap;
67 
68  public:
69 
72 
73 
74  virtual ~DtLgrDataViewSet();
75 
78  virtual void addPacketData(const DtPacket& packet);
79 
87  virtual int classifyPacketType(const DtPacket& packet) const;
88 
95  virtual DtString interactionName(const DtPacket& packet) const;
96 
98  enum class SpikeLane
99  {
100  Ignored,
101  Object,
102  Interaction,
103  Checkpoint
104  };
105 
114  static SpikeLane spikeLane(int classifiedType);
115 
120  SpikeLane spikeLaneForPacket(const DtPacket& packet) const;
121 
130  virtual void prepareForBreakdown(const DtMessageIOInfo* info,
131  const DtMessageInput* fileInput);
132 
141  virtual size_t changedByteCount(const DtPacket& packet) const;
142 
150  virtual DtString changedAttributeSummary(const DtPacket& packet) const;
151 
156  virtual DtString packetTypeName(const DtPacket& packet) const;
157 
160  virtual int packetTypeCode(const DtPacket& packet) const;
161 
165  virtual bool objectLabelIsEntityType() const;
166 
168  virtual void addDataPoint(double time, unsigned char type, unsigned short size);
169 
171  virtual void addDataPoint(DataPoint const& point);
172 
174  virtual void append(const DtLgrDataViewSet& secondSet);
175 
178  virtual void clearAllBeforeTime(double time);
179 
181  virtual void clearSet();
182 
184  DataPointSet::const_iterator begin() const;
185 
187  DataPointSet::const_iterator end() const;
188 
190  DataPoint const& first() const;
191 
193  bool getFirst(DataPoint& firstPoint) const;
194 
196  DataPoint const& last() const;
197 
199  bool getLast(DataPoint& last) const;
200 
202  size_t size() const;
203 
206  virtual size_t fillSetFromTime(DtLgrDataViewSet& dataSet, double startTime, double endTime);
207 
210  virtual size_t fillSetFromIndex(DtLgrDataViewSet& dataSet, size_t startIndex, double endTime);
211 
212  protected:
213 
215  virtual void indexPacketTime(size_t index, unsigned long packetTime);
216 
219  virtual void adjustTimeIndex( const DtLgrDataViewSet& newSet );
220 
221  protected:
222 
229  };
230 }
231 
232 #endif
DataPointIndexMap myTimeIndexMap
Index into data points by time.
Definition: lgrDataViewSet.h:228
SpikeLane
Histogram lane a packet contributes to in the Packet Count View.
Definition: lgrDataViewSet.h:98
unsigned short mySize
Definition: lgrDataViewSet.h:61
void setType(char value)
Definition: lgrDataViewSet.h:56
DataPoint(unsigned char typeValue, double timeValue, unsigned short sizeValue)
Definition: lgrDataViewSet.h:42
void setSize(short value)
Definition: lgrDataViewSet.h:54
unsigned long getWholeTime() const
Definition: lgrDataViewSet.h:53
virtual ~DataPoint()
Definition: lgrDataViewSet.h:46
#define DT_VIRTUAL_CTR(CLASS_NAME, ARG_TYPES_LIST)
Declare a Virtual Constructor Create using DT_VIRTUAL_CTR(CLASS_NAME,ARG_TYPES_LIST) Where CLASS_NAME...
Definition: virtualConstructor.h:34
DataPoint myInvalidPoint
An invalid data point.
Definition: lgrDataViewSet.h:226
unsigned char myType
Definition: lgrDataViewSet.h:62
Contains DT_VIRTUAL_CTR DT_VIRTUAL_CTR_DEFAULTS DT_VIRTUAL_COPY_ASSIGN DT_VIRTUAL_BASE_CTR DT_PURE_VI...
The message input is the interface for objects that provide messages into the pipeline.
Definition: messageInput.h:22
unsigned char type() const
Definition: lgrDataViewSet.h:57
std::map< unsigned long, size_t > DataPointIndexMap
Definition: lgrDataViewSet.h:66
std::deque< DataPoint > DataPointSet
Definition: lgrDataViewSet.h:65
std::shared_ptr< DtLgrDataViewSet > DtLgrDataViewSetSP
Definition: lgrDataViewSet.h:27
double myTime
Definition: lgrDataViewSet.h:60
A message IO info object stores information about a specific message input or output stage...
Definition: messageIoInfo.h:21
unsigned short size() const
Definition: lgrDataViewSet.h:55
void setTime(double value)
Definition: lgrDataViewSet.h:51
A generic packed of typed binary data.
Definition: packet.h:41
DataPoint & operator=(const DataPoint &other)
Definition: lgrDataViewSet.h:49
double time() const
Definition: lgrDataViewSet.h:52
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
Data for a single data point.
Definition: lgrDataViewSet.h:38
DataPoint(const DataPoint &other)
Definition: lgrDataViewSet.h:44
DataPoint()
Definition: lgrDataViewSet.h:41
Collection of data values sorted by time used for data views.
Definition: lgrDataViewSet.h:33
DataPointSet myPoints
The set of data points.
Definition: lgrDataViewSet.h:224
Contains lgrCore library definitions.

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)