MAK Data Logger API Documentation for HLA
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
lgrSim
hlaTimeStampedAttr.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
******************************************************************************/
5
8
9
#if DtHLA
10
#ifndef hlaTimeStampedAttr_H_
11
#define hlaTimeStampedAttr_H_
12
13
#include "
lgrSim.h
"
14
15
#include "
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)
70
{
71
if
(sz != mySize)
72
{
73
delete
[] myValue;
74
mySize = sz;
75
myValue =
new
char
[mySize];
76
}
77
memcpy(myValue,val,sz);
78
}
79
80
private
:
82
DtHlaTimeStampedAttribute
(
const
DtHlaTimeStampedAttribute
&);
84
DtHlaTimeStampedAttribute
& operator=(
const
DtHlaTimeStampedAttribute
&);
85
86
protected
:
87
88
DtAbsoluteTime
myTime
;
89
DtLgrHlaHandle
myHandle
;
90
int
mySize
;
91
char
*
myValue
;
92
};
93
}
94
95
#endif
96
#endif
Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)