From 3d93df54d024f49895db6277e873dccd10b5baec Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 17 Nov 2019 09:16:57 +0100 Subject: The first test (file file-base simmulation) --- src/ufo-roof.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ufo-roof.h (limited to 'src/ufo-roof.h') 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 */ -- cgit v1.2.3