1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/core/vpe.api.json
7 // Package vpe contains generated bindings for API file vpe.api.
18 api "git.fd.io/govpp.git/api"
19 codec "git.fd.io/govpp.git/codec"
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
32 VersionCrc = 0xc6c0bcf6
35 // LogLevel defines enum 'log_level'.
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
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",
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,
75 func (x LogLevel) String() string {
76 s, ok := LogLevel_name[uint32(x)]
80 return "LogLevel(" + strconv.Itoa(int(x)) + ")"
83 // Timedelta defines alias 'timedelta'.
84 type Timedelta float64
86 // Timestamp defines alias 'timestamp'.
87 type Timestamp float64
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"`
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"`
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"`
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
122 func (m *AddNodeNext) Size() (size int) {
126 size += 1 * 64 // m.NodeName
127 size += 1 * 64 // m.NextName
130 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
132 b = make([]byte, m.Size())
134 buf := codec.NewBuffer(b)
135 buf.EncodeBytes(m.NodeName, 64)
136 buf.EncodeBytes(m.NextName, 64)
137 return buf.Bytes(), nil
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)))
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"`
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
161 func (m *AddNodeNextReply) Size() (size int) {
165 size += 4 // m.Retval
166 size += 4 // m.NextIndex
169 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
171 b = make([]byte, m.Size())
173 buf := codec.NewBuffer(b)
174 buf.EncodeInt32(m.Retval)
175 buf.EncodeUint32(m.NextIndex)
176 return buf.Bytes(), nil
178 func (m *AddNodeNextReply) Unmarshal(b []byte) error {
179 buf := codec.NewBuffer(b)
180 m.Retval = buf.DecodeInt32()
181 m.NextIndex = buf.DecodeUint32()
185 // Cli defines message 'cli'.
187 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
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
197 func (m *Cli) Size() (size int) {
201 size += 8 // m.CmdInShmem
204 func (m *Cli) Marshal(b []byte) ([]byte, error) {
206 b = make([]byte, m.Size())
208 buf := codec.NewBuffer(b)
209 buf.EncodeUint64(m.CmdInShmem)
210 return buf.Bytes(), nil
212 func (m *Cli) Unmarshal(b []byte) error {
213 buf := codec.NewBuffer(b)
214 m.CmdInShmem = buf.DecodeUint64()
218 // CliInband defines message 'cli_inband'.
219 type CliInband struct {
220 Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
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
230 func (m *CliInband) Size() (size int) {
234 size += 4 + len(m.Cmd) // m.Cmd
237 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
239 b = make([]byte, m.Size())
241 buf := codec.NewBuffer(b)
242 buf.EncodeString(m.Cmd, 0)
243 return buf.Bytes(), nil
245 func (m *CliInband) Unmarshal(b []byte) error {
246 buf := codec.NewBuffer(b)
247 m.Cmd = buf.DecodeString(0)
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"`
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
264 func (m *CliInbandReply) Size() (size int) {
268 size += 4 // m.Retval
269 size += 4 + len(m.Reply) // m.Reply
272 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
274 b = make([]byte, m.Size())
276 buf := codec.NewBuffer(b)
277 buf.EncodeInt32(m.Retval)
278 buf.EncodeString(m.Reply, 0)
279 return buf.Bytes(), nil
281 func (m *CliInbandReply) Unmarshal(b []byte) error {
282 buf := codec.NewBuffer(b)
283 m.Retval = buf.DecodeInt32()
284 m.Reply = buf.DecodeString(0)
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"`
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
301 func (m *CliReply) Size() (size int) {
305 size += 4 // m.Retval
306 size += 8 // m.ReplyInShmem
309 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
311 b = make([]byte, m.Size())
313 buf := codec.NewBuffer(b)
314 buf.EncodeInt32(m.Retval)
315 buf.EncodeUint64(m.ReplyInShmem)
316 return buf.Bytes(), nil
318 func (m *CliReply) Unmarshal(b []byte) error {
319 buf := codec.NewBuffer(b)
320 m.Retval = buf.DecodeInt32()
321 m.ReplyInShmem = buf.DecodeUint64()
325 // ControlPing defines message 'control_ping'.
326 type ControlPing struct{}
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
335 func (m *ControlPing) Size() (size int) {
341 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
343 b = make([]byte, m.Size())
345 buf := codec.NewBuffer(b)
346 return buf.Bytes(), nil
348 func (m *ControlPing) Unmarshal(b []byte) error {
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"`
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
366 func (m *ControlPingReply) Size() (size int) {
370 size += 4 // m.Retval
371 size += 4 // m.ClientIndex
372 size += 4 // m.VpePID
375 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
377 b = make([]byte, m.Size())
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
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()
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"`
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
405 func (m *GetF64EndianValue) Size() (size int) {
409 size += 8 // m.F64One
412 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
414 b = make([]byte, m.Size())
416 buf := codec.NewBuffer(b)
417 buf.EncodeFloat64(m.F64One)
418 return buf.Bytes(), nil
420 func (m *GetF64EndianValue) Unmarshal(b []byte) error {
421 buf := codec.NewBuffer(b)
422 m.F64One = buf.DecodeFloat64()
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"`
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
439 func (m *GetF64EndianValueReply) Size() (size int) {
443 size += 4 // m.Retval
444 size += 8 // m.F64OneResult
447 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
449 b = make([]byte, m.Size())
451 buf := codec.NewBuffer(b)
452 buf.EncodeUint32(m.Retval)
453 buf.EncodeFloat64(m.F64OneResult)
454 return buf.Bytes(), nil
456 func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
457 buf := codec.NewBuffer(b)
458 m.Retval = buf.DecodeUint32()
459 m.F64OneResult = buf.DecodeFloat64()
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"`
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
475 func (m *GetF64IncrementByOne) Size() (size int) {
479 size += 8 // m.F64Value
482 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
484 b = make([]byte, m.Size())
486 buf := codec.NewBuffer(b)
487 buf.EncodeFloat64(m.F64Value)
488 return buf.Bytes(), nil
490 func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
491 buf := codec.NewBuffer(b)
492 m.F64Value = buf.DecodeFloat64()
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"`
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
509 func (m *GetF64IncrementByOneReply) Size() (size int) {
513 size += 4 // m.Retval
514 size += 8 // m.F64Value
517 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
519 b = make([]byte, m.Size())
521 buf := codec.NewBuffer(b)
522 buf.EncodeUint32(m.Retval)
523 buf.EncodeFloat64(m.F64Value)
524 return buf.Bytes(), nil
526 func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
527 buf := codec.NewBuffer(b)
528 m.Retval = buf.DecodeUint32()
529 m.F64Value = buf.DecodeFloat64()
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"`
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
546 func (m *GetNextIndex) Size() (size int) {
550 size += 1 * 64 // m.NodeName
551 size += 1 * 64 // m.NextName
554 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
556 b = make([]byte, m.Size())
558 buf := codec.NewBuffer(b)
559 buf.EncodeBytes(m.NodeName, 64)
560 buf.EncodeBytes(m.NextName, 64)
561 return buf.Bytes(), nil
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)))
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"`
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
585 func (m *GetNextIndexReply) Size() (size int) {
589 size += 4 // m.Retval
590 size += 4 // m.NextIndex
593 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
595 b = make([]byte, m.Size())
597 buf := codec.NewBuffer(b)
598 buf.EncodeInt32(m.Retval)
599 buf.EncodeUint32(m.NextIndex)
600 return buf.Bytes(), nil
602 func (m *GetNextIndexReply) Unmarshal(b []byte) error {
603 buf := codec.NewBuffer(b)
604 m.Retval = buf.DecodeInt32()
605 m.NextIndex = buf.DecodeUint32()
609 // GetNodeGraph defines message 'get_node_graph'.
610 type GetNodeGraph struct{}
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
619 func (m *GetNodeGraph) Size() (size int) {
625 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
627 b = make([]byte, m.Size())
629 buf := codec.NewBuffer(b)
630 return buf.Bytes(), nil
632 func (m *GetNodeGraph) Unmarshal(b []byte) error {
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"`
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
649 func (m *GetNodeGraphReply) Size() (size int) {
653 size += 4 // m.Retval
654 size += 8 // m.ReplyInShmem
657 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
659 b = make([]byte, m.Size())
661 buf := codec.NewBuffer(b)
662 buf.EncodeInt32(m.Retval)
663 buf.EncodeUint64(m.ReplyInShmem)
664 return buf.Bytes(), nil
666 func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
667 buf := codec.NewBuffer(b)
668 m.Retval = buf.DecodeInt32()
669 m.ReplyInShmem = buf.DecodeUint64()
673 // GetNodeIndex defines message 'get_node_index'.
674 type GetNodeIndex struct {
675 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
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
685 func (m *GetNodeIndex) Size() (size int) {
689 size += 1 * 64 // m.NodeName
692 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
694 b = make([]byte, m.Size())
696 buf := codec.NewBuffer(b)
697 buf.EncodeBytes(m.NodeName, 64)
698 return buf.Bytes(), nil
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)))
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"`
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
720 func (m *GetNodeIndexReply) Size() (size int) {
724 size += 4 // m.Retval
725 size += 4 // m.NodeIndex
728 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
730 b = make([]byte, m.Size())
732 buf := codec.NewBuffer(b)
733 buf.EncodeInt32(m.Retval)
734 buf.EncodeUint32(m.NodeIndex)
735 return buf.Bytes(), nil
737 func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
738 buf := codec.NewBuffer(b)
739 m.Retval = buf.DecodeInt32()
740 m.NodeIndex = buf.DecodeUint32()
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"`
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
759 func (m *LogDetails) Size() (size int) {
763 size += 8 // m.Timestamp
765 size += 32 // m.MsgClass
766 size += 256 // m.Message
769 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
771 b = make([]byte, m.Size())
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
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)
789 // LogDump defines message 'log_dump'.
790 type LogDump struct {
791 StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
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
801 func (m *LogDump) Size() (size int) {
805 size += 8 // m.StartTimestamp
808 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
810 b = make([]byte, m.Size())
812 buf := codec.NewBuffer(b)
813 buf.EncodeFloat64(float64(m.StartTimestamp))
814 return buf.Bytes(), nil
816 func (m *LogDump) Unmarshal(b []byte) error {
817 buf := codec.NewBuffer(b)
818 m.StartTimestamp = Timestamp(buf.DecodeFloat64())
822 // ShowThreads defines message 'show_threads'.
823 type ShowThreads struct{}
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
832 func (m *ShowThreads) Size() (size int) {
838 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
840 b = make([]byte, m.Size())
842 buf := codec.NewBuffer(b)
843 return buf.Bytes(), nil
845 func (m *ShowThreads) Unmarshal(b []byte) error {
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"`
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
863 func (m *ShowThreadsReply) Size() (size int) {
867 size += 4 // m.Retval
869 for j1 := 0; j1 < len(m.ThreadData); j1++ {
872 if j1 < len(m.ThreadData) {
873 s1 = m.ThreadData[j1]
876 size += 1 * 64 // s1.Name
877 size += 1 * 64 // s1.Type
879 size += 4 // s1.CPUID
881 size += 4 // s1.CPUSocket
885 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
887 b = make([]byte, m.Size())
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]
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)
905 return buf.Bytes(), nil
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()
926 // ShowVersion defines message 'show_version'.
927 type ShowVersion struct{}
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
936 func (m *ShowVersion) Size() (size int) {
942 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
944 b = make([]byte, m.Size())
946 buf := codec.NewBuffer(b)
947 return buf.Bytes(), nil
949 func (m *ShowVersion) Unmarshal(b []byte) error {
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"`
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
969 func (m *ShowVersionReply) Size() (size int) {
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
980 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
982 b = make([]byte, m.Size())
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
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)
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() (size int) {
1018 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1020 b = make([]byte, m.Size())
1022 buf := codec.NewBuffer(b)
1023 return buf.Bytes(), nil
1025 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
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"`
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
1042 func (m *ShowVpeSystemTimeReply) Size() (size int) {
1046 size += 4 // m.Retval
1047 size += 8 // m.VpeSystemTime
1050 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1052 b = make([]byte, m.Size())
1054 buf := codec.NewBuffer(b)
1055 buf.EncodeInt32(m.Retval)
1056 buf.EncodeFloat64(float64(m.VpeSystemTime))
1057 return buf.Bytes(), nil
1059 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
1060 buf := codec.NewBuffer(b)
1061 m.Retval = buf.DecodeInt32()
1062 m.VpeSystemTime = Timestamp(buf.DecodeFloat64())
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")
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),
1103 (*CliInbandReply)(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),
1119 (*ShowThreads)(nil),
1120 (*ShowThreadsReply)(nil),
1121 (*ShowVersion)(nil),
1122 (*ShowVersionReply)(nil),
1123 (*ShowVpeSystemTime)(nil),
1124 (*ShowVpeSystemTimeReply)(nil),