summaryrefslogtreecommitdiffstats
path: root/src/ufo-roof.h
blob: 9303045be1cfc7f25d24d9b75b8d6aacfdfc1f87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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*)(((uint8_t*)buf) + cfg->max_packets * cfg->max_packet_size))

typedef struct {
    uint64_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 */