nmsg  0.15.1
nmsg.pb-c.h
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/nmsg.proto */
3 
4 #ifndef PROTOBUF_C_nmsg_2fnmsg_2eproto__INCLUDED
5 #define PROTOBUF_C_nmsg_2fnmsg_2eproto__INCLUDED
6 
7 #include <protobuf-c/protobuf-c.h>
8 
9 PROTOBUF_C__BEGIN_DECLS
10 
11 #if PROTOBUF_C_VERSION_NUMBER < 1000000
12 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
13 #elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
14 # 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.
15 #endif
16 
17 
18 typedef struct _Nmsg__Nmsg Nmsg__Nmsg;
19 typedef struct _Nmsg__NmsgFragment Nmsg__NmsgFragment;
20 typedef struct _Nmsg__NmsgPayload Nmsg__NmsgPayload;
21 
22 
23 /* --- enums --- */
24 
25 
26 /* --- messages --- */
27 
28 struct _Nmsg__Nmsg
29 {
30  ProtobufCMessage base;
31  size_t n_payloads;
32  Nmsg__NmsgPayload **payloads;
33  size_t n_payload_crcs;
34  uint32_t *payload_crcs;
35  protobuf_c_boolean has_sequence;
36  uint32_t sequence;
37  protobuf_c_boolean has_sequence_id;
38  uint64_t sequence_id;
39 };
40 #define NMSG__NMSG__INIT \
41  { PROTOBUF_C_MESSAGE_INIT (&nmsg__nmsg__descriptor) \
42  , 0,NULL, 0,NULL, 0,0, 0,0 }
43 
44 
45 struct _Nmsg__NmsgFragment
46 {
47  ProtobufCMessage base;
48  uint32_t id;
49  uint32_t current;
50  uint32_t last;
51  ProtobufCBinaryData fragment;
52  protobuf_c_boolean has_crc;
53  uint32_t crc;
54 };
55 #define NMSG__NMSG_FRAGMENT__INIT \
56  { PROTOBUF_C_MESSAGE_INIT (&nmsg__nmsg_fragment__descriptor) \
57  , 0, 0, 0, {0,NULL}, 0,0 }
58 
59 
60 struct _Nmsg__NmsgPayload
61 {
62  ProtobufCMessage base;
63  uint32_t vid;
64  uint32_t msgtype;
65  int64_t time_sec;
66  uint32_t time_nsec;
67  protobuf_c_boolean has_payload;
68  ProtobufCBinaryData payload;
69  protobuf_c_boolean has_source;
70  uint32_t source;
71  protobuf_c_boolean has_operator_;
72  uint32_t operator_;
73  protobuf_c_boolean has_group;
74  uint32_t group;
75 };
76 #define NMSG__NMSG_PAYLOAD__INIT \
77  { PROTOBUF_C_MESSAGE_INIT (&nmsg__nmsg_payload__descriptor) \
78  , 0, 0, 0, 0, 0,{0,NULL}, 0,0, 0,0, 0,0 }
79 
80 
81 /* Nmsg__Nmsg methods */
82 void nmsg__nmsg__init
83  (Nmsg__Nmsg *message);
84 size_t nmsg__nmsg__get_packed_size
85  (const Nmsg__Nmsg *message);
86 size_t nmsg__nmsg__pack
87  (const Nmsg__Nmsg *message,
88  uint8_t *out);
89 size_t nmsg__nmsg__pack_to_buffer
90  (const Nmsg__Nmsg *message,
91  ProtobufCBuffer *buffer);
92 Nmsg__Nmsg *
93  nmsg__nmsg__unpack
94  (ProtobufCAllocator *allocator,
95  size_t len,
96  const uint8_t *data);
97 void nmsg__nmsg__free_unpacked
98  (Nmsg__Nmsg *message,
99  ProtobufCAllocator *allocator);
100 /* Nmsg__NmsgFragment methods */
101 void nmsg__nmsg_fragment__init
102  (Nmsg__NmsgFragment *message);
103 size_t nmsg__nmsg_fragment__get_packed_size
104  (const Nmsg__NmsgFragment *message);
105 size_t nmsg__nmsg_fragment__pack
106  (const Nmsg__NmsgFragment *message,
107  uint8_t *out);
108 size_t nmsg__nmsg_fragment__pack_to_buffer
109  (const Nmsg__NmsgFragment *message,
110  ProtobufCBuffer *buffer);
111 Nmsg__NmsgFragment *
112  nmsg__nmsg_fragment__unpack
113  (ProtobufCAllocator *allocator,
114  size_t len,
115  const uint8_t *data);
116 void nmsg__nmsg_fragment__free_unpacked
117  (Nmsg__NmsgFragment *message,
118  ProtobufCAllocator *allocator);
119 /* Nmsg__NmsgPayload methods */
120 void nmsg__nmsg_payload__init
121  (Nmsg__NmsgPayload *message);
122 size_t nmsg__nmsg_payload__get_packed_size
123  (const Nmsg__NmsgPayload *message);
124 size_t nmsg__nmsg_payload__pack
125  (const Nmsg__NmsgPayload *message,
126  uint8_t *out);
127 size_t nmsg__nmsg_payload__pack_to_buffer
128  (const Nmsg__NmsgPayload *message,
129  ProtobufCBuffer *buffer);
130 Nmsg__NmsgPayload *
131  nmsg__nmsg_payload__unpack
132  (ProtobufCAllocator *allocator,
133  size_t len,
134  const uint8_t *data);
135 void nmsg__nmsg_payload__free_unpacked
136  (Nmsg__NmsgPayload *message,
137  ProtobufCAllocator *allocator);
138 /* --- per-message closures --- */
139 
140 typedef void (*Nmsg__Nmsg_Closure)
141  (const Nmsg__Nmsg *message,
142  void *closure_data);
143 typedef void (*Nmsg__NmsgFragment_Closure)
144  (const Nmsg__NmsgFragment *message,
145  void *closure_data);
146 typedef void (*Nmsg__NmsgPayload_Closure)
147  (const Nmsg__NmsgPayload *message,
148  void *closure_data);
149 
150 /* --- services --- */
151 
152 
153 /* --- descriptors --- */
154 
155 extern const ProtobufCMessageDescriptor nmsg__nmsg__descriptor;
156 extern const ProtobufCMessageDescriptor nmsg__nmsg_fragment__descriptor;
157 extern const ProtobufCMessageDescriptor nmsg__nmsg_payload__descriptor;
158 
159 PROTOBUF_C__END_DECLS
160 
161 
162 #endif /* PROTOBUF_C_nmsg_2fnmsg_2eproto__INCLUDED */