binapigen: fix union size
[govpp.git] / binapi / vpe / vpe.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 // source: /usr/share/vpp/api/core/vpe.api.json
6
7 // Package vpe contains generated bindings for API file vpe.api.
8 //
9 // Contents:
10 //   1 struct
11 //  26 messages
12 //
13 package vpe
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         vpe_types "git.fd.io/govpp.git/binapi/vpe_types"
18         codec "git.fd.io/govpp.git/codec"
19 )
20
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
26
27 const (
28         APIFile    = "vpe"
29         APIVersion = "1.6.1"
30         VersionCrc = 0xbd2c94f4
31 )
32
33 // ThreadData defines type 'thread_data'.
34 type ThreadData struct {
35         ID        uint32 `binapi:"u32,name=id" json:"id,omitempty"`
36         Name      string `binapi:"string[64],name=name" json:"name,omitempty"`
37         Type      string `binapi:"string[64],name=type" json:"type,omitempty"`
38         PID       uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
39         CPUID     uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
40         Core      uint32 `binapi:"u32,name=core" json:"core,omitempty"`
41         CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
42 }
43
44 // AddNodeNext defines message 'add_node_next'.
45 type AddNodeNext struct {
46         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
47         NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
48 }
49
50 func (m *AddNodeNext) Reset()               { *m = AddNodeNext{} }
51 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
52 func (*AddNodeNext) GetCrcString() string   { return "2457116d" }
53 func (*AddNodeNext) GetMessageType() api.MessageType {
54         return api.RequestMessage
55 }
56
57 func (m *AddNodeNext) Size() (size int) {
58         if m == nil {
59                 return 0
60         }
61         size += 64 // m.NodeName
62         size += 64 // m.NextName
63         return size
64 }
65 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
66         if b == nil {
67                 b = make([]byte, m.Size())
68         }
69         buf := codec.NewBuffer(b)
70         buf.EncodeString(m.NodeName, 64)
71         buf.EncodeString(m.NextName, 64)
72         return buf.Bytes(), nil
73 }
74 func (m *AddNodeNext) Unmarshal(b []byte) error {
75         buf := codec.NewBuffer(b)
76         m.NodeName = buf.DecodeString(64)
77         m.NextName = buf.DecodeString(64)
78         return nil
79 }
80
81 // AddNodeNextReply defines message 'add_node_next_reply'.
82 type AddNodeNextReply struct {
83         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
84         NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
85 }
86
87 func (m *AddNodeNextReply) Reset()               { *m = AddNodeNextReply{} }
88 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
89 func (*AddNodeNextReply) GetCrcString() string   { return "2ed75f32" }
90 func (*AddNodeNextReply) GetMessageType() api.MessageType {
91         return api.ReplyMessage
92 }
93
94 func (m *AddNodeNextReply) Size() (size int) {
95         if m == nil {
96                 return 0
97         }
98         size += 4 // m.Retval
99         size += 4 // m.NextIndex
100         return size
101 }
102 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
103         if b == nil {
104                 b = make([]byte, m.Size())
105         }
106         buf := codec.NewBuffer(b)
107         buf.EncodeInt32(m.Retval)
108         buf.EncodeUint32(m.NextIndex)
109         return buf.Bytes(), nil
110 }
111 func (m *AddNodeNextReply) Unmarshal(b []byte) error {
112         buf := codec.NewBuffer(b)
113         m.Retval = buf.DecodeInt32()
114         m.NextIndex = buf.DecodeUint32()
115         return nil
116 }
117
118 // Cli defines message 'cli'.
119 type Cli struct {
120         CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
121 }
122
123 func (m *Cli) Reset()               { *m = Cli{} }
124 func (*Cli) GetMessageName() string { return "cli" }
125 func (*Cli) GetCrcString() string   { return "23bfbfff" }
126 func (*Cli) GetMessageType() api.MessageType {
127         return api.RequestMessage
128 }
129
130 func (m *Cli) Size() (size int) {
131         if m == nil {
132                 return 0
133         }
134         size += 8 // m.CmdInShmem
135         return size
136 }
137 func (m *Cli) Marshal(b []byte) ([]byte, error) {
138         if b == nil {
139                 b = make([]byte, m.Size())
140         }
141         buf := codec.NewBuffer(b)
142         buf.EncodeUint64(m.CmdInShmem)
143         return buf.Bytes(), nil
144 }
145 func (m *Cli) Unmarshal(b []byte) error {
146         buf := codec.NewBuffer(b)
147         m.CmdInShmem = buf.DecodeUint64()
148         return nil
149 }
150
151 // CliInband defines message 'cli_inband'.
152 type CliInband struct {
153         Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
154 }
155
156 func (m *CliInband) Reset()               { *m = CliInband{} }
157 func (*CliInband) GetMessageName() string { return "cli_inband" }
158 func (*CliInband) GetCrcString() string   { return "f8377302" }
159 func (*CliInband) GetMessageType() api.MessageType {
160         return api.RequestMessage
161 }
162
163 func (m *CliInband) Size() (size int) {
164         if m == nil {
165                 return 0
166         }
167         size += 4 + len(m.Cmd) // m.Cmd
168         return size
169 }
170 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
171         if b == nil {
172                 b = make([]byte, m.Size())
173         }
174         buf := codec.NewBuffer(b)
175         buf.EncodeString(m.Cmd, 0)
176         return buf.Bytes(), nil
177 }
178 func (m *CliInband) Unmarshal(b []byte) error {
179         buf := codec.NewBuffer(b)
180         m.Cmd = buf.DecodeString(0)
181         return nil
182 }
183
184 // CliInbandReply defines message 'cli_inband_reply'.
185 type CliInbandReply struct {
186         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
187         Reply  string `binapi:"string[],name=reply" json:"reply,omitempty"`
188 }
189
190 func (m *CliInbandReply) Reset()               { *m = CliInbandReply{} }
191 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
192 func (*CliInbandReply) GetCrcString() string   { return "05879051" }
193 func (*CliInbandReply) GetMessageType() api.MessageType {
194         return api.ReplyMessage
195 }
196
197 func (m *CliInbandReply) Size() (size int) {
198         if m == nil {
199                 return 0
200         }
201         size += 4                // m.Retval
202         size += 4 + len(m.Reply) // m.Reply
203         return size
204 }
205 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
206         if b == nil {
207                 b = make([]byte, m.Size())
208         }
209         buf := codec.NewBuffer(b)
210         buf.EncodeInt32(m.Retval)
211         buf.EncodeString(m.Reply, 0)
212         return buf.Bytes(), nil
213 }
214 func (m *CliInbandReply) Unmarshal(b []byte) error {
215         buf := codec.NewBuffer(b)
216         m.Retval = buf.DecodeInt32()
217         m.Reply = buf.DecodeString(0)
218         return nil
219 }
220
221 // CliReply defines message 'cli_reply'.
222 type CliReply struct {
223         Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
224         ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
225 }
226
227 func (m *CliReply) Reset()               { *m = CliReply{} }
228 func (*CliReply) GetMessageName() string { return "cli_reply" }
229 func (*CliReply) GetCrcString() string   { return "06d68297" }
230 func (*CliReply) GetMessageType() api.MessageType {
231         return api.ReplyMessage
232 }
233
234 func (m *CliReply) Size() (size int) {
235         if m == nil {
236                 return 0
237         }
238         size += 4 // m.Retval
239         size += 8 // m.ReplyInShmem
240         return size
241 }
242 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
243         if b == nil {
244                 b = make([]byte, m.Size())
245         }
246         buf := codec.NewBuffer(b)
247         buf.EncodeInt32(m.Retval)
248         buf.EncodeUint64(m.ReplyInShmem)
249         return buf.Bytes(), nil
250 }
251 func (m *CliReply) Unmarshal(b []byte) error {
252         buf := codec.NewBuffer(b)
253         m.Retval = buf.DecodeInt32()
254         m.ReplyInShmem = buf.DecodeUint64()
255         return nil
256 }
257
258 // ControlPing defines message 'control_ping'.
259 type ControlPing struct{}
260
261 func (m *ControlPing) Reset()               { *m = ControlPing{} }
262 func (*ControlPing) GetMessageName() string { return "control_ping" }
263 func (*ControlPing) GetCrcString() string   { return "51077d14" }
264 func (*ControlPing) GetMessageType() api.MessageType {
265         return api.RequestMessage
266 }
267
268 func (m *ControlPing) Size() (size int) {
269         if m == nil {
270                 return 0
271         }
272         return size
273 }
274 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
275         if b == nil {
276                 b = make([]byte, m.Size())
277         }
278         buf := codec.NewBuffer(b)
279         return buf.Bytes(), nil
280 }
281 func (m *ControlPing) Unmarshal(b []byte) error {
282         return nil
283 }
284
285 // ControlPingReply defines message 'control_ping_reply'.
286 type ControlPingReply struct {
287         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
288         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
289         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
290 }
291
292 func (m *ControlPingReply) Reset()               { *m = ControlPingReply{} }
293 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
294 func (*ControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
295 func (*ControlPingReply) GetMessageType() api.MessageType {
296         return api.ReplyMessage
297 }
298
299 func (m *ControlPingReply) Size() (size int) {
300         if m == nil {
301                 return 0
302         }
303         size += 4 // m.Retval
304         size += 4 // m.ClientIndex
305         size += 4 // m.VpePID
306         return size
307 }
308 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
309         if b == nil {
310                 b = make([]byte, m.Size())
311         }
312         buf := codec.NewBuffer(b)
313         buf.EncodeInt32(m.Retval)
314         buf.EncodeUint32(m.ClientIndex)
315         buf.EncodeUint32(m.VpePID)
316         return buf.Bytes(), nil
317 }
318 func (m *ControlPingReply) Unmarshal(b []byte) error {
319         buf := codec.NewBuffer(b)
320         m.Retval = buf.DecodeInt32()
321         m.ClientIndex = buf.DecodeUint32()
322         m.VpePID = buf.DecodeUint32()
323         return nil
324 }
325
326 // GetF64EndianValue defines message 'get_f64_endian_value'.
327 type GetF64EndianValue struct {
328         F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
329 }
330
331 func (m *GetF64EndianValue) Reset()               { *m = GetF64EndianValue{} }
332 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
333 func (*GetF64EndianValue) GetCrcString() string   { return "809fcd44" }
334 func (*GetF64EndianValue) GetMessageType() api.MessageType {
335         return api.RequestMessage
336 }
337
338 func (m *GetF64EndianValue) Size() (size int) {
339         if m == nil {
340                 return 0
341         }
342         size += 8 // m.F64One
343         return size
344 }
345 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
346         if b == nil {
347                 b = make([]byte, m.Size())
348         }
349         buf := codec.NewBuffer(b)
350         buf.EncodeFloat64(m.F64One)
351         return buf.Bytes(), nil
352 }
353 func (m *GetF64EndianValue) Unmarshal(b []byte) error {
354         buf := codec.NewBuffer(b)
355         m.F64One = buf.DecodeFloat64()
356         return nil
357 }
358
359 // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
360 type GetF64EndianValueReply struct {
361         Retval       uint32  `binapi:"u32,name=retval" json:"retval,omitempty"`
362         F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
363 }
364
365 func (m *GetF64EndianValueReply) Reset()               { *m = GetF64EndianValueReply{} }
366 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
367 func (*GetF64EndianValueReply) GetCrcString() string   { return "7e02e404" }
368 func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
369         return api.ReplyMessage
370 }
371
372 func (m *GetF64EndianValueReply) Size() (size int) {
373         if m == nil {
374                 return 0
375         }
376         size += 4 // m.Retval
377         size += 8 // m.F64OneResult
378         return size
379 }
380 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
381         if b == nil {
382                 b = make([]byte, m.Size())
383         }
384         buf := codec.NewBuffer(b)
385         buf.EncodeUint32(m.Retval)
386         buf.EncodeFloat64(m.F64OneResult)
387         return buf.Bytes(), nil
388 }
389 func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
390         buf := codec.NewBuffer(b)
391         m.Retval = buf.DecodeUint32()
392         m.F64OneResult = buf.DecodeFloat64()
393         return nil
394 }
395
396 // GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
397 type GetF64IncrementByOne struct {
398         F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
399 }
400
401 func (m *GetF64IncrementByOne) Reset()               { *m = GetF64IncrementByOne{} }
402 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
403 func (*GetF64IncrementByOne) GetCrcString() string   { return "b64f027e" }
404 func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
405         return api.RequestMessage
406 }
407
408 func (m *GetF64IncrementByOne) Size() (size int) {
409         if m == nil {
410                 return 0
411         }
412         size += 8 // m.F64Value
413         return size
414 }
415 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
416         if b == nil {
417                 b = make([]byte, m.Size())
418         }
419         buf := codec.NewBuffer(b)
420         buf.EncodeFloat64(m.F64Value)
421         return buf.Bytes(), nil
422 }
423 func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
424         buf := codec.NewBuffer(b)
425         m.F64Value = buf.DecodeFloat64()
426         return nil
427 }
428
429 // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
430 type GetF64IncrementByOneReply struct {
431         Retval   uint32  `binapi:"u32,name=retval" json:"retval,omitempty"`
432         F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
433 }
434
435 func (m *GetF64IncrementByOneReply) Reset()               { *m = GetF64IncrementByOneReply{} }
436 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
437 func (*GetF64IncrementByOneReply) GetCrcString() string   { return "d25dbaa3" }
438 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
439         return api.ReplyMessage
440 }
441
442 func (m *GetF64IncrementByOneReply) Size() (size int) {
443         if m == nil {
444                 return 0
445         }
446         size += 4 // m.Retval
447         size += 8 // m.F64Value
448         return size
449 }
450 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
451         if b == nil {
452                 b = make([]byte, m.Size())
453         }
454         buf := codec.NewBuffer(b)
455         buf.EncodeUint32(m.Retval)
456         buf.EncodeFloat64(m.F64Value)
457         return buf.Bytes(), nil
458 }
459 func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
460         buf := codec.NewBuffer(b)
461         m.Retval = buf.DecodeUint32()
462         m.F64Value = buf.DecodeFloat64()
463         return nil
464 }
465
466 // GetNextIndex defines message 'get_next_index'.
467 type GetNextIndex struct {
468         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
469         NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
470 }
471
472 func (m *GetNextIndex) Reset()               { *m = GetNextIndex{} }
473 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
474 func (*GetNextIndex) GetCrcString() string   { return "2457116d" }
475 func (*GetNextIndex) GetMessageType() api.MessageType {
476         return api.RequestMessage
477 }
478
479 func (m *GetNextIndex) Size() (size int) {
480         if m == nil {
481                 return 0
482         }
483         size += 64 // m.NodeName
484         size += 64 // m.NextName
485         return size
486 }
487 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
488         if b == nil {
489                 b = make([]byte, m.Size())
490         }
491         buf := codec.NewBuffer(b)
492         buf.EncodeString(m.NodeName, 64)
493         buf.EncodeString(m.NextName, 64)
494         return buf.Bytes(), nil
495 }
496 func (m *GetNextIndex) Unmarshal(b []byte) error {
497         buf := codec.NewBuffer(b)
498         m.NodeName = buf.DecodeString(64)
499         m.NextName = buf.DecodeString(64)
500         return nil
501 }
502
503 // GetNextIndexReply defines message 'get_next_index_reply'.
504 type GetNextIndexReply struct {
505         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
506         NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
507 }
508
509 func (m *GetNextIndexReply) Reset()               { *m = GetNextIndexReply{} }
510 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
511 func (*GetNextIndexReply) GetCrcString() string   { return "2ed75f32" }
512 func (*GetNextIndexReply) GetMessageType() api.MessageType {
513         return api.ReplyMessage
514 }
515
516 func (m *GetNextIndexReply) Size() (size int) {
517         if m == nil {
518                 return 0
519         }
520         size += 4 // m.Retval
521         size += 4 // m.NextIndex
522         return size
523 }
524 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
525         if b == nil {
526                 b = make([]byte, m.Size())
527         }
528         buf := codec.NewBuffer(b)
529         buf.EncodeInt32(m.Retval)
530         buf.EncodeUint32(m.NextIndex)
531         return buf.Bytes(), nil
532 }
533 func (m *GetNextIndexReply) Unmarshal(b []byte) error {
534         buf := codec.NewBuffer(b)
535         m.Retval = buf.DecodeInt32()
536         m.NextIndex = buf.DecodeUint32()
537         return nil
538 }
539
540 // GetNodeGraph defines message 'get_node_graph'.
541 type GetNodeGraph struct{}
542
543 func (m *GetNodeGraph) Reset()               { *m = GetNodeGraph{} }
544 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
545 func (*GetNodeGraph) GetCrcString() string   { return "51077d14" }
546 func (*GetNodeGraph) GetMessageType() api.MessageType {
547         return api.RequestMessage
548 }
549
550 func (m *GetNodeGraph) Size() (size int) {
551         if m == nil {
552                 return 0
553         }
554         return size
555 }
556 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
557         if b == nil {
558                 b = make([]byte, m.Size())
559         }
560         buf := codec.NewBuffer(b)
561         return buf.Bytes(), nil
562 }
563 func (m *GetNodeGraph) Unmarshal(b []byte) error {
564         return nil
565 }
566
567 // GetNodeGraphReply defines message 'get_node_graph_reply'.
568 type GetNodeGraphReply struct {
569         Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
570         ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
571 }
572
573 func (m *GetNodeGraphReply) Reset()               { *m = GetNodeGraphReply{} }
574 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
575 func (*GetNodeGraphReply) GetCrcString() string   { return "06d68297" }
576 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
577         return api.ReplyMessage
578 }
579
580 func (m *GetNodeGraphReply) Size() (size int) {
581         if m == nil {
582                 return 0
583         }
584         size += 4 // m.Retval
585         size += 8 // m.ReplyInShmem
586         return size
587 }
588 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
589         if b == nil {
590                 b = make([]byte, m.Size())
591         }
592         buf := codec.NewBuffer(b)
593         buf.EncodeInt32(m.Retval)
594         buf.EncodeUint64(m.ReplyInShmem)
595         return buf.Bytes(), nil
596 }
597 func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
598         buf := codec.NewBuffer(b)
599         m.Retval = buf.DecodeInt32()
600         m.ReplyInShmem = buf.DecodeUint64()
601         return nil
602 }
603
604 // GetNodeIndex defines message 'get_node_index'.
605 type GetNodeIndex struct {
606         NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
607 }
608
609 func (m *GetNodeIndex) Reset()               { *m = GetNodeIndex{} }
610 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
611 func (*GetNodeIndex) GetCrcString() string   { return "f1984c64" }
612 func (*GetNodeIndex) GetMessageType() api.MessageType {
613         return api.RequestMessage
614 }
615
616 func (m *GetNodeIndex) Size() (size int) {
617         if m == nil {
618                 return 0
619         }
620         size += 64 // m.NodeName
621         return size
622 }
623 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
624         if b == nil {
625                 b = make([]byte, m.Size())
626         }
627         buf := codec.NewBuffer(b)
628         buf.EncodeString(m.NodeName, 64)
629         return buf.Bytes(), nil
630 }
631 func (m *GetNodeIndex) Unmarshal(b []byte) error {
632         buf := codec.NewBuffer(b)
633         m.NodeName = buf.DecodeString(64)
634         return nil
635 }
636
637 // GetNodeIndexReply defines message 'get_node_index_reply'.
638 type GetNodeIndexReply struct {
639         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
640         NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
641 }
642
643 func (m *GetNodeIndexReply) Reset()               { *m = GetNodeIndexReply{} }
644 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
645 func (*GetNodeIndexReply) GetCrcString() string   { return "a8600b89" }
646 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
647         return api.ReplyMessage
648 }
649
650 func (m *GetNodeIndexReply) Size() (size int) {
651         if m == nil {
652                 return 0
653         }
654         size += 4 // m.Retval
655         size += 4 // m.NodeIndex
656         return size
657 }
658 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
659         if b == nil {
660                 b = make([]byte, m.Size())
661         }
662         buf := codec.NewBuffer(b)
663         buf.EncodeInt32(m.Retval)
664         buf.EncodeUint32(m.NodeIndex)
665         return buf.Bytes(), nil
666 }
667 func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
668         buf := codec.NewBuffer(b)
669         m.Retval = buf.DecodeInt32()
670         m.NodeIndex = buf.DecodeUint32()
671         return nil
672 }
673
674 // LogDetails defines message 'log_details'.
675 type LogDetails struct {
676         Timestamp vpe_types.Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
677         Level     vpe_types.LogLevel  `binapi:"log_level,name=level" json:"level,omitempty"`
678         MsgClass  string              `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
679         Message   string              `binapi:"string[256],name=message" json:"message,omitempty"`
680 }
681
682 func (m *LogDetails) Reset()               { *m = LogDetails{} }
683 func (*LogDetails) GetMessageName() string { return "log_details" }
684 func (*LogDetails) GetCrcString() string   { return "255827a1" }
685 func (*LogDetails) GetMessageType() api.MessageType {
686         return api.ReplyMessage
687 }
688
689 func (m *LogDetails) Size() (size int) {
690         if m == nil {
691                 return 0
692         }
693         size += 8   // m.Timestamp
694         size += 4   // m.Level
695         size += 32  // m.MsgClass
696         size += 256 // m.Message
697         return size
698 }
699 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
700         if b == nil {
701                 b = make([]byte, m.Size())
702         }
703         buf := codec.NewBuffer(b)
704         buf.EncodeFloat64(float64(m.Timestamp))
705         buf.EncodeUint32(uint32(m.Level))
706         buf.EncodeString(m.MsgClass, 32)
707         buf.EncodeString(m.Message, 256)
708         return buf.Bytes(), nil
709 }
710 func (m *LogDetails) Unmarshal(b []byte) error {
711         buf := codec.NewBuffer(b)
712         m.Timestamp = vpe_types.Timestamp(buf.DecodeFloat64())
713         m.Level = vpe_types.LogLevel(buf.DecodeUint32())
714         m.MsgClass = buf.DecodeString(32)
715         m.Message = buf.DecodeString(256)
716         return nil
717 }
718
719 // LogDump defines message 'log_dump'.
720 type LogDump struct {
721         StartTimestamp vpe_types.Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
722 }
723
724 func (m *LogDump) Reset()               { *m = LogDump{} }
725 func (*LogDump) GetMessageName() string { return "log_dump" }
726 func (*LogDump) GetCrcString() string   { return "6ab31753" }
727 func (*LogDump) GetMessageType() api.MessageType {
728         return api.RequestMessage
729 }
730
731 func (m *LogDump) Size() (size int) {
732         if m == nil {
733                 return 0
734         }
735         size += 8 // m.StartTimestamp
736         return size
737 }
738 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
739         if b == nil {
740                 b = make([]byte, m.Size())
741         }
742         buf := codec.NewBuffer(b)
743         buf.EncodeFloat64(float64(m.StartTimestamp))
744         return buf.Bytes(), nil
745 }
746 func (m *LogDump) Unmarshal(b []byte) error {
747         buf := codec.NewBuffer(b)
748         m.StartTimestamp = vpe_types.Timestamp(buf.DecodeFloat64())
749         return nil
750 }
751
752 // ShowThreads defines message 'show_threads'.
753 type ShowThreads struct{}
754
755 func (m *ShowThreads) Reset()               { *m = ShowThreads{} }
756 func (*ShowThreads) GetMessageName() string { return "show_threads" }
757 func (*ShowThreads) GetCrcString() string   { return "51077d14" }
758 func (*ShowThreads) GetMessageType() api.MessageType {
759         return api.RequestMessage
760 }
761
762 func (m *ShowThreads) Size() (size int) {
763         if m == nil {
764                 return 0
765         }
766         return size
767 }
768 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
769         if b == nil {
770                 b = make([]byte, m.Size())
771         }
772         buf := codec.NewBuffer(b)
773         return buf.Bytes(), nil
774 }
775 func (m *ShowThreads) Unmarshal(b []byte) error {
776         return nil
777 }
778
779 // ShowThreadsReply defines message 'show_threads_reply'.
780 type ShowThreadsReply struct {
781         Retval     int32        `binapi:"i32,name=retval" json:"retval,omitempty"`
782         Count      uint32       `binapi:"u32,name=count" json:"-"`
783         ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
784 }
785
786 func (m *ShowThreadsReply) Reset()               { *m = ShowThreadsReply{} }
787 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
788 func (*ShowThreadsReply) GetCrcString() string   { return "efd78e83" }
789 func (*ShowThreadsReply) GetMessageType() api.MessageType {
790         return api.ReplyMessage
791 }
792
793 func (m *ShowThreadsReply) Size() (size int) {
794         if m == nil {
795                 return 0
796         }
797         size += 4 // m.Retval
798         size += 4 // m.Count
799         for j1 := 0; j1 < len(m.ThreadData); j1++ {
800                 var s1 ThreadData
801                 _ = s1
802                 if j1 < len(m.ThreadData) {
803                         s1 = m.ThreadData[j1]
804                 }
805                 size += 4  // s1.ID
806                 size += 64 // s1.Name
807                 size += 64 // s1.Type
808                 size += 4  // s1.PID
809                 size += 4  // s1.CPUID
810                 size += 4  // s1.Core
811                 size += 4  // s1.CPUSocket
812         }
813         return size
814 }
815 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
816         if b == nil {
817                 b = make([]byte, m.Size())
818         }
819         buf := codec.NewBuffer(b)
820         buf.EncodeInt32(m.Retval)
821         buf.EncodeUint32(uint32(len(m.ThreadData)))
822         for j0 := 0; j0 < len(m.ThreadData); j0++ {
823                 var v0 ThreadData // ThreadData
824                 if j0 < len(m.ThreadData) {
825                         v0 = m.ThreadData[j0]
826                 }
827                 buf.EncodeUint32(v0.ID)
828                 buf.EncodeString(v0.Name, 64)
829                 buf.EncodeString(v0.Type, 64)
830                 buf.EncodeUint32(v0.PID)
831                 buf.EncodeUint32(v0.CPUID)
832                 buf.EncodeUint32(v0.Core)
833                 buf.EncodeUint32(v0.CPUSocket)
834         }
835         return buf.Bytes(), nil
836 }
837 func (m *ShowThreadsReply) Unmarshal(b []byte) error {
838         buf := codec.NewBuffer(b)
839         m.Retval = buf.DecodeInt32()
840         m.Count = buf.DecodeUint32()
841         m.ThreadData = make([]ThreadData, m.Count)
842         for j0 := 0; j0 < len(m.ThreadData); j0++ {
843                 m.ThreadData[j0].ID = buf.DecodeUint32()
844                 m.ThreadData[j0].Name = buf.DecodeString(64)
845                 m.ThreadData[j0].Type = buf.DecodeString(64)
846                 m.ThreadData[j0].PID = buf.DecodeUint32()
847                 m.ThreadData[j0].CPUID = buf.DecodeUint32()
848                 m.ThreadData[j0].Core = buf.DecodeUint32()
849                 m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
850         }
851         return nil
852 }
853
854 // ShowVersion defines message 'show_version'.
855 type ShowVersion struct{}
856
857 func (m *ShowVersion) Reset()               { *m = ShowVersion{} }
858 func (*ShowVersion) GetMessageName() string { return "show_version" }
859 func (*ShowVersion) GetCrcString() string   { return "51077d14" }
860 func (*ShowVersion) GetMessageType() api.MessageType {
861         return api.RequestMessage
862 }
863
864 func (m *ShowVersion) Size() (size int) {
865         if m == nil {
866                 return 0
867         }
868         return size
869 }
870 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
871         if b == nil {
872                 b = make([]byte, m.Size())
873         }
874         buf := codec.NewBuffer(b)
875         return buf.Bytes(), nil
876 }
877 func (m *ShowVersion) Unmarshal(b []byte) error {
878         return nil
879 }
880
881 // ShowVersionReply defines message 'show_version_reply'.
882 type ShowVersionReply struct {
883         Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
884         Program        string `binapi:"string[32],name=program" json:"program,omitempty"`
885         Version        string `binapi:"string[32],name=version" json:"version,omitempty"`
886         BuildDate      string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
887         BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
888 }
889
890 func (m *ShowVersionReply) Reset()               { *m = ShowVersionReply{} }
891 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
892 func (*ShowVersionReply) GetCrcString() string   { return "c919bde1" }
893 func (*ShowVersionReply) GetMessageType() api.MessageType {
894         return api.ReplyMessage
895 }
896
897 func (m *ShowVersionReply) Size() (size int) {
898         if m == nil {
899                 return 0
900         }
901         size += 4   // m.Retval
902         size += 32  // m.Program
903         size += 32  // m.Version
904         size += 32  // m.BuildDate
905         size += 256 // m.BuildDirectory
906         return size
907 }
908 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
909         if b == nil {
910                 b = make([]byte, m.Size())
911         }
912         buf := codec.NewBuffer(b)
913         buf.EncodeInt32(m.Retval)
914         buf.EncodeString(m.Program, 32)
915         buf.EncodeString(m.Version, 32)
916         buf.EncodeString(m.BuildDate, 32)
917         buf.EncodeString(m.BuildDirectory, 256)
918         return buf.Bytes(), nil
919 }
920 func (m *ShowVersionReply) Unmarshal(b []byte) error {
921         buf := codec.NewBuffer(b)
922         m.Retval = buf.DecodeInt32()
923         m.Program = buf.DecodeString(32)
924         m.Version = buf.DecodeString(32)
925         m.BuildDate = buf.DecodeString(32)
926         m.BuildDirectory = buf.DecodeString(256)
927         return nil
928 }
929
930 // ShowVpeSystemTime defines message 'show_vpe_system_time'.
931 type ShowVpeSystemTime struct{}
932
933 func (m *ShowVpeSystemTime) Reset()               { *m = ShowVpeSystemTime{} }
934 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
935 func (*ShowVpeSystemTime) GetCrcString() string   { return "51077d14" }
936 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
937         return api.RequestMessage
938 }
939
940 func (m *ShowVpeSystemTime) Size() (size int) {
941         if m == nil {
942                 return 0
943         }
944         return size
945 }
946 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
947         if b == nil {
948                 b = make([]byte, m.Size())
949         }
950         buf := codec.NewBuffer(b)
951         return buf.Bytes(), nil
952 }
953 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
954         return nil
955 }
956
957 // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
958 type ShowVpeSystemTimeReply struct {
959         Retval        int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
960         VpeSystemTime vpe_types.Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
961 }
962
963 func (m *ShowVpeSystemTimeReply) Reset()               { *m = ShowVpeSystemTimeReply{} }
964 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
965 func (*ShowVpeSystemTimeReply) GetCrcString() string   { return "7ffd8193" }
966 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
967         return api.ReplyMessage
968 }
969
970 func (m *ShowVpeSystemTimeReply) Size() (size int) {
971         if m == nil {
972                 return 0
973         }
974         size += 4 // m.Retval
975         size += 8 // m.VpeSystemTime
976         return size
977 }
978 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
979         if b == nil {
980                 b = make([]byte, m.Size())
981         }
982         buf := codec.NewBuffer(b)
983         buf.EncodeInt32(m.Retval)
984         buf.EncodeFloat64(float64(m.VpeSystemTime))
985         return buf.Bytes(), nil
986 }
987 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
988         buf := codec.NewBuffer(b)
989         m.Retval = buf.DecodeInt32()
990         m.VpeSystemTime = vpe_types.Timestamp(buf.DecodeFloat64())
991         return nil
992 }
993
994 func init() { file_vpe_binapi_init() }
995 func file_vpe_binapi_init() {
996         api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_2457116d")
997         api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
998         api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
999         api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
1000         api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
1001         api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
1002         api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
1003         api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
1004         api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
1005         api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
1006         api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
1007         api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
1008         api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_2457116d")
1009         api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
1010         api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
1011         api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
1012         api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_f1984c64")
1013         api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
1014         api.RegisterMessage((*LogDetails)(nil), "log_details_255827a1")
1015         api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
1016         api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
1017         api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_efd78e83")
1018         api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
1019         api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
1020         api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
1021         api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
1022 }
1023
1024 // Messages returns list of all messages in this module.
1025 func AllMessages() []api.Message {
1026         return []api.Message{
1027                 (*AddNodeNext)(nil),
1028                 (*AddNodeNextReply)(nil),
1029                 (*Cli)(nil),
1030                 (*CliInband)(nil),
1031                 (*CliInbandReply)(nil),
1032                 (*CliReply)(nil),
1033                 (*ControlPing)(nil),
1034                 (*ControlPingReply)(nil),
1035                 (*GetF64EndianValue)(nil),
1036                 (*GetF64EndianValueReply)(nil),
1037                 (*GetF64IncrementByOne)(nil),
1038                 (*GetF64IncrementByOneReply)(nil),
1039                 (*GetNextIndex)(nil),
1040                 (*GetNextIndexReply)(nil),
1041                 (*GetNodeGraph)(nil),
1042                 (*GetNodeGraphReply)(nil),
1043                 (*GetNodeIndex)(nil),
1044                 (*GetNodeIndexReply)(nil),
1045                 (*LogDetails)(nil),
1046                 (*LogDump)(nil),
1047                 (*ShowThreads)(nil),
1048                 (*ShowThreadsReply)(nil),
1049                 (*ShowVersion)(nil),
1050                 (*ShowVersionReply)(nil),
1051                 (*ShowVpeSystemTime)(nil),
1052                 (*ShowVpeSystemTimeReply)(nil),
1053         }
1054 }