1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/vpe.api.json
7 // Package vpe contains generated bindings for API file vpe.api.
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"
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
30 VersionCrc = 0xbd2c94f4
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"`
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"`
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
57 func (m *AddNodeNext) Size() int {
62 size += 64 // m.NodeName
63 size += 64 // m.NextName
66 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
69 buf = codec.NewBuffer(make([]byte, m.Size()))
71 buf = codec.NewBuffer(b)
73 buf.EncodeString(m.NodeName, 64)
74 buf.EncodeString(m.NextName, 64)
75 return buf.Bytes(), nil
77 func (m *AddNodeNext) Unmarshal(b []byte) error {
78 buf := codec.NewBuffer(b)
79 m.NodeName = buf.DecodeString(64)
80 m.NextName = buf.DecodeString(64)
84 // AddNodeNextReply defines message 'add_node_next_reply'.
85 type AddNodeNextReply struct {
86 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
87 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
90 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
91 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
92 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
93 func (*AddNodeNextReply) GetMessageType() api.MessageType {
94 return api.ReplyMessage
97 func (m *AddNodeNextReply) Size() int {
102 size += 4 // m.Retval
103 size += 4 // m.NextIndex
106 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
107 var buf *codec.Buffer
109 buf = codec.NewBuffer(make([]byte, m.Size()))
111 buf = codec.NewBuffer(b)
113 buf.EncodeUint32(uint32(m.Retval))
114 buf.EncodeUint32(uint32(m.NextIndex))
115 return buf.Bytes(), nil
117 func (m *AddNodeNextReply) Unmarshal(b []byte) error {
118 buf := codec.NewBuffer(b)
119 m.Retval = int32(buf.DecodeUint32())
120 m.NextIndex = buf.DecodeUint32()
124 // Cli defines message 'cli'.
126 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
129 func (m *Cli) Reset() { *m = Cli{} }
130 func (*Cli) GetMessageName() string { return "cli" }
131 func (*Cli) GetCrcString() string { return "23bfbfff" }
132 func (*Cli) GetMessageType() api.MessageType {
133 return api.RequestMessage
136 func (m *Cli) Size() int {
141 size += 8 // m.CmdInShmem
144 func (m *Cli) Marshal(b []byte) ([]byte, error) {
145 var buf *codec.Buffer
147 buf = codec.NewBuffer(make([]byte, m.Size()))
149 buf = codec.NewBuffer(b)
151 buf.EncodeUint64(uint64(m.CmdInShmem))
152 return buf.Bytes(), nil
154 func (m *Cli) Unmarshal(b []byte) error {
155 buf := codec.NewBuffer(b)
156 m.CmdInShmem = buf.DecodeUint64()
160 // CliInband defines message 'cli_inband'.
161 type CliInband struct {
162 Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
165 func (m *CliInband) Reset() { *m = CliInband{} }
166 func (*CliInband) GetMessageName() string { return "cli_inband" }
167 func (*CliInband) GetCrcString() string { return "f8377302" }
168 func (*CliInband) GetMessageType() api.MessageType {
169 return api.RequestMessage
172 func (m *CliInband) Size() int {
177 size += 4 + len(m.Cmd) // m.Cmd
180 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
181 var buf *codec.Buffer
183 buf = codec.NewBuffer(make([]byte, m.Size()))
185 buf = codec.NewBuffer(b)
187 buf.EncodeString(m.Cmd, 0)
188 return buf.Bytes(), nil
190 func (m *CliInband) Unmarshal(b []byte) error {
191 buf := codec.NewBuffer(b)
192 m.Cmd = buf.DecodeString(0)
196 // CliInbandReply defines message 'cli_inband_reply'.
197 type CliInbandReply struct {
198 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
199 Reply string `binapi:"string[],name=reply" json:"reply,omitempty"`
202 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
203 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
204 func (*CliInbandReply) GetCrcString() string { return "05879051" }
205 func (*CliInbandReply) GetMessageType() api.MessageType {
206 return api.ReplyMessage
209 func (m *CliInbandReply) Size() int {
214 size += 4 // m.Retval
215 size += 4 + len(m.Reply) // m.Reply
218 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
219 var buf *codec.Buffer
221 buf = codec.NewBuffer(make([]byte, m.Size()))
223 buf = codec.NewBuffer(b)
225 buf.EncodeUint32(uint32(m.Retval))
226 buf.EncodeString(m.Reply, 0)
227 return buf.Bytes(), nil
229 func (m *CliInbandReply) Unmarshal(b []byte) error {
230 buf := codec.NewBuffer(b)
231 m.Retval = int32(buf.DecodeUint32())
232 m.Reply = buf.DecodeString(0)
236 // CliReply defines message 'cli_reply'.
237 type CliReply struct {
238 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
239 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
242 func (m *CliReply) Reset() { *m = CliReply{} }
243 func (*CliReply) GetMessageName() string { return "cli_reply" }
244 func (*CliReply) GetCrcString() string { return "06d68297" }
245 func (*CliReply) GetMessageType() api.MessageType {
246 return api.ReplyMessage
249 func (m *CliReply) Size() int {
254 size += 4 // m.Retval
255 size += 8 // m.ReplyInShmem
258 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
259 var buf *codec.Buffer
261 buf = codec.NewBuffer(make([]byte, m.Size()))
263 buf = codec.NewBuffer(b)
265 buf.EncodeUint32(uint32(m.Retval))
266 buf.EncodeUint64(uint64(m.ReplyInShmem))
267 return buf.Bytes(), nil
269 func (m *CliReply) Unmarshal(b []byte) error {
270 buf := codec.NewBuffer(b)
271 m.Retval = int32(buf.DecodeUint32())
272 m.ReplyInShmem = buf.DecodeUint64()
276 // ControlPing defines message 'control_ping'.
277 type ControlPing struct{}
279 func (m *ControlPing) Reset() { *m = ControlPing{} }
280 func (*ControlPing) GetMessageName() string { return "control_ping" }
281 func (*ControlPing) GetCrcString() string { return "51077d14" }
282 func (*ControlPing) GetMessageType() api.MessageType {
283 return api.RequestMessage
286 func (m *ControlPing) Size() int {
293 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
294 var buf *codec.Buffer
296 buf = codec.NewBuffer(make([]byte, m.Size()))
298 buf = codec.NewBuffer(b)
300 return buf.Bytes(), nil
302 func (m *ControlPing) Unmarshal(b []byte) error {
306 // ControlPingReply defines message 'control_ping_reply'.
307 type ControlPingReply struct {
308 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
309 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
310 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
313 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
314 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
315 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
316 func (*ControlPingReply) GetMessageType() api.MessageType {
317 return api.ReplyMessage
320 func (m *ControlPingReply) Size() int {
325 size += 4 // m.Retval
326 size += 4 // m.ClientIndex
327 size += 4 // m.VpePID
330 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
331 var buf *codec.Buffer
333 buf = codec.NewBuffer(make([]byte, m.Size()))
335 buf = codec.NewBuffer(b)
337 buf.EncodeUint32(uint32(m.Retval))
338 buf.EncodeUint32(uint32(m.ClientIndex))
339 buf.EncodeUint32(uint32(m.VpePID))
340 return buf.Bytes(), nil
342 func (m *ControlPingReply) Unmarshal(b []byte) error {
343 buf := codec.NewBuffer(b)
344 m.Retval = int32(buf.DecodeUint32())
345 m.ClientIndex = buf.DecodeUint32()
346 m.VpePID = buf.DecodeUint32()
350 // GetF64EndianValue defines message 'get_f64_endian_value'.
351 type GetF64EndianValue struct {
352 F64One float64 `binapi:"f64,name=f64_one,default=%!s(float64=1)" json:"f64_one,omitempty"`
355 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
356 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
357 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
358 func (*GetF64EndianValue) GetMessageType() api.MessageType {
359 return api.RequestMessage
362 func (m *GetF64EndianValue) Size() int {
367 size += 8 // m.F64One
370 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
371 var buf *codec.Buffer
373 buf = codec.NewBuffer(make([]byte, m.Size()))
375 buf = codec.NewBuffer(b)
377 buf.EncodeFloat64(float64(m.F64One))
378 return buf.Bytes(), nil
380 func (m *GetF64EndianValue) Unmarshal(b []byte) error {
381 buf := codec.NewBuffer(b)
382 m.F64One = float64(buf.DecodeFloat64())
386 // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
387 type GetF64EndianValueReply struct {
388 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
389 F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
392 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
393 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
394 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
395 func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
396 return api.ReplyMessage
399 func (m *GetF64EndianValueReply) Size() int {
404 size += 4 // m.Retval
405 size += 8 // m.F64OneResult
408 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
409 var buf *codec.Buffer
411 buf = codec.NewBuffer(make([]byte, m.Size()))
413 buf = codec.NewBuffer(b)
415 buf.EncodeUint32(uint32(m.Retval))
416 buf.EncodeFloat64(float64(m.F64OneResult))
417 return buf.Bytes(), nil
419 func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
420 buf := codec.NewBuffer(b)
421 m.Retval = buf.DecodeUint32()
422 m.F64OneResult = float64(buf.DecodeFloat64())
426 // GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
427 type GetF64IncrementByOne struct {
428 F64Value float64 `binapi:"f64,name=f64_value,default=%!s(float64=1)" json:"f64_value,omitempty"`
431 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
432 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
433 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
434 func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
435 return api.RequestMessage
438 func (m *GetF64IncrementByOne) Size() int {
443 size += 8 // m.F64Value
446 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
447 var buf *codec.Buffer
449 buf = codec.NewBuffer(make([]byte, m.Size()))
451 buf = codec.NewBuffer(b)
453 buf.EncodeFloat64(float64(m.F64Value))
454 return buf.Bytes(), nil
456 func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
457 buf := codec.NewBuffer(b)
458 m.F64Value = float64(buf.DecodeFloat64())
462 // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
463 type GetF64IncrementByOneReply struct {
464 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
465 F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
468 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
469 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
470 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
471 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
472 return api.ReplyMessage
475 func (m *GetF64IncrementByOneReply) Size() int {
480 size += 4 // m.Retval
481 size += 8 // m.F64Value
484 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
485 var buf *codec.Buffer
487 buf = codec.NewBuffer(make([]byte, m.Size()))
489 buf = codec.NewBuffer(b)
491 buf.EncodeUint32(uint32(m.Retval))
492 buf.EncodeFloat64(float64(m.F64Value))
493 return buf.Bytes(), nil
495 func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
496 buf := codec.NewBuffer(b)
497 m.Retval = buf.DecodeUint32()
498 m.F64Value = float64(buf.DecodeFloat64())
502 // GetNextIndex defines message 'get_next_index'.
503 type GetNextIndex struct {
504 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
505 NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
508 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
509 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
510 func (*GetNextIndex) GetCrcString() string { return "2457116d" }
511 func (*GetNextIndex) GetMessageType() api.MessageType {
512 return api.RequestMessage
515 func (m *GetNextIndex) Size() int {
520 size += 64 // m.NodeName
521 size += 64 // m.NextName
524 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
525 var buf *codec.Buffer
527 buf = codec.NewBuffer(make([]byte, m.Size()))
529 buf = codec.NewBuffer(b)
531 buf.EncodeString(m.NodeName, 64)
532 buf.EncodeString(m.NextName, 64)
533 return buf.Bytes(), nil
535 func (m *GetNextIndex) Unmarshal(b []byte) error {
536 buf := codec.NewBuffer(b)
537 m.NodeName = buf.DecodeString(64)
538 m.NextName = buf.DecodeString(64)
542 // GetNextIndexReply defines message 'get_next_index_reply'.
543 type GetNextIndexReply struct {
544 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
545 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
548 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
549 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
550 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
551 func (*GetNextIndexReply) GetMessageType() api.MessageType {
552 return api.ReplyMessage
555 func (m *GetNextIndexReply) Size() int {
560 size += 4 // m.Retval
561 size += 4 // m.NextIndex
564 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
565 var buf *codec.Buffer
567 buf = codec.NewBuffer(make([]byte, m.Size()))
569 buf = codec.NewBuffer(b)
571 buf.EncodeUint32(uint32(m.Retval))
572 buf.EncodeUint32(uint32(m.NextIndex))
573 return buf.Bytes(), nil
575 func (m *GetNextIndexReply) Unmarshal(b []byte) error {
576 buf := codec.NewBuffer(b)
577 m.Retval = int32(buf.DecodeUint32())
578 m.NextIndex = buf.DecodeUint32()
582 // GetNodeGraph defines message 'get_node_graph'.
583 type GetNodeGraph struct{}
585 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
586 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
587 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
588 func (*GetNodeGraph) GetMessageType() api.MessageType {
589 return api.RequestMessage
592 func (m *GetNodeGraph) Size() int {
599 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
600 var buf *codec.Buffer
602 buf = codec.NewBuffer(make([]byte, m.Size()))
604 buf = codec.NewBuffer(b)
606 return buf.Bytes(), nil
608 func (m *GetNodeGraph) Unmarshal(b []byte) error {
612 // GetNodeGraphReply defines message 'get_node_graph_reply'.
613 type GetNodeGraphReply struct {
614 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
615 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
618 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
619 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
620 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
621 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
622 return api.ReplyMessage
625 func (m *GetNodeGraphReply) Size() int {
630 size += 4 // m.Retval
631 size += 8 // m.ReplyInShmem
634 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
635 var buf *codec.Buffer
637 buf = codec.NewBuffer(make([]byte, m.Size()))
639 buf = codec.NewBuffer(b)
641 buf.EncodeUint32(uint32(m.Retval))
642 buf.EncodeUint64(uint64(m.ReplyInShmem))
643 return buf.Bytes(), nil
645 func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
646 buf := codec.NewBuffer(b)
647 m.Retval = int32(buf.DecodeUint32())
648 m.ReplyInShmem = buf.DecodeUint64()
652 // GetNodeIndex defines message 'get_node_index'.
653 type GetNodeIndex struct {
654 NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
657 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
658 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
659 func (*GetNodeIndex) GetCrcString() string { return "f1984c64" }
660 func (*GetNodeIndex) GetMessageType() api.MessageType {
661 return api.RequestMessage
664 func (m *GetNodeIndex) Size() int {
669 size += 64 // m.NodeName
672 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
673 var buf *codec.Buffer
675 buf = codec.NewBuffer(make([]byte, m.Size()))
677 buf = codec.NewBuffer(b)
679 buf.EncodeString(m.NodeName, 64)
680 return buf.Bytes(), nil
682 func (m *GetNodeIndex) Unmarshal(b []byte) error {
683 buf := codec.NewBuffer(b)
684 m.NodeName = buf.DecodeString(64)
688 // GetNodeIndexReply defines message 'get_node_index_reply'.
689 type GetNodeIndexReply struct {
690 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
691 NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
694 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
695 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
696 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
697 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
698 return api.ReplyMessage
701 func (m *GetNodeIndexReply) Size() int {
706 size += 4 // m.Retval
707 size += 4 // m.NodeIndex
710 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
711 var buf *codec.Buffer
713 buf = codec.NewBuffer(make([]byte, m.Size()))
715 buf = codec.NewBuffer(b)
717 buf.EncodeUint32(uint32(m.Retval))
718 buf.EncodeUint32(uint32(m.NodeIndex))
719 return buf.Bytes(), nil
721 func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
722 buf := codec.NewBuffer(b)
723 m.Retval = int32(buf.DecodeUint32())
724 m.NodeIndex = buf.DecodeUint32()
728 // LogDetails defines message 'log_details'.
729 type LogDetails struct {
730 Timestamp vpe_types.Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
731 Level vpe_types.LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
732 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
733 Message string `binapi:"string[256],name=message" json:"message,omitempty"`
736 func (m *LogDetails) Reset() { *m = LogDetails{} }
737 func (*LogDetails) GetMessageName() string { return "log_details" }
738 func (*LogDetails) GetCrcString() string { return "255827a1" }
739 func (*LogDetails) GetMessageType() api.MessageType {
740 return api.ReplyMessage
743 func (m *LogDetails) Size() int {
748 size += 8 // m.Timestamp
750 size += 32 // m.MsgClass
751 size += 256 // m.Message
754 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
755 var buf *codec.Buffer
757 buf = codec.NewBuffer(make([]byte, m.Size()))
759 buf = codec.NewBuffer(b)
761 buf.EncodeFloat64(float64(m.Timestamp))
762 buf.EncodeUint32(uint32(m.Level))
763 buf.EncodeString(m.MsgClass, 32)
764 buf.EncodeString(m.Message, 256)
765 return buf.Bytes(), nil
767 func (m *LogDetails) Unmarshal(b []byte) error {
768 buf := codec.NewBuffer(b)
769 m.Timestamp = vpe_types.Timestamp(buf.DecodeFloat64())
770 m.Level = vpe_types.LogLevel(buf.DecodeUint32())
771 m.MsgClass = buf.DecodeString(32)
772 m.Message = buf.DecodeString(256)
776 // LogDump defines message 'log_dump'.
777 type LogDump struct {
778 StartTimestamp vpe_types.Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
781 func (m *LogDump) Reset() { *m = LogDump{} }
782 func (*LogDump) GetMessageName() string { return "log_dump" }
783 func (*LogDump) GetCrcString() string { return "6ab31753" }
784 func (*LogDump) GetMessageType() api.MessageType {
785 return api.RequestMessage
788 func (m *LogDump) Size() int {
793 size += 8 // m.StartTimestamp
796 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
797 var buf *codec.Buffer
799 buf = codec.NewBuffer(make([]byte, m.Size()))
801 buf = codec.NewBuffer(b)
803 buf.EncodeFloat64(float64(m.StartTimestamp))
804 return buf.Bytes(), nil
806 func (m *LogDump) Unmarshal(b []byte) error {
807 buf := codec.NewBuffer(b)
808 m.StartTimestamp = vpe_types.Timestamp(buf.DecodeFloat64())
812 // ShowThreads defines message 'show_threads'.
813 type ShowThreads struct{}
815 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
816 func (*ShowThreads) GetMessageName() string { return "show_threads" }
817 func (*ShowThreads) GetCrcString() string { return "51077d14" }
818 func (*ShowThreads) GetMessageType() api.MessageType {
819 return api.RequestMessage
822 func (m *ShowThreads) Size() int {
829 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
830 var buf *codec.Buffer
832 buf = codec.NewBuffer(make([]byte, m.Size()))
834 buf = codec.NewBuffer(b)
836 return buf.Bytes(), nil
838 func (m *ShowThreads) Unmarshal(b []byte) error {
842 // ShowThreadsReply defines message 'show_threads_reply'.
843 type ShowThreadsReply struct {
844 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
845 Count uint32 `binapi:"u32,name=count" json:"-"`
846 ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
849 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
850 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
851 func (*ShowThreadsReply) GetCrcString() string { return "efd78e83" }
852 func (*ShowThreadsReply) GetMessageType() api.MessageType {
853 return api.ReplyMessage
856 func (m *ShowThreadsReply) Size() int {
861 size += 4 // m.Retval
863 for j1 := 0; j1 < len(m.ThreadData); j1++ {
866 if j1 < len(m.ThreadData) {
867 s1 = m.ThreadData[j1]
870 size += 64 // s1.Name
871 size += 64 // s1.Type
873 size += 4 // s1.CPUID
875 size += 4 // s1.CPUSocket
879 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
880 var buf *codec.Buffer
882 buf = codec.NewBuffer(make([]byte, m.Size()))
884 buf = codec.NewBuffer(b)
886 buf.EncodeUint32(uint32(m.Retval))
887 buf.EncodeUint32(uint32(len(m.ThreadData)))
888 for j0 := 0; j0 < len(m.ThreadData); j0++ {
890 if j0 < len(m.ThreadData) {
891 v0 = m.ThreadData[j0]
893 buf.EncodeUint32(uint32(v0.ID))
894 buf.EncodeString(v0.Name, 64)
895 buf.EncodeString(v0.Type, 64)
896 buf.EncodeUint32(uint32(v0.PID))
897 buf.EncodeUint32(uint32(v0.CPUID))
898 buf.EncodeUint32(uint32(v0.Core))
899 buf.EncodeUint32(uint32(v0.CPUSocket))
901 return buf.Bytes(), nil
903 func (m *ShowThreadsReply) Unmarshal(b []byte) error {
904 buf := codec.NewBuffer(b)
905 m.Retval = int32(buf.DecodeUint32())
906 m.Count = buf.DecodeUint32()
907 m.ThreadData = make([]ThreadData, int(m.Count))
908 for j0 := 0; j0 < len(m.ThreadData); j0++ {
909 m.ThreadData[j0].ID = buf.DecodeUint32()
910 m.ThreadData[j0].Name = buf.DecodeString(64)
911 m.ThreadData[j0].Type = buf.DecodeString(64)
912 m.ThreadData[j0].PID = buf.DecodeUint32()
913 m.ThreadData[j0].CPUID = buf.DecodeUint32()
914 m.ThreadData[j0].Core = buf.DecodeUint32()
915 m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
920 // ShowVersion defines message 'show_version'.
921 type ShowVersion struct{}
923 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
924 func (*ShowVersion) GetMessageName() string { return "show_version" }
925 func (*ShowVersion) GetCrcString() string { return "51077d14" }
926 func (*ShowVersion) GetMessageType() api.MessageType {
927 return api.RequestMessage
930 func (m *ShowVersion) Size() int {
937 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
938 var buf *codec.Buffer
940 buf = codec.NewBuffer(make([]byte, m.Size()))
942 buf = codec.NewBuffer(b)
944 return buf.Bytes(), nil
946 func (m *ShowVersion) Unmarshal(b []byte) error {
950 // ShowVersionReply defines message 'show_version_reply'.
951 type ShowVersionReply struct {
952 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
953 Program string `binapi:"string[32],name=program" json:"program,omitempty"`
954 Version string `binapi:"string[32],name=version" json:"version,omitempty"`
955 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
956 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
959 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
960 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
961 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
962 func (*ShowVersionReply) GetMessageType() api.MessageType {
963 return api.ReplyMessage
966 func (m *ShowVersionReply) Size() int {
971 size += 4 // m.Retval
972 size += 32 // m.Program
973 size += 32 // m.Version
974 size += 32 // m.BuildDate
975 size += 256 // m.BuildDirectory
978 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
979 var buf *codec.Buffer
981 buf = codec.NewBuffer(make([]byte, m.Size()))
983 buf = codec.NewBuffer(b)
985 buf.EncodeUint32(uint32(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
992 func (m *ShowVersionReply) Unmarshal(b []byte) error {
993 buf := codec.NewBuffer(b)
994 m.Retval = int32(buf.DecodeUint32())
995 m.Program = buf.DecodeString(32)
996 m.Version = buf.DecodeString(32)
997 m.BuildDate = buf.DecodeString(32)
998 m.BuildDirectory = buf.DecodeString(256)
1002 // ShowVpeSystemTime defines message 'show_vpe_system_time'.
1003 type ShowVpeSystemTime struct{}
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
1012 func (m *ShowVpeSystemTime) Size() int {
1019 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1020 var buf *codec.Buffer
1022 buf = codec.NewBuffer(make([]byte, m.Size()))
1024 buf = codec.NewBuffer(b)
1026 return buf.Bytes(), nil
1028 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
1032 // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
1033 type ShowVpeSystemTimeReply struct {
1034 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1035 VpeSystemTime vpe_types.Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
1038 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
1039 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
1040 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
1041 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
1042 return api.ReplyMessage
1045 func (m *ShowVpeSystemTimeReply) Size() int {
1050 size += 4 // m.Retval
1051 size += 8 // m.VpeSystemTime
1054 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1055 var buf *codec.Buffer
1057 buf = codec.NewBuffer(make([]byte, m.Size()))
1059 buf = codec.NewBuffer(b)
1061 buf.EncodeUint32(uint32(m.Retval))
1062 buf.EncodeFloat64(float64(m.VpeSystemTime))
1063 return buf.Bytes(), nil
1065 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
1066 buf := codec.NewBuffer(b)
1067 m.Retval = int32(buf.DecodeUint32())
1068 m.VpeSystemTime = vpe_types.Timestamp(buf.DecodeFloat64())
1072 func init() { file_vpe_binapi_init() }
1073 func file_vpe_binapi_init() {
1074 api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_2457116d")
1075 api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
1076 api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
1077 api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
1078 api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
1079 api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
1080 api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
1081 api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
1082 api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
1083 api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
1084 api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
1085 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
1086 api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_2457116d")
1087 api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
1088 api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
1089 api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
1090 api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_f1984c64")
1091 api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
1092 api.RegisterMessage((*LogDetails)(nil), "log_details_255827a1")
1093 api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
1094 api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
1095 api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_efd78e83")
1096 api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
1097 api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
1098 api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
1099 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
1102 // Messages returns list of all messages in this module.
1103 func AllMessages() []api.Message {
1104 return []api.Message{
1105 (*AddNodeNext)(nil),
1106 (*AddNodeNextReply)(nil),
1109 (*CliInbandReply)(nil),
1111 (*ControlPing)(nil),
1112 (*ControlPingReply)(nil),
1113 (*GetF64EndianValue)(nil),
1114 (*GetF64EndianValueReply)(nil),
1115 (*GetF64IncrementByOne)(nil),
1116 (*GetF64IncrementByOneReply)(nil),
1117 (*GetNextIndex)(nil),
1118 (*GetNextIndexReply)(nil),
1119 (*GetNodeGraph)(nil),
1120 (*GetNodeGraphReply)(nil),
1121 (*GetNodeIndex)(nil),
1122 (*GetNodeIndexReply)(nil),
1125 (*ShowThreads)(nil),
1126 (*ShowThreadsReply)(nil),
1127 (*ShowVersion)(nil),
1128 (*ShowVersionReply)(nil),
1129 (*ShowVpeSystemTime)(nil),
1130 (*ShowVpeSystemTimeReply)(nil),