MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hlaTimeStampedAttr.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #if DtHLA
10 #ifndef hlaTimeStampedAttr_H_
11 #define hlaTimeStampedAttr_H_
12 
13 #include <lgrSim/lgrSim.h>
14 
15 #include <lgrUtil/absoluteTime.h>
16 
17 #include <vl/rtiNamespace.h>
18 #include <cstring>
19 
20 namespace MAKLogger
21 {
22  class DtLgrHlaMessage;
23 
24  typedef DtU32 DtLgrHlaHandle;
25 
28  class DT_DLL_LGRSIM DtHlaTimeStampedAttribute
29  {
30 
31  public:
32 
34  DtHlaTimeStampedAttribute(DtAbsoluteTime time,
35  DtLgrHlaHandle handle,int size,const void* value) :
36  myTime(time),
37  myHandle(handle),
38  mySize(0),
39  myValue(0)
40  {
41  setValue(size,value);
42  }
43 
44  ~DtHlaTimeStampedAttribute()
45  {
46  delete[] myValue;
47  }
48 
49  inline DtAbsoluteTime time() const
50  {
51  return myTime;
52  }
53 
54  inline DtLgrHlaHandle handle() const
55  {
56  return myHandle;
57  }
58 
59  inline int size() const
60  {
61  return mySize;
62  }
63 
64  inline const void* value() const
65  {
66  return myValue;
67  }
68 
69  inline void setValue(int sz, const void* val, DtAbsoluteTime* time=NULL)
70  {
71  if(sz != mySize)
72  {
73  delete[] myValue;
74  mySize = sz;
75  myValue = new char[mySize];
76  }
77 
78  if (time)
79  {
80  myTime = *time;
81  }
82 
83  memcpy(myValue,val,sz);
84  }
85 
86  private:
88  DtHlaTimeStampedAttribute(const DtHlaTimeStampedAttribute&);
90  DtHlaTimeStampedAttribute& operator=(const DtHlaTimeStampedAttribute&);
91 
92  protected:
93 
94  DtAbsoluteTime myTime;
95  DtLgrHlaHandle myHandle;
96  int mySize;
97  char* myValue;
98  };
99 }
100 
101 #endif
102 #endif
Defines IMPORT/EXPORT macros for lgrSim library.
#define DT_DLL_LGRSIM
Definition: lgrSim.h:21
Contains MAKLogger::DtAbsoluteTime and MAKLogger::DtRelativeTime classes.
class DT_DLL_LGRUTIL DtAbsoluteTime
Definition: absoluteTime.h:22

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)