diff options
Diffstat (limited to 'src/ufo-roof.h')
-rw-r--r-- | src/ufo-roof.h | 20 |
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 */ |