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