Files
adsb-tools/adsbus/adsb.pb-c.h
2016-02-23 15:19:56 -08:00

152 lines
4.5 KiB
C

/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: adsb.proto */
#ifndef PROTOBUF_C_adsb_2eproto__INCLUDED
#define PROTOBUF_C_adsb_2eproto__INCLUDED
#include <protobuf-c/protobuf-c.h>
PROTOBUF_C__BEGIN_DECLS
#if PROTOBUF_C_VERSION_NUMBER < 1000000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1000002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif
typedef struct _AdsbHeader AdsbHeader;
typedef struct _AdsbPacket AdsbPacket;
typedef struct _Adsb Adsb;
/* --- enums --- */
/* --- messages --- */
struct _AdsbHeader
{
ProtobufCMessage base;
char *magic;
char *server_version;
char *server_id;
uint32_t mlat_timestamp_mhz;
uint64_t mlat_timestamp_max;
uint32_t rssi_max;
};
#define ADSB_HEADER__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&adsb_header__descriptor) \
, NULL, NULL, NULL, 0, 0, 0 }
struct _AdsbPacket
{
ProtobufCMessage base;
char *source_id;
protobuf_c_boolean has_mlat_timestamp;
uint64_t mlat_timestamp;
protobuf_c_boolean has_rssi;
uint32_t rssi;
ProtobufCBinaryData payload;
};
#define ADSB_PACKET__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&adsb_packet__descriptor) \
, NULL, 0,0, 0,0, {0,NULL} }
struct _Adsb
{
ProtobufCMessage base;
AdsbHeader *header;
AdsbPacket *mode_s_short;
AdsbPacket *mode_s_long;
};
#define ADSB__INIT \
{ PROTOBUF_C_MESSAGE_INIT (&adsb__descriptor) \
, NULL, NULL, NULL }
/* AdsbHeader methods */
void adsb_header__init
(AdsbHeader *message);
size_t adsb_header__get_packed_size
(const AdsbHeader *message);
size_t adsb_header__pack
(const AdsbHeader *message,
uint8_t *out);
size_t adsb_header__pack_to_buffer
(const AdsbHeader *message,
ProtobufCBuffer *buffer);
AdsbHeader *
adsb_header__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void adsb_header__free_unpacked
(AdsbHeader *message,
ProtobufCAllocator *allocator);
/* AdsbPacket methods */
void adsb_packet__init
(AdsbPacket *message);
size_t adsb_packet__get_packed_size
(const AdsbPacket *message);
size_t adsb_packet__pack
(const AdsbPacket *message,
uint8_t *out);
size_t adsb_packet__pack_to_buffer
(const AdsbPacket *message,
ProtobufCBuffer *buffer);
AdsbPacket *
adsb_packet__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void adsb_packet__free_unpacked
(AdsbPacket *message,
ProtobufCAllocator *allocator);
/* Adsb methods */
void adsb__init
(Adsb *message);
size_t adsb__get_packed_size
(const Adsb *message);
size_t adsb__pack
(const Adsb *message,
uint8_t *out);
size_t adsb__pack_to_buffer
(const Adsb *message,
ProtobufCBuffer *buffer);
Adsb *
adsb__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data);
void adsb__free_unpacked
(Adsb *message,
ProtobufCAllocator *allocator);
/* --- per-message closures --- */
typedef void (*AdsbHeader_Closure)
(const AdsbHeader *message,
void *closure_data);
typedef void (*AdsbPacket_Closure)
(const AdsbPacket *message,
void *closure_data);
typedef void (*Adsb_Closure)
(const Adsb *message,
void *closure_data);
/* --- services --- */
/* --- descriptors --- */
extern const ProtobufCMessageDescriptor adsb_header__descriptor;
extern const ProtobufCMessageDescriptor adsb_packet__descriptor;
extern const ProtobufCMessageDescriptor adsb__descriptor;
PROTOBUF_C__END_DECLS
#endif /* PROTOBUF_C_adsb_2eproto__INCLUDED */