1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package trace contains generated bindings for API file trace.api.
14 api "git.fd.io/govpp.git/api"
15 codec "git.fd.io/govpp.git/codec"
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the GoVPP api package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // GoVPP api package needs to be updated.
22 const _ = api.GoVppAPIPackageIsVersion2
27 VersionCrc = 0x397cbf90
30 // TraceProfileAdd defines message 'trace_profile_add'.
31 type TraceProfileAdd struct {
32 TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
33 NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
34 TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
35 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
36 AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
39 func (m *TraceProfileAdd) Reset() { *m = TraceProfileAdd{} }
40 func (*TraceProfileAdd) GetMessageName() string { return "trace_profile_add" }
41 func (*TraceProfileAdd) GetCrcString() string { return "de08aa6d" }
42 func (*TraceProfileAdd) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *TraceProfileAdd) Size() (size int) {
50 size += 1 // m.TraceType
51 size += 1 // m.NumElts
52 size += 1 // m.TraceTsp
54 size += 4 // m.AppData
57 func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
59 b = make([]byte, m.Size())
61 buf := codec.NewBuffer(b)
62 buf.EncodeUint8(m.TraceType)
63 buf.EncodeUint8(m.NumElts)
64 buf.EncodeUint8(m.TraceTsp)
65 buf.EncodeUint32(m.NodeID)
66 buf.EncodeUint32(m.AppData)
67 return buf.Bytes(), nil
69 func (m *TraceProfileAdd) Unmarshal(b []byte) error {
70 buf := codec.NewBuffer(b)
71 m.TraceType = buf.DecodeUint8()
72 m.NumElts = buf.DecodeUint8()
73 m.TraceTsp = buf.DecodeUint8()
74 m.NodeID = buf.DecodeUint32()
75 m.AppData = buf.DecodeUint32()
79 // TraceProfileAddReply defines message 'trace_profile_add_reply'.
80 type TraceProfileAddReply struct {
81 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
84 func (m *TraceProfileAddReply) Reset() { *m = TraceProfileAddReply{} }
85 func (*TraceProfileAddReply) GetMessageName() string { return "trace_profile_add_reply" }
86 func (*TraceProfileAddReply) GetCrcString() string { return "e8d4e804" }
87 func (*TraceProfileAddReply) GetMessageType() api.MessageType {
88 return api.ReplyMessage
91 func (m *TraceProfileAddReply) Size() (size int) {
98 func (m *TraceProfileAddReply) Marshal(b []byte) ([]byte, error) {
100 b = make([]byte, m.Size())
102 buf := codec.NewBuffer(b)
103 buf.EncodeInt32(m.Retval)
104 return buf.Bytes(), nil
106 func (m *TraceProfileAddReply) Unmarshal(b []byte) error {
107 buf := codec.NewBuffer(b)
108 m.Retval = buf.DecodeInt32()
112 // TraceProfileDel defines message 'trace_profile_del'.
113 type TraceProfileDel struct{}
115 func (m *TraceProfileDel) Reset() { *m = TraceProfileDel{} }
116 func (*TraceProfileDel) GetMessageName() string { return "trace_profile_del" }
117 func (*TraceProfileDel) GetCrcString() string { return "51077d14" }
118 func (*TraceProfileDel) GetMessageType() api.MessageType {
119 return api.RequestMessage
122 func (m *TraceProfileDel) Size() (size int) {
128 func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
130 b = make([]byte, m.Size())
132 buf := codec.NewBuffer(b)
133 return buf.Bytes(), nil
135 func (m *TraceProfileDel) Unmarshal(b []byte) error {
139 // TraceProfileDelReply defines message 'trace_profile_del_reply'.
140 type TraceProfileDelReply struct {
141 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
144 func (m *TraceProfileDelReply) Reset() { *m = TraceProfileDelReply{} }
145 func (*TraceProfileDelReply) GetMessageName() string { return "trace_profile_del_reply" }
146 func (*TraceProfileDelReply) GetCrcString() string { return "e8d4e804" }
147 func (*TraceProfileDelReply) GetMessageType() api.MessageType {
148 return api.ReplyMessage
151 func (m *TraceProfileDelReply) Size() (size int) {
155 size += 4 // m.Retval
158 func (m *TraceProfileDelReply) Marshal(b []byte) ([]byte, error) {
160 b = make([]byte, m.Size())
162 buf := codec.NewBuffer(b)
163 buf.EncodeInt32(m.Retval)
164 return buf.Bytes(), nil
166 func (m *TraceProfileDelReply) Unmarshal(b []byte) error {
167 buf := codec.NewBuffer(b)
168 m.Retval = buf.DecodeInt32()
172 // TraceProfileShowConfig defines message 'trace_profile_show_config'.
173 type TraceProfileShowConfig struct{}
175 func (m *TraceProfileShowConfig) Reset() { *m = TraceProfileShowConfig{} }
176 func (*TraceProfileShowConfig) GetMessageName() string { return "trace_profile_show_config" }
177 func (*TraceProfileShowConfig) GetCrcString() string { return "51077d14" }
178 func (*TraceProfileShowConfig) GetMessageType() api.MessageType {
179 return api.RequestMessage
182 func (m *TraceProfileShowConfig) Size() (size int) {
188 func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
190 b = make([]byte, m.Size())
192 buf := codec.NewBuffer(b)
193 return buf.Bytes(), nil
195 func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
199 // TraceProfileShowConfigReply defines message 'trace_profile_show_config_reply'.
200 type TraceProfileShowConfigReply struct {
201 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
202 TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
203 NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
204 TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
205 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
206 AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
209 func (m *TraceProfileShowConfigReply) Reset() { *m = TraceProfileShowConfigReply{} }
210 func (*TraceProfileShowConfigReply) GetMessageName() string { return "trace_profile_show_config_reply" }
211 func (*TraceProfileShowConfigReply) GetCrcString() string { return "0f1d374c" }
212 func (*TraceProfileShowConfigReply) GetMessageType() api.MessageType {
213 return api.ReplyMessage
216 func (m *TraceProfileShowConfigReply) Size() (size int) {
220 size += 4 // m.Retval
221 size += 1 // m.TraceType
222 size += 1 // m.NumElts
223 size += 1 // m.TraceTsp
224 size += 4 // m.NodeID
225 size += 4 // m.AppData
228 func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
230 b = make([]byte, m.Size())
232 buf := codec.NewBuffer(b)
233 buf.EncodeInt32(m.Retval)
234 buf.EncodeUint8(m.TraceType)
235 buf.EncodeUint8(m.NumElts)
236 buf.EncodeUint8(m.TraceTsp)
237 buf.EncodeUint32(m.NodeID)
238 buf.EncodeUint32(m.AppData)
239 return buf.Bytes(), nil
241 func (m *TraceProfileShowConfigReply) Unmarshal(b []byte) error {
242 buf := codec.NewBuffer(b)
243 m.Retval = buf.DecodeInt32()
244 m.TraceType = buf.DecodeUint8()
245 m.NumElts = buf.DecodeUint8()
246 m.TraceTsp = buf.DecodeUint8()
247 m.NodeID = buf.DecodeUint32()
248 m.AppData = buf.DecodeUint32()
252 func init() { file_trace_binapi_init() }
253 func file_trace_binapi_init() {
254 api.RegisterMessage((*TraceProfileAdd)(nil), "trace_profile_add_de08aa6d")
255 api.RegisterMessage((*TraceProfileAddReply)(nil), "trace_profile_add_reply_e8d4e804")
256 api.RegisterMessage((*TraceProfileDel)(nil), "trace_profile_del_51077d14")
257 api.RegisterMessage((*TraceProfileDelReply)(nil), "trace_profile_del_reply_e8d4e804")
258 api.RegisterMessage((*TraceProfileShowConfig)(nil), "trace_profile_show_config_51077d14")
259 api.RegisterMessage((*TraceProfileShowConfigReply)(nil), "trace_profile_show_config_reply_0f1d374c")
262 // Messages returns list of all messages in this module.
263 func AllMessages() []api.Message {
264 return []api.Message{
265 (*TraceProfileAdd)(nil),
266 (*TraceProfileAddReply)(nil),
267 (*TraceProfileDel)(nil),
268 (*TraceProfileDelReply)(nil),
269 (*TraceProfileShowConfig)(nil),
270 (*TraceProfileShowConfigReply)(nil),