-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
60 lines (41 loc) · 1.14 KB
/
header.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "dis6_global.h"
//This Object represents a DIS v6 header
#include <cstdint>
namespace DIS6
{
class DataStream;
class DIS6_EXPORT Header
{
public:
Header();
virtual ~Header();
Header(const Header& header);
//Take data from Header and put into ByteArray
virtual void pack(DataStream& data) const;
//Take data from ByteArray and put into Header
virtual void unpack(DataStream& data);
uint8_t version() const;
void setVersion(const uint8_t &version);
uint8_t exercise() const;
void setExercise(const uint8_t &exercise);
uint8_t type() const;
void setType(const uint8_t &type);
uint8_t family() const;
void setFamily(const uint8_t &family);
uint32_t timestamp() const;
void setTimestamp(const uint32_t ×tamp);
uint16_t length() const;
void setLength(const uint16_t &length);
uint16_t padding() const;
void setPadding(const uint16_t &padding);
protected:
uint8_t m_version; //defaults to DIS6
uint8_t m_exercise;
uint8_t m_type;
uint8_t m_family;
uint32_t m_timestamp;
uint16_t m_length;
uint16_t m_padding;
};
}