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