-
Notifications
You must be signed in to change notification settings - Fork 0
/
TimeFrameHeader.h
52 lines (40 loc) · 1.33 KB
/
TimeFrameHeader.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
#ifndef TimeFrameHeader_h
#define TimeFrameHeader_h
#include <cstdint>
namespace TimeFrame {
// This format is temporary and should be updated.
namespace v0 {
// "DAEH-FT@" : little endian of "@TF-HEAD"
constexpr uint64_t MAGIC {0x444145482d465440};
struct Header {
uint64_t magic {MAGIC};
uint32_t timeFrameId {0};
uint32_t numSource {0};
uint64_t length {0};
};
} // namespace v0
inline
namespace v1 {
// " MRFEMIT" : little endian of "TIMEFRM "
constexpr uint64_t MAGIC {0x004d5246454d4954};
constexpr uint16_t META {1};
constexpr uint16_t SLICE {2};
struct Header {
uint64_t magic {MAGIC};
uint32_t length {0};
uint16_t hLength {24};
uint16_t type {0};
uint32_t timeFrameId {0};
uint32_t numSource {0};
void Print() {
printf("TimeFrameHeader\n");
printf("Length = %d\n",length);
printf("Header Lenght = %d\n",hLength);
printf("Type = %d\n",type);
printf("timeframeid = %d\n",timeFrameId);
printf("numSource = %d\n",numSource);
}
};
} // namespace v1
} // namespace TimeFrame
#endif