#ifndef __ROOF_H #define __ROOF_H #include "ufo-roof-config.h" #include "ufo-roof-error.h" //#define ROOF_DEBUG #define ROOF_PACKET_HEADER(buf) ((RoofPacketHeader*)(buf)) #define ROOF_PACKET_BLOCK_HEADER(buf, cfg) ((RoofPacketBlockHeader*)(((uint8_t*)buf) + cfg->max_packets * cfg->max_packet_size)) typedef struct { uint64_t packet_id; // Sequential Packet ID (numbered from 0) } RoofPacketHeader; typedef struct { uint32_t channel_id; // Specifies channel on which the data were received (numbered from 0) uint32_t n_packets; // Number of packets } RoofPacketBlockHeader; #endif /* __ROOF_H */