summaryrefslogtreecommitdiffstats
path: root/src/ufo-roof.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-11-17 09:16:57 +0100
committerSuren A. Chilingaryan <csa@suren.me>2019-11-17 09:16:57 +0100
commit3d93df54d024f49895db6277e873dccd10b5baec (patch)
treec664797c69e4b4680d04aee7669da03e452e0c5d /src/ufo-roof.h
downloadufo-roof-temp-3d93df54d024f49895db6277e873dccd10b5baec.tar.gz
ufo-roof-temp-3d93df54d024f49895db6277e873dccd10b5baec.tar.bz2
ufo-roof-temp-3d93df54d024f49895db6277e873dccd10b5baec.tar.xz
ufo-roof-temp-3d93df54d024f49895db6277e873dccd10b5baec.zip
The first test (file file-base simmulation)
Diffstat (limited to 'src/ufo-roof.h')
-rw-r--r--src/ufo-roof.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ufo-roof.h b/src/ufo-roof.h
new file mode 100644
index 0000000..c3edda2
--- /dev/null
+++ b/src/ufo-roof.h
@@ -0,0 +1,20 @@
+#ifndef __UFO_ROOF_H
+#define __UFO_ROOF_H
+
+#include "ufo-roof-config.h"
+#include "ufo-roof-error.h"
+
+#define UFO_ROOF_PACKET_HEADER(buf) ((UfoRoofPacketHeader*)(buf))
+#define UFO_ROOF_PACKET_BLOCK_HEADER(buf, cfg) ((UfoRoofPacketBlockHeader*)(((void*)buf) + cfg->max_packets * cfg->max_packet_size))
+
+typedef struct {
+ uint32_t packet_id; // Sequential Packet ID (numbered from 0)
+} UfoRoofPacketHeader;
+
+typedef struct {
+ uint32_t channel_id; // Specifies channel on which the data were received (numbered from 0)
+ uint32_t n_packets; // Number of packets
+} UfoRoofPacketBlockHeader;
+
+
+#endif /* __UFO_ROOF_H */