c360cbddb7ffa9993366b3360fc0f252c86f38c0
[govpp.git] / binapi / trace / trace.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package trace contains generated bindings for API file trace.api.
7 //
8 // Contents:
9 //   6 messages
10 //
11 package trace
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         codec "git.fd.io/govpp.git/codec"
16 )
17
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
23
24 const (
25         APIFile    = "trace"
26         APIVersion = "1.0.0"
27         VersionCrc = 0x397cbf90
28 )
29
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"`
37 }
38
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
44 }
45
46 func (m *TraceProfileAdd) Size() (size int) {
47         if m == nil {
48                 return 0
49         }
50         size += 1 // m.TraceType
51         size += 1 // m.NumElts
52         size += 1 // m.TraceTsp
53         size += 4 // m.NodeID
54         size += 4 // m.AppData
55         return size
56 }
57 func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
58         if b == nil {
59                 b = make([]byte, m.Size())
60         }
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
68 }
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()
76         return nil
77 }
78
79 // TraceProfileAddReply defines message 'trace_profile_add_reply'.
80 type TraceProfileAddReply struct {
81         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
82 }
83
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
89 }
90
91 func (m *TraceProfileAddReply) Size() (size int) {
92         if m == nil {
93                 return 0
94         }
95         size += 4 // m.Retval
96         return size
97 }
98 func (m *TraceProfileAddReply) Marshal(b []byte) ([]byte, error) {
99         if b == nil {
100                 b = make([]byte, m.Size())
101         }
102         buf := codec.NewBuffer(b)
103         buf.EncodeInt32(m.Retval)
104         return buf.Bytes(), nil
105 }
106 func (m *TraceProfileAddReply) Unmarshal(b []byte) error {
107         buf := codec.NewBuffer(b)
108         m.Retval = buf.DecodeInt32()
109         return nil
110 }
111
112 // TraceProfileDel defines message 'trace_profile_del'.
113 type TraceProfileDel struct{}
114
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
120 }
121
122 func (m *TraceProfileDel) Size() (size int) {
123         if m == nil {
124                 return 0
125         }
126         return size
127 }
128 func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
129         if b == nil {
130                 b = make([]byte, m.Size())
131         }
132         buf := codec.NewBuffer(b)
133         return buf.Bytes(), nil
134 }
135 func (m *TraceProfileDel) Unmarshal(b []byte) error {
136         return nil
137 }
138
139 // TraceProfileDelReply defines message 'trace_profile_del_reply'.
140 type TraceProfileDelReply struct {
141         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
142 }
143
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
149 }
150
151 func (m *TraceProfileDelReply) Size() (size int) {
152         if m == nil {
153                 return 0
154         }
155         size += 4 // m.Retval
156         return size
157 }
158 func (m *TraceProfileDelReply) Marshal(b []byte) ([]byte, error) {
159         if b == nil {
160                 b = make([]byte, m.Size())
161         }
162         buf := codec.NewBuffer(b)
163         buf.EncodeInt32(m.Retval)
164         return buf.Bytes(), nil
165 }
166 func (m *TraceProfileDelReply) Unmarshal(b []byte) error {
167         buf := codec.NewBuffer(b)
168         m.Retval = buf.DecodeInt32()
169         return nil
170 }
171
172 // TraceProfileShowConfig defines message 'trace_profile_show_config'.
173 type TraceProfileShowConfig struct{}
174
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
180 }
181
182 func (m *TraceProfileShowConfig) Size() (size int) {
183         if m == nil {
184                 return 0
185         }
186         return size
187 }
188 func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
189         if b == nil {
190                 b = make([]byte, m.Size())
191         }
192         buf := codec.NewBuffer(b)
193         return buf.Bytes(), nil
194 }
195 func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
196         return nil
197 }
198
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"`
207 }
208
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
214 }
215
216 func (m *TraceProfileShowConfigReply) Size() (size int) {
217         if m == nil {
218                 return 0
219         }
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
226         return size
227 }
228 func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
229         if b == nil {
230                 b = make([]byte, m.Size())
231         }
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
240 }
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()
249         return nil
250 }
251
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")
260 }
261
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),
271         }
272 }