5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
9 #include "nmsg/nmsg.pb-c.h"
13 static Nmsg__Nmsg init_value = NMSG__NMSG__INIT;
14 *message = init_value;
16 size_t nmsg__nmsg__get_packed_size
17 (
const Nmsg__Nmsg *message)
19 assert(message->base.descriptor == &nmsg__nmsg__descriptor);
20 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
22 size_t nmsg__nmsg__pack
23 (
const Nmsg__Nmsg *message,
26 assert(message->base.descriptor == &nmsg__nmsg__descriptor);
27 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
29 size_t nmsg__nmsg__pack_to_buffer
30 (
const Nmsg__Nmsg *message,
31 ProtobufCBuffer *buffer)
33 assert(message->base.descriptor == &nmsg__nmsg__descriptor);
34 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
38 (ProtobufCAllocator *allocator,
43 protobuf_c_message_unpack (&nmsg__nmsg__descriptor,
44 allocator, len, data);
46 void nmsg__nmsg__free_unpacked
48 ProtobufCAllocator *allocator)
50 assert(message->base.descriptor == &nmsg__nmsg__descriptor);
51 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
53 void nmsg__nmsg_fragment__init
54 (Nmsg__NmsgFragment *message)
56 static Nmsg__NmsgFragment init_value = NMSG__NMSG_FRAGMENT__INIT;
57 *message = init_value;
59 size_t nmsg__nmsg_fragment__get_packed_size
60 (
const Nmsg__NmsgFragment *message)
62 assert(message->base.descriptor == &nmsg__nmsg_fragment__descriptor);
63 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
65 size_t nmsg__nmsg_fragment__pack
66 (
const Nmsg__NmsgFragment *message,
69 assert(message->base.descriptor == &nmsg__nmsg_fragment__descriptor);
70 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
72 size_t nmsg__nmsg_fragment__pack_to_buffer
73 (
const Nmsg__NmsgFragment *message,
74 ProtobufCBuffer *buffer)
76 assert(message->base.descriptor == &nmsg__nmsg_fragment__descriptor);
77 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
80 nmsg__nmsg_fragment__unpack
81 (ProtobufCAllocator *allocator,
85 return (Nmsg__NmsgFragment *)
86 protobuf_c_message_unpack (&nmsg__nmsg_fragment__descriptor,
87 allocator, len, data);
89 void nmsg__nmsg_fragment__free_unpacked
90 (Nmsg__NmsgFragment *message,
91 ProtobufCAllocator *allocator)
93 assert(message->base.descriptor == &nmsg__nmsg_fragment__descriptor);
94 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
96 void nmsg__nmsg_payload__init
97 (Nmsg__NmsgPayload *message)
99 static Nmsg__NmsgPayload init_value = NMSG__NMSG_PAYLOAD__INIT;
100 *message = init_value;
102 size_t nmsg__nmsg_payload__get_packed_size
103 (
const Nmsg__NmsgPayload *message)
105 assert(message->base.descriptor == &nmsg__nmsg_payload__descriptor);
106 return protobuf_c_message_get_packed_size ((
const ProtobufCMessage*)(message));
108 size_t nmsg__nmsg_payload__pack
109 (
const Nmsg__NmsgPayload *message,
112 assert(message->base.descriptor == &nmsg__nmsg_payload__descriptor);
113 return protobuf_c_message_pack ((
const ProtobufCMessage*)message, out);
115 size_t nmsg__nmsg_payload__pack_to_buffer
116 (
const Nmsg__NmsgPayload *message,
117 ProtobufCBuffer *buffer)
119 assert(message->base.descriptor == &nmsg__nmsg_payload__descriptor);
120 return protobuf_c_message_pack_to_buffer ((
const ProtobufCMessage*)message, buffer);
123 nmsg__nmsg_payload__unpack
124 (ProtobufCAllocator *allocator,
128 return (Nmsg__NmsgPayload *)
129 protobuf_c_message_unpack (&nmsg__nmsg_payload__descriptor,
130 allocator, len, data);
132 void nmsg__nmsg_payload__free_unpacked
133 (Nmsg__NmsgPayload *message,
134 ProtobufCAllocator *allocator)
136 assert(message->base.descriptor == &nmsg__nmsg_payload__descriptor);
137 protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
139 static const ProtobufCFieldDescriptor nmsg__nmsg__field_descriptors[4] =
144 PROTOBUF_C_LABEL_REPEATED,
145 PROTOBUF_C_TYPE_MESSAGE,
146 offsetof(Nmsg__Nmsg, n_payloads),
147 offsetof(Nmsg__Nmsg, payloads),
148 &nmsg__nmsg_payload__descriptor,
156 PROTOBUF_C_LABEL_REPEATED,
157 PROTOBUF_C_TYPE_UINT32,
158 offsetof(Nmsg__Nmsg, n_payload_crcs),
159 offsetof(Nmsg__Nmsg, payload_crcs),
168 PROTOBUF_C_LABEL_OPTIONAL,
169 PROTOBUF_C_TYPE_UINT32,
170 offsetof(Nmsg__Nmsg, has_sequence),
171 offsetof(Nmsg__Nmsg, sequence),
180 PROTOBUF_C_LABEL_OPTIONAL,
181 PROTOBUF_C_TYPE_UINT64,
182 offsetof(Nmsg__Nmsg, has_sequence_id),
183 offsetof(Nmsg__Nmsg, sequence_id),
190 static const unsigned nmsg__nmsg__field_indices_by_name[] = {
196 static const ProtobufCIntRange nmsg__nmsg__number_ranges[1 + 1] =
201 const ProtobufCMessageDescriptor nmsg__nmsg__descriptor =
203 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
210 nmsg__nmsg__field_descriptors,
211 nmsg__nmsg__field_indices_by_name,
212 1, nmsg__nmsg__number_ranges,
213 (ProtobufCMessageInit) nmsg__nmsg__init,
216 static const ProtobufCFieldDescriptor nmsg__nmsg_fragment__field_descriptors[5] =
221 PROTOBUF_C_LABEL_REQUIRED,
222 PROTOBUF_C_TYPE_UINT32,
224 offsetof(Nmsg__NmsgFragment,
id),
233 PROTOBUF_C_LABEL_REQUIRED,
234 PROTOBUF_C_TYPE_UINT32,
236 offsetof(Nmsg__NmsgFragment, current),
245 PROTOBUF_C_LABEL_REQUIRED,
246 PROTOBUF_C_TYPE_UINT32,
248 offsetof(Nmsg__NmsgFragment, last),
257 PROTOBUF_C_LABEL_REQUIRED,
258 PROTOBUF_C_TYPE_BYTES,
260 offsetof(Nmsg__NmsgFragment, fragment),
269 PROTOBUF_C_LABEL_OPTIONAL,
270 PROTOBUF_C_TYPE_UINT32,
271 offsetof(Nmsg__NmsgFragment, has_crc),
272 offsetof(Nmsg__NmsgFragment, crc),
279 static const unsigned nmsg__nmsg_fragment__field_indices_by_name[] = {
286 static const ProtobufCIntRange nmsg__nmsg_fragment__number_ranges[1 + 1] =
291 const ProtobufCMessageDescriptor nmsg__nmsg_fragment__descriptor =
293 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
296 "Nmsg__NmsgFragment",
298 sizeof(Nmsg__NmsgFragment),
300 nmsg__nmsg_fragment__field_descriptors,
301 nmsg__nmsg_fragment__field_indices_by_name,
302 1, nmsg__nmsg_fragment__number_ranges,
303 (ProtobufCMessageInit) nmsg__nmsg_fragment__init,
306 static const ProtobufCFieldDescriptor nmsg__nmsg_payload__field_descriptors[8] =
311 PROTOBUF_C_LABEL_REQUIRED,
312 PROTOBUF_C_TYPE_UINT32,
314 offsetof(Nmsg__NmsgPayload, vid),
323 PROTOBUF_C_LABEL_REQUIRED,
324 PROTOBUF_C_TYPE_UINT32,
326 offsetof(Nmsg__NmsgPayload, msgtype),
335 PROTOBUF_C_LABEL_REQUIRED,
336 PROTOBUF_C_TYPE_INT64,
338 offsetof(Nmsg__NmsgPayload, time_sec),
347 PROTOBUF_C_LABEL_REQUIRED,
348 PROTOBUF_C_TYPE_FIXED32,
350 offsetof(Nmsg__NmsgPayload, time_nsec),
359 PROTOBUF_C_LABEL_OPTIONAL,
360 PROTOBUF_C_TYPE_BYTES,
361 offsetof(Nmsg__NmsgPayload, has_payload),
362 offsetof(Nmsg__NmsgPayload, payload),
371 PROTOBUF_C_LABEL_OPTIONAL,
372 PROTOBUF_C_TYPE_UINT32,
373 offsetof(Nmsg__NmsgPayload, has_source),
374 offsetof(Nmsg__NmsgPayload, source),
383 PROTOBUF_C_LABEL_OPTIONAL,
384 PROTOBUF_C_TYPE_UINT32,
385 offsetof(Nmsg__NmsgPayload, has_operator_),
386 offsetof(Nmsg__NmsgPayload, operator_),
395 PROTOBUF_C_LABEL_OPTIONAL,
396 PROTOBUF_C_TYPE_UINT32,
397 offsetof(Nmsg__NmsgPayload, has_group),
398 offsetof(Nmsg__NmsgPayload, group),
405 static const unsigned nmsg__nmsg_payload__field_indices_by_name[] = {
415 static const ProtobufCIntRange nmsg__nmsg_payload__number_ranges[2 + 1] =
421 const ProtobufCMessageDescriptor nmsg__nmsg_payload__descriptor =
423 PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
428 sizeof(Nmsg__NmsgPayload),
430 nmsg__nmsg_payload__field_descriptors,
431 nmsg__nmsg_payload__field_indices_by_name,
432 2, nmsg__nmsg_payload__number_ranges,
433 (ProtobufCMessageInit) nmsg__nmsg_payload__init,