1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/trace.api.json
7 // Package trace contains generated bindings for API file trace.api.
15 api "git.fd.io/govpp.git/api"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
28 VersionCrc = 0x397cbf90
31 // TraceProfileAdd defines message 'trace_profile_add'.
32 type TraceProfileAdd struct {
33 TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
34 NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
35 TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
36 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
37 AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
40 func (m *TraceProfileAdd) Reset() { *m = TraceProfileAdd{} }
41 func (*TraceProfileAdd) GetMessageName() string { return "trace_profile_add" }
42 func (*TraceProfileAdd) GetCrcString() string { return "de08aa6d" }
43 func (*TraceProfileAdd) GetMessageType() api.MessageType {
44 return api.RequestMessage
47 func (m *TraceProfileAdd) Size() int {
52 size += 1 // m.TraceType
53 size += 1 // m.NumElts
54 size += 1 // m.TraceTsp
56 size += 4 // m.AppData
59 func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
62 buf = codec.NewBuffer(make([]byte, m.Size()))
64 buf = codec.NewBuffer(b)
66 buf.EncodeUint8(uint8(m.TraceType))
67 buf.EncodeUint8(uint8(m.NumElts))
68 buf.EncodeUint8(uint8(m.TraceTsp))
69 buf.EncodeUint32(uint32(m.NodeID))
70 buf.EncodeUint32(uint32(m.AppData))
71 return buf.Bytes(), nil
73 func (m *TraceProfileAdd) Unmarshal(b []byte) error {
74 buf := codec.NewBuffer(b)
75 m.TraceType = buf.DecodeUint8()
76 m.NumElts = buf.DecodeUint8()
77 m.TraceTsp = buf.DecodeUint8()
78 m.NodeID = buf.DecodeUint32()
79 m.AppData = buf.DecodeUint32()
83 // TraceProfileAddReply defines message 'trace_profile_add_reply'.
84 type TraceProfileAddReply struct {
85 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
88 func (m *TraceProfileAddReply) Reset() { *m = TraceProfileAddReply{} }
89 func (*TraceProfileAddReply) GetMessageName() string { return "trace_profile_add_reply" }
90 func (*TraceProfileAddReply) GetCrcString() string { return "e8d4e804" }
91 func (*TraceProfileAddReply) GetMessageType() api.MessageType {
92 return api.ReplyMessage
95 func (m *TraceProfileAddReply) Size() int {
100 size += 4 // m.Retval
103 func (m *TraceProfileAddReply) Marshal(b []byte) ([]byte, error) {
104 var buf *codec.Buffer
106 buf = codec.NewBuffer(make([]byte, m.Size()))
108 buf = codec.NewBuffer(b)
110 buf.EncodeUint32(uint32(m.Retval))
111 return buf.Bytes(), nil
113 func (m *TraceProfileAddReply) Unmarshal(b []byte) error {
114 buf := codec.NewBuffer(b)
115 m.Retval = int32(buf.DecodeUint32())
119 // TraceProfileDel defines message 'trace_profile_del'.
120 type TraceProfileDel struct{}
122 func (m *TraceProfileDel) Reset() { *m = TraceProfileDel{} }
123 func (*TraceProfileDel) GetMessageName() string { return "trace_profile_del" }
124 func (*TraceProfileDel) GetCrcString() string { return "51077d14" }
125 func (*TraceProfileDel) GetMessageType() api.MessageType {
126 return api.RequestMessage
129 func (m *TraceProfileDel) Size() int {
136 func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
137 var buf *codec.Buffer
139 buf = codec.NewBuffer(make([]byte, m.Size()))
141 buf = codec.NewBuffer(b)
143 return buf.Bytes(), nil
145 func (m *TraceProfileDel) Unmarshal(b []byte) error {
149 // TraceProfileDelReply defines message 'trace_profile_del_reply'.
150 type TraceProfileDelReply struct {
151 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
154 func (m *TraceProfileDelReply) Reset() { *m = TraceProfileDelReply{} }
155 func (*TraceProfileDelReply) GetMessageName() string { return "trace_profile_del_reply" }
156 func (*TraceProfileDelReply) GetCrcString() string { return "e8d4e804" }
157 func (*TraceProfileDelReply) GetMessageType() api.MessageType {
158 return api.ReplyMessage
161 func (m *TraceProfileDelReply) Size() int {
166 size += 4 // m.Retval
169 func (m *TraceProfileDelReply) Marshal(b []byte) ([]byte, error) {
170 var buf *codec.Buffer
172 buf = codec.NewBuffer(make([]byte, m.Size()))
174 buf = codec.NewBuffer(b)
176 buf.EncodeUint32(uint32(m.Retval))
177 return buf.Bytes(), nil
179 func (m *TraceProfileDelReply) Unmarshal(b []byte) error {
180 buf := codec.NewBuffer(b)
181 m.Retval = int32(buf.DecodeUint32())
185 // TraceProfileShowConfig defines message 'trace_profile_show_config'.
186 type TraceProfileShowConfig struct{}
188 func (m *TraceProfileShowConfig) Reset() { *m = TraceProfileShowConfig{} }
189 func (*TraceProfileShowConfig) GetMessageName() string { return "trace_profile_show_config" }
190 func (*TraceProfileShowConfig) GetCrcString() string { return "51077d14" }
191 func (*TraceProfileShowConfig) GetMessageType() api.MessageType {
192 return api.RequestMessage
195 func (m *TraceProfileShowConfig) Size() int {
202 func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
203 var buf *codec.Buffer
205 buf = codec.NewBuffer(make([]byte, m.Size()))
207 buf = codec.NewBuffer(b)
209 return buf.Bytes(), nil
211 func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
215 // TraceProfileShowConfigReply defines message 'trace_profile_show_config_reply'.
216 type TraceProfileShowConfigReply struct {
217 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
218 TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
219 NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
220 TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
221 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
222 AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
225 func (m *TraceProfileShowConfigReply) Reset() { *m = TraceProfileShowConfigReply{} }
226 func (*TraceProfileShowConfigReply) GetMessageName() string { return "trace_profile_show_config_reply" }
227 func (*TraceProfileShowConfigReply) GetCrcString() string { return "0f1d374c" }
228 func (*TraceProfileShowConfigReply) GetMessageType() api.MessageType {
229 return api.ReplyMessage
232 func (m *TraceProfileShowConfigReply) Size() int {
237 size += 4 // m.Retval
238 size += 1 // m.TraceType
239 size += 1 // m.NumElts
240 size += 1 // m.TraceTsp
241 size += 4 // m.NodeID
242 size += 4 // m.AppData
245 func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
246 var buf *codec.Buffer
248 buf = codec.NewBuffer(make([]byte, m.Size()))
250 buf = codec.NewBuffer(b)
252 buf.EncodeUint32(uint32(m.Retval))
253 buf.EncodeUint8(uint8(m.TraceType))
254 buf.EncodeUint8(uint8(m.NumElts))
255 buf.EncodeUint8(uint8(m.TraceTsp))
256 buf.EncodeUint32(uint32(m.NodeID))
257 buf.EncodeUint32(uint32(m.AppData))
258 return buf.Bytes(), nil
260 func (m *TraceProfileShowConfigReply) Unmarshal(b []byte) error {
261 buf := codec.NewBuffer(b)
262 m.Retval = int32(buf.DecodeUint32())
263 m.TraceType = buf.DecodeUint8()
264 m.NumElts = buf.DecodeUint8()
265 m.TraceTsp = buf.DecodeUint8()
266 m.NodeID = buf.DecodeUint32()
267 m.AppData = buf.DecodeUint32()
271 func init() { file_trace_binapi_init() }
272 func file_trace_binapi_init() {
273 api.RegisterMessage((*TraceProfileAdd)(nil), "trace_profile_add_de08aa6d")
274 api.RegisterMessage((*TraceProfileAddReply)(nil), "trace_profile_add_reply_e8d4e804")
275 api.RegisterMessage((*TraceProfileDel)(nil), "trace_profile_del_51077d14")
276 api.RegisterMessage((*TraceProfileDelReply)(nil), "trace_profile_del_reply_e8d4e804")
277 api.RegisterMessage((*TraceProfileShowConfig)(nil), "trace_profile_show_config_51077d14")
278 api.RegisterMessage((*TraceProfileShowConfigReply)(nil), "trace_profile_show_config_reply_0f1d374c")
281 // Messages returns list of all messages in this module.
282 func AllMessages() []api.Message {
283 return []api.Message{
284 (*TraceProfileAdd)(nil),
285 (*TraceProfileAddReply)(nil),
286 (*TraceProfileDel)(nil),
287 (*TraceProfileDelReply)(nil),
288 (*TraceProfileShowConfig)(nil),
289 (*TraceProfileShowConfigReply)(nil),