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() (size int) {
51 size += 1 // m.TraceType
52 size += 1 // m.NumElts
53 size += 1 // m.TraceTsp
55 size += 4 // m.AppData
58 func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
60 b = make([]byte, m.Size())
62 buf := codec.NewBuffer(b)
63 buf.EncodeUint8(m.TraceType)
64 buf.EncodeUint8(m.NumElts)
65 buf.EncodeUint8(m.TraceTsp)
66 buf.EncodeUint32(m.NodeID)
67 buf.EncodeUint32(m.AppData)
68 return buf.Bytes(), nil
70 func (m *TraceProfileAdd) Unmarshal(b []byte) error {
71 buf := codec.NewBuffer(b)
72 m.TraceType = buf.DecodeUint8()
73 m.NumElts = buf.DecodeUint8()
74 m.TraceTsp = buf.DecodeUint8()
75 m.NodeID = buf.DecodeUint32()
76 m.AppData = buf.DecodeUint32()
80 // TraceProfileAddReply defines message 'trace_profile_add_reply'.
81 type TraceProfileAddReply struct {
82 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
85 func (m *TraceProfileAddReply) Reset() { *m = TraceProfileAddReply{} }
86 func (*TraceProfileAddReply) GetMessageName() string { return "trace_profile_add_reply" }
87 func (*TraceProfileAddReply) GetCrcString() string { return "e8d4e804" }
88 func (*TraceProfileAddReply) GetMessageType() api.MessageType {
89 return api.ReplyMessage
92 func (m *TraceProfileAddReply) Size() (size int) {
99 func (m *TraceProfileAddReply) Marshal(b []byte) ([]byte, error) {
101 b = make([]byte, m.Size())
103 buf := codec.NewBuffer(b)
104 buf.EncodeInt32(m.Retval)
105 return buf.Bytes(), nil
107 func (m *TraceProfileAddReply) Unmarshal(b []byte) error {
108 buf := codec.NewBuffer(b)
109 m.Retval = buf.DecodeInt32()
113 // TraceProfileDel defines message 'trace_profile_del'.
114 type TraceProfileDel struct{}
116 func (m *TraceProfileDel) Reset() { *m = TraceProfileDel{} }
117 func (*TraceProfileDel) GetMessageName() string { return "trace_profile_del" }
118 func (*TraceProfileDel) GetCrcString() string { return "51077d14" }
119 func (*TraceProfileDel) GetMessageType() api.MessageType {
120 return api.RequestMessage
123 func (m *TraceProfileDel) Size() (size int) {
129 func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
131 b = make([]byte, m.Size())
133 buf := codec.NewBuffer(b)
134 return buf.Bytes(), nil
136 func (m *TraceProfileDel) Unmarshal(b []byte) error {
140 // TraceProfileDelReply defines message 'trace_profile_del_reply'.
141 type TraceProfileDelReply struct {
142 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
145 func (m *TraceProfileDelReply) Reset() { *m = TraceProfileDelReply{} }
146 func (*TraceProfileDelReply) GetMessageName() string { return "trace_profile_del_reply" }
147 func (*TraceProfileDelReply) GetCrcString() string { return "e8d4e804" }
148 func (*TraceProfileDelReply) GetMessageType() api.MessageType {
149 return api.ReplyMessage
152 func (m *TraceProfileDelReply) Size() (size int) {
156 size += 4 // m.Retval
159 func (m *TraceProfileDelReply) Marshal(b []byte) ([]byte, error) {
161 b = make([]byte, m.Size())
163 buf := codec.NewBuffer(b)
164 buf.EncodeInt32(m.Retval)
165 return buf.Bytes(), nil
167 func (m *TraceProfileDelReply) Unmarshal(b []byte) error {
168 buf := codec.NewBuffer(b)
169 m.Retval = buf.DecodeInt32()
173 // TraceProfileShowConfig defines message 'trace_profile_show_config'.
174 type TraceProfileShowConfig struct{}
176 func (m *TraceProfileShowConfig) Reset() { *m = TraceProfileShowConfig{} }
177 func (*TraceProfileShowConfig) GetMessageName() string { return "trace_profile_show_config" }
178 func (*TraceProfileShowConfig) GetCrcString() string { return "51077d14" }
179 func (*TraceProfileShowConfig) GetMessageType() api.MessageType {
180 return api.RequestMessage
183 func (m *TraceProfileShowConfig) Size() (size int) {
189 func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
191 b = make([]byte, m.Size())
193 buf := codec.NewBuffer(b)
194 return buf.Bytes(), nil
196 func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
200 // TraceProfileShowConfigReply defines message 'trace_profile_show_config_reply'.
201 type TraceProfileShowConfigReply struct {
202 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
203 TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
204 NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
205 TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
206 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
207 AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
210 func (m *TraceProfileShowConfigReply) Reset() { *m = TraceProfileShowConfigReply{} }
211 func (*TraceProfileShowConfigReply) GetMessageName() string { return "trace_profile_show_config_reply" }
212 func (*TraceProfileShowConfigReply) GetCrcString() string { return "0f1d374c" }
213 func (*TraceProfileShowConfigReply) GetMessageType() api.MessageType {
214 return api.ReplyMessage
217 func (m *TraceProfileShowConfigReply) Size() (size int) {
221 size += 4 // m.Retval
222 size += 1 // m.TraceType
223 size += 1 // m.NumElts
224 size += 1 // m.TraceTsp
225 size += 4 // m.NodeID
226 size += 4 // m.AppData
229 func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
231 b = make([]byte, m.Size())
233 buf := codec.NewBuffer(b)
234 buf.EncodeInt32(m.Retval)
235 buf.EncodeUint8(m.TraceType)
236 buf.EncodeUint8(m.NumElts)
237 buf.EncodeUint8(m.TraceTsp)
238 buf.EncodeUint32(m.NodeID)
239 buf.EncodeUint32(m.AppData)
240 return buf.Bytes(), nil
242 func (m *TraceProfileShowConfigReply) Unmarshal(b []byte) error {
243 buf := codec.NewBuffer(b)
244 m.Retval = buf.DecodeInt32()
245 m.TraceType = buf.DecodeUint8()
246 m.NumElts = buf.DecodeUint8()
247 m.TraceTsp = buf.DecodeUint8()
248 m.NodeID = buf.DecodeUint32()
249 m.AppData = buf.DecodeUint32()
253 func init() { file_trace_binapi_init() }
254 func file_trace_binapi_init() {
255 api.RegisterMessage((*TraceProfileAdd)(nil), "trace_profile_add_de08aa6d")
256 api.RegisterMessage((*TraceProfileAddReply)(nil), "trace_profile_add_reply_e8d4e804")
257 api.RegisterMessage((*TraceProfileDel)(nil), "trace_profile_del_51077d14")
258 api.RegisterMessage((*TraceProfileDelReply)(nil), "trace_profile_del_reply_e8d4e804")
259 api.RegisterMessage((*TraceProfileShowConfig)(nil), "trace_profile_show_config_51077d14")
260 api.RegisterMessage((*TraceProfileShowConfigReply)(nil), "trace_profile_show_config_reply_0f1d374c")
263 // Messages returns list of all messages in this module.
264 func AllMessages() []api.Message {
265 return []api.Message{
266 (*TraceProfileAdd)(nil),
267 (*TraceProfileAddReply)(nil),
268 (*TraceProfileDel)(nil),
269 (*TraceProfileDelReply)(nil),
270 (*TraceProfileShowConfig)(nil),
271 (*TraceProfileShowConfigReply)(nil),