Proto protocol structure.
This commit is contained in:
382
adsbus/adsb.pb-c.c
Normal file
382
adsbus/adsb.pb-c.c
Normal file
@@ -0,0 +1,382 @@
|
||||
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
||||
/* Generated from: adsb.proto */
|
||||
|
||||
/* Do not generate deprecated warnings for self */
|
||||
#ifndef PROTOBUF_C__NO_DEPRECATED
|
||||
#define PROTOBUF_C__NO_DEPRECATED
|
||||
#endif
|
||||
|
||||
#include "adsb.pb-c.h"
|
||||
void adsb_header__init
|
||||
(AdsbHeader *message)
|
||||
{
|
||||
static AdsbHeader init_value = ADSB_HEADER__INIT;
|
||||
*message = init_value;
|
||||
}
|
||||
size_t adsb_header__get_packed_size
|
||||
(const AdsbHeader *message)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_header__descriptor);
|
||||
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
|
||||
}
|
||||
size_t adsb_header__pack
|
||||
(const AdsbHeader *message,
|
||||
uint8_t *out)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_header__descriptor);
|
||||
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
|
||||
}
|
||||
size_t adsb_header__pack_to_buffer
|
||||
(const AdsbHeader *message,
|
||||
ProtobufCBuffer *buffer)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_header__descriptor);
|
||||
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
|
||||
}
|
||||
AdsbHeader *
|
||||
adsb_header__unpack
|
||||
(ProtobufCAllocator *allocator,
|
||||
size_t len,
|
||||
const uint8_t *data)
|
||||
{
|
||||
return (AdsbHeader *)
|
||||
protobuf_c_message_unpack (&adsb_header__descriptor,
|
||||
allocator, len, data);
|
||||
}
|
||||
void adsb_header__free_unpacked
|
||||
(AdsbHeader *message,
|
||||
ProtobufCAllocator *allocator)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_header__descriptor);
|
||||
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
|
||||
}
|
||||
void adsb_packet__init
|
||||
(AdsbPacket *message)
|
||||
{
|
||||
static AdsbPacket init_value = ADSB_PACKET__INIT;
|
||||
*message = init_value;
|
||||
}
|
||||
size_t adsb_packet__get_packed_size
|
||||
(const AdsbPacket *message)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_packet__descriptor);
|
||||
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
|
||||
}
|
||||
size_t adsb_packet__pack
|
||||
(const AdsbPacket *message,
|
||||
uint8_t *out)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_packet__descriptor);
|
||||
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
|
||||
}
|
||||
size_t adsb_packet__pack_to_buffer
|
||||
(const AdsbPacket *message,
|
||||
ProtobufCBuffer *buffer)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_packet__descriptor);
|
||||
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
|
||||
}
|
||||
AdsbPacket *
|
||||
adsb_packet__unpack
|
||||
(ProtobufCAllocator *allocator,
|
||||
size_t len,
|
||||
const uint8_t *data)
|
||||
{
|
||||
return (AdsbPacket *)
|
||||
protobuf_c_message_unpack (&adsb_packet__descriptor,
|
||||
allocator, len, data);
|
||||
}
|
||||
void adsb_packet__free_unpacked
|
||||
(AdsbPacket *message,
|
||||
ProtobufCAllocator *allocator)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb_packet__descriptor);
|
||||
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
|
||||
}
|
||||
void adsb__init
|
||||
(Adsb *message)
|
||||
{
|
||||
static Adsb init_value = ADSB__INIT;
|
||||
*message = init_value;
|
||||
}
|
||||
size_t adsb__get_packed_size
|
||||
(const Adsb *message)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb__descriptor);
|
||||
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
|
||||
}
|
||||
size_t adsb__pack
|
||||
(const Adsb *message,
|
||||
uint8_t *out)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb__descriptor);
|
||||
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
|
||||
}
|
||||
size_t adsb__pack_to_buffer
|
||||
(const Adsb *message,
|
||||
ProtobufCBuffer *buffer)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb__descriptor);
|
||||
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
|
||||
}
|
||||
Adsb *
|
||||
adsb__unpack
|
||||
(ProtobufCAllocator *allocator,
|
||||
size_t len,
|
||||
const uint8_t *data)
|
||||
{
|
||||
return (Adsb *)
|
||||
protobuf_c_message_unpack (&adsb__descriptor,
|
||||
allocator, len, data);
|
||||
}
|
||||
void adsb__free_unpacked
|
||||
(Adsb *message,
|
||||
ProtobufCAllocator *allocator)
|
||||
{
|
||||
assert(message->base.descriptor == &adsb__descriptor);
|
||||
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
|
||||
}
|
||||
static const ProtobufCFieldDescriptor adsb_header__field_descriptors[6] =
|
||||
{
|
||||
{
|
||||
"magic",
|
||||
1,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_STRING,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, magic),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"server_version",
|
||||
2,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_STRING,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, server_version),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"server_id",
|
||||
3,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_STRING,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, server_id),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"mlat_timestamp_mhz",
|
||||
4,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_FIXED32,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, mlat_timestamp_mhz),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"mlat_timestamp_max",
|
||||
5,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_FIXED64,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, mlat_timestamp_max),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"rssi_max",
|
||||
6,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_FIXED32,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbHeader, rssi_max),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
};
|
||||
static const unsigned adsb_header__field_indices_by_name[] = {
|
||||
0, /* field[0] = magic */
|
||||
4, /* field[4] = mlat_timestamp_max */
|
||||
3, /* field[3] = mlat_timestamp_mhz */
|
||||
5, /* field[5] = rssi_max */
|
||||
2, /* field[2] = server_id */
|
||||
1, /* field[1] = server_version */
|
||||
};
|
||||
static const ProtobufCIntRange adsb_header__number_ranges[1 + 1] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 0, 6 }
|
||||
};
|
||||
const ProtobufCMessageDescriptor adsb_header__descriptor =
|
||||
{
|
||||
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
|
||||
"AdsbHeader",
|
||||
"AdsbHeader",
|
||||
"AdsbHeader",
|
||||
"",
|
||||
sizeof(AdsbHeader),
|
||||
6,
|
||||
adsb_header__field_descriptors,
|
||||
adsb_header__field_indices_by_name,
|
||||
1, adsb_header__number_ranges,
|
||||
(ProtobufCMessageInit) adsb_header__init,
|
||||
NULL,NULL,NULL /* reserved[123] */
|
||||
};
|
||||
static const ProtobufCFieldDescriptor adsb_packet__field_descriptors[4] =
|
||||
{
|
||||
{
|
||||
"source_id",
|
||||
1,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_STRING,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbPacket, source_id),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"mlat_timestamp",
|
||||
2,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_FIXED64,
|
||||
offsetof(AdsbPacket, has_mlat_timestamp),
|
||||
offsetof(AdsbPacket, mlat_timestamp),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"rssi",
|
||||
3,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_FIXED32,
|
||||
offsetof(AdsbPacket, has_rssi),
|
||||
offsetof(AdsbPacket, rssi),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"payload",
|
||||
4,
|
||||
PROTOBUF_C_LABEL_REQUIRED,
|
||||
PROTOBUF_C_TYPE_BYTES,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(AdsbPacket, payload),
|
||||
NULL,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
};
|
||||
static const unsigned adsb_packet__field_indices_by_name[] = {
|
||||
1, /* field[1] = mlat_timestamp */
|
||||
3, /* field[3] = payload */
|
||||
2, /* field[2] = rssi */
|
||||
0, /* field[0] = source_id */
|
||||
};
|
||||
static const ProtobufCIntRange adsb_packet__number_ranges[1 + 1] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 0, 4 }
|
||||
};
|
||||
const ProtobufCMessageDescriptor adsb_packet__descriptor =
|
||||
{
|
||||
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
|
||||
"AdsbPacket",
|
||||
"AdsbPacket",
|
||||
"AdsbPacket",
|
||||
"",
|
||||
sizeof(AdsbPacket),
|
||||
4,
|
||||
adsb_packet__field_descriptors,
|
||||
adsb_packet__field_indices_by_name,
|
||||
1, adsb_packet__number_ranges,
|
||||
(ProtobufCMessageInit) adsb_packet__init,
|
||||
NULL,NULL,NULL /* reserved[123] */
|
||||
};
|
||||
static const ProtobufCFieldDescriptor adsb__field_descriptors[3] =
|
||||
{
|
||||
{
|
||||
"header",
|
||||
1,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_MESSAGE,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(Adsb, header),
|
||||
&adsb_header__descriptor,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"mode_s_short",
|
||||
2,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_MESSAGE,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(Adsb, mode_s_short),
|
||||
&adsb_packet__descriptor,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
{
|
||||
"mode_s_long",
|
||||
3,
|
||||
PROTOBUF_C_LABEL_OPTIONAL,
|
||||
PROTOBUF_C_TYPE_MESSAGE,
|
||||
0, /* quantifier_offset */
|
||||
offsetof(Adsb, mode_s_long),
|
||||
&adsb_packet__descriptor,
|
||||
NULL,
|
||||
0, /* flags */
|
||||
0,NULL,NULL /* reserved1,reserved2, etc */
|
||||
},
|
||||
};
|
||||
static const unsigned adsb__field_indices_by_name[] = {
|
||||
0, /* field[0] = header */
|
||||
2, /* field[2] = mode_s_long */
|
||||
1, /* field[1] = mode_s_short */
|
||||
};
|
||||
static const ProtobufCIntRange adsb__number_ranges[1 + 1] =
|
||||
{
|
||||
{ 1, 0 },
|
||||
{ 0, 3 }
|
||||
};
|
||||
const ProtobufCMessageDescriptor adsb__descriptor =
|
||||
{
|
||||
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
|
||||
"Adsb",
|
||||
"Adsb",
|
||||
"Adsb",
|
||||
"",
|
||||
sizeof(Adsb),
|
||||
3,
|
||||
adsb__field_descriptors,
|
||||
adsb__field_indices_by_name,
|
||||
1, adsb__number_ranges,
|
||||
(ProtobufCMessageInit) adsb__init,
|
||||
NULL,NULL,NULL /* reserved[123] */
|
||||
};
|
||||
Reference in New Issue
Block a user