SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
msg_headers.h
Go to the documentation of this file.
1#pragma once
2
7
8#include "common/utils.h"
9#include <cstdint>
10#include <cstring>
11#include <vector>
12
13namespace satdump
14{
15 namespace xrit
16 {
17 namespace msg
18 {
19 enum CustomFileParams
20 {
21 JPEG_COMPRESSED,
22 WT_COMPRESSED,
23 };
24
25 struct SegmentIdentificationHeader
26 {
27 static constexpr int TYPE = 128;
28
29 uint8_t type;
30 uint16_t record_length;
31 uint16_t sc_id;
32 uint8_t channel_id;
33 uint16_t segment_sequence_number;
34 uint16_t planned_start_segment;
35 uint16_t planned_end_segment;
36 uint8_t compression;
37
38 SegmentIdentificationHeader(uint8_t *data)
39 {
40 type = data[0];
41 record_length = data[1] << 8 | data[2];
42 sc_id = data[3] << 8 | data[4];
43 channel_id = data[5];
44 segment_sequence_number = data[6] << 8 | data[7];
45 planned_start_segment = data[8] << 8 | data[9];
46 planned_end_segment = data[10] << 8 | data[11];
47 compression = data[12];
48 }
49 };
50 } // namespace msg
51 } // namespace xrit
52} // namespace satdump