1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/vpe.api.json
7 // Package vpe contains generated bindings for API file vpe.api.
21 api "git.fd.io/govpp.git/api"
22 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
34 VersionCrc = 0xc6c0bcf6
37 // LogLevel defines enum 'log_level'.
41 VPE_API_LOG_LEVEL_EMERG LogLevel = 0
42 VPE_API_LOG_LEVEL_ALERT LogLevel = 1
43 VPE_API_LOG_LEVEL_CRIT LogLevel = 2
44 VPE_API_LOG_LEVEL_ERR LogLevel = 3
45 VPE_API_LOG_LEVEL_WARNING LogLevel = 4
46 VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
47 VPE_API_LOG_LEVEL_INFO LogLevel = 6
48 VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
49 VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
53 LogLevel_name = map[uint32]string{
54 0: "VPE_API_LOG_LEVEL_EMERG",
55 1: "VPE_API_LOG_LEVEL_ALERT",
56 2: "VPE_API_LOG_LEVEL_CRIT",
57 3: "VPE_API_LOG_LEVEL_ERR",
58 4: "VPE_API_LOG_LEVEL_WARNING",
59 5: "VPE_API_LOG_LEVEL_NOTICE",
60 6: "VPE_API_LOG_LEVEL_INFO",
61 7: "VPE_API_LOG_LEVEL_DEBUG",
62 8: "VPE_API_LOG_LEVEL_DISABLED",
64 LogLevel_value = map[string]uint32{
65 "VPE_API_LOG_LEVEL_EMERG": 0,
66 "VPE_API_LOG_LEVEL_ALERT": 1,
67 "VPE_API_LOG_LEVEL_CRIT": 2,
68 "VPE_API_LOG_LEVEL_ERR": 3,
69 "VPE_API_LOG_LEVEL_WARNING": 4,
70 "VPE_API_LOG_LEVEL_NOTICE": 5,
71 "VPE_API_LOG_LEVEL_INFO": 6,
72 "VPE_API_LOG_LEVEL_DEBUG": 7,
73 "VPE_API_LOG_LEVEL_DISABLED": 8,
77 func (x LogLevel) String() string {
78 s, ok := LogLevel_name[uint32(x)]
82 return "LogLevel(" + strconv.Itoa(int(x)) + ")"
85 // Timedelta defines alias 'timedelta'.
86 type Timedelta float64
88 // Timestamp defines alias 'timestamp'.
89 type Timestamp float64
91 func NewTimestamp(t time.Time) Timestamp {
92 sec := int64(t.Unix())
93 nsec := int32(t.Nanosecond())
94 ns := float64(sec) + float64(nsec/1e9)
98 func (x Timestamp) ToTime() time.Time {
102 return time.Unix(sec, nsec)
105 func (x Timestamp) String() string {
106 return x.ToTime().String()
109 func (x *Timestamp) MarshalText() ([]byte, error) {
110 return []byte(x.ToTime().Format(time.RFC3339Nano)), nil
113 func (x *Timestamp) UnmarshalText(text []byte) error {
114 t, err := time.Parse(time.RFC3339Nano, string(text))
122 // ThreadData defines type 'thread_data'.
123 type ThreadData struct {
124 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
125 Name []byte `binapi:"u8[64],name=name" json:"name,omitempty"`
126 Type []byte `binapi:"u8[64],name=type" json:"type,omitempty"`
127 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
128 CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
129 Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
130 CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
133 // Version defines type 'version'.
134 type Version struct {
135 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
136 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
137 Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
138 PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty"`
139 BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty"`
142 // AddNodeNext defines message 'add_node_next'.
143 type AddNodeNext struct {
144 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
145 NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty"`
148 func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
149 func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
150 func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" }
151 func (*AddNodeNext) GetMessageType() api.MessageType {
152 return api.RequestMessage
155 func (m *AddNodeNext) Size() (size int) {
159 size += 1 * 64 // m.NodeName
160 size += 1 * 64 // m.NextName
163 func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
165 b = make([]byte, m.Size())
167 buf := codec.NewBuffer(b)
168 buf.EncodeBytes(m.NodeName, 64)
169 buf.EncodeBytes(m.NextName, 64)
170 return buf.Bytes(), nil
172 func (m *AddNodeNext) Unmarshal(b []byte) error {
173 buf := codec.NewBuffer(b)
174 m.NodeName = make([]byte, 64)
175 copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
176 m.NextName = make([]byte, 64)
177 copy(m.NextName, buf.DecodeBytes(len(m.NextName)))
181 // AddNodeNextReply defines message 'add_node_next_reply'.
182 type AddNodeNextReply struct {
183 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
184 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
187 func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
188 func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
189 func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
190 func (*AddNodeNextReply) GetMessageType() api.MessageType {
191 return api.ReplyMessage
194 func (m *AddNodeNextReply) Size() (size int) {
198 size += 4 // m.Retval
199 size += 4 // m.NextIndex
202 func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 buf.EncodeInt32(m.Retval)
208 buf.EncodeUint32(m.NextIndex)
209 return buf.Bytes(), nil
211 func (m *AddNodeNextReply) Unmarshal(b []byte) error {
212 buf := codec.NewBuffer(b)
213 m.Retval = buf.DecodeInt32()
214 m.NextIndex = buf.DecodeUint32()
218 // Cli defines message 'cli'.
220 CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
223 func (m *Cli) Reset() { *m = Cli{} }
224 func (*Cli) GetMessageName() string { return "cli" }
225 func (*Cli) GetCrcString() string { return "23bfbfff" }
226 func (*Cli) GetMessageType() api.MessageType {
227 return api.RequestMessage
230 func (m *Cli) Size() (size int) {
234 size += 8 // m.CmdInShmem
237 func (m *Cli) Marshal(b []byte) ([]byte, error) {
239 b = make([]byte, m.Size())
241 buf := codec.NewBuffer(b)
242 buf.EncodeUint64(m.CmdInShmem)
243 return buf.Bytes(), nil
245 func (m *Cli) Unmarshal(b []byte) error {
246 buf := codec.NewBuffer(b)
247 m.CmdInShmem = buf.DecodeUint64()
251 // CliInband defines message 'cli_inband'.
252 type CliInband struct {
253 Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
256 func (m *CliInband) Reset() { *m = CliInband{} }
257 func (*CliInband) GetMessageName() string { return "cli_inband" }
258 func (*CliInband) GetCrcString() string { return "f8377302" }
259 func (*CliInband) GetMessageType() api.MessageType {
260 return api.RequestMessage
263 func (m *CliInband) Size() (size int) {
267 size += 4 + len(m.Cmd) // m.Cmd
270 func (m *CliInband) Marshal(b []byte) ([]byte, error) {
272 b = make([]byte, m.Size())
274 buf := codec.NewBuffer(b)
275 buf.EncodeString(m.Cmd, 0)
276 return buf.Bytes(), nil
278 func (m *CliInband) Unmarshal(b []byte) error {
279 buf := codec.NewBuffer(b)
280 m.Cmd = buf.DecodeString(0)
284 // CliInbandReply defines message 'cli_inband_reply'.
285 type CliInbandReply struct {
286 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
287 Reply string `binapi:"string[],name=reply" json:"reply,omitempty"`
290 func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
291 func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
292 func (*CliInbandReply) GetCrcString() string { return "05879051" }
293 func (*CliInbandReply) GetMessageType() api.MessageType {
294 return api.ReplyMessage
297 func (m *CliInbandReply) Size() (size int) {
301 size += 4 // m.Retval
302 size += 4 + len(m.Reply) // m.Reply
305 func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
307 b = make([]byte, m.Size())
309 buf := codec.NewBuffer(b)
310 buf.EncodeInt32(m.Retval)
311 buf.EncodeString(m.Reply, 0)
312 return buf.Bytes(), nil
314 func (m *CliInbandReply) Unmarshal(b []byte) error {
315 buf := codec.NewBuffer(b)
316 m.Retval = buf.DecodeInt32()
317 m.Reply = buf.DecodeString(0)
321 // CliReply defines message 'cli_reply'.
322 type CliReply struct {
323 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
324 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
327 func (m *CliReply) Reset() { *m = CliReply{} }
328 func (*CliReply) GetMessageName() string { return "cli_reply" }
329 func (*CliReply) GetCrcString() string { return "06d68297" }
330 func (*CliReply) GetMessageType() api.MessageType {
331 return api.ReplyMessage
334 func (m *CliReply) Size() (size int) {
338 size += 4 // m.Retval
339 size += 8 // m.ReplyInShmem
342 func (m *CliReply) Marshal(b []byte) ([]byte, error) {
344 b = make([]byte, m.Size())
346 buf := codec.NewBuffer(b)
347 buf.EncodeInt32(m.Retval)
348 buf.EncodeUint64(m.ReplyInShmem)
349 return buf.Bytes(), nil
351 func (m *CliReply) Unmarshal(b []byte) error {
352 buf := codec.NewBuffer(b)
353 m.Retval = buf.DecodeInt32()
354 m.ReplyInShmem = buf.DecodeUint64()
358 // ControlPing defines message 'control_ping'.
359 type ControlPing struct{}
361 func (m *ControlPing) Reset() { *m = ControlPing{} }
362 func (*ControlPing) GetMessageName() string { return "control_ping" }
363 func (*ControlPing) GetCrcString() string { return "51077d14" }
364 func (*ControlPing) GetMessageType() api.MessageType {
365 return api.RequestMessage
368 func (m *ControlPing) Size() (size int) {
374 func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
376 b = make([]byte, m.Size())
378 buf := codec.NewBuffer(b)
379 return buf.Bytes(), nil
381 func (m *ControlPing) Unmarshal(b []byte) error {
385 // ControlPingReply defines message 'control_ping_reply'.
386 type ControlPingReply struct {
387 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
388 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
389 VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
392 func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
393 func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
394 func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
395 func (*ControlPingReply) GetMessageType() api.MessageType {
396 return api.ReplyMessage
399 func (m *ControlPingReply) Size() (size int) {
403 size += 4 // m.Retval
404 size += 4 // m.ClientIndex
405 size += 4 // m.VpePID
408 func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
410 b = make([]byte, m.Size())
412 buf := codec.NewBuffer(b)
413 buf.EncodeInt32(m.Retval)
414 buf.EncodeUint32(m.ClientIndex)
415 buf.EncodeUint32(m.VpePID)
416 return buf.Bytes(), nil
418 func (m *ControlPingReply) Unmarshal(b []byte) error {
419 buf := codec.NewBuffer(b)
420 m.Retval = buf.DecodeInt32()
421 m.ClientIndex = buf.DecodeUint32()
422 m.VpePID = buf.DecodeUint32()
426 // GetF64EndianValue defines message 'get_f64_endian_value'.
427 type GetF64EndianValue struct {
428 F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
431 func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
432 func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
433 func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
434 func (*GetF64EndianValue) GetMessageType() api.MessageType {
435 return api.RequestMessage
438 func (m *GetF64EndianValue) Size() (size int) {
442 size += 8 // m.F64One
445 func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
447 b = make([]byte, m.Size())
449 buf := codec.NewBuffer(b)
450 buf.EncodeFloat64(m.F64One)
451 return buf.Bytes(), nil
453 func (m *GetF64EndianValue) Unmarshal(b []byte) error {
454 buf := codec.NewBuffer(b)
455 m.F64One = buf.DecodeFloat64()
459 // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
460 type GetF64EndianValueReply struct {
461 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
462 F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
465 func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
466 func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
467 func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
468 func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
469 return api.ReplyMessage
472 func (m *GetF64EndianValueReply) Size() (size int) {
476 size += 4 // m.Retval
477 size += 8 // m.F64OneResult
480 func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
482 b = make([]byte, m.Size())
484 buf := codec.NewBuffer(b)
485 buf.EncodeUint32(m.Retval)
486 buf.EncodeFloat64(m.F64OneResult)
487 return buf.Bytes(), nil
489 func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
490 buf := codec.NewBuffer(b)
491 m.Retval = buf.DecodeUint32()
492 m.F64OneResult = buf.DecodeFloat64()
496 // GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
497 type GetF64IncrementByOne struct {
498 F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
501 func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
502 func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
503 func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
504 func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
505 return api.RequestMessage
508 func (m *GetF64IncrementByOne) Size() (size int) {
512 size += 8 // m.F64Value
515 func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
517 b = make([]byte, m.Size())
519 buf := codec.NewBuffer(b)
520 buf.EncodeFloat64(m.F64Value)
521 return buf.Bytes(), nil
523 func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
524 buf := codec.NewBuffer(b)
525 m.F64Value = buf.DecodeFloat64()
529 // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
530 type GetF64IncrementByOneReply struct {
531 Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
532 F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
535 func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
536 func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
537 func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
538 func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
539 return api.ReplyMessage
542 func (m *GetF64IncrementByOneReply) Size() (size int) {
546 size += 4 // m.Retval
547 size += 8 // m.F64Value
550 func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
552 b = make([]byte, m.Size())
554 buf := codec.NewBuffer(b)
555 buf.EncodeUint32(m.Retval)
556 buf.EncodeFloat64(m.F64Value)
557 return buf.Bytes(), nil
559 func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
560 buf := codec.NewBuffer(b)
561 m.Retval = buf.DecodeUint32()
562 m.F64Value = buf.DecodeFloat64()
566 // GetNextIndex defines message 'get_next_index'.
567 type GetNextIndex struct {
568 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
569 NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty"`
572 func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
573 func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
574 func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" }
575 func (*GetNextIndex) GetMessageType() api.MessageType {
576 return api.RequestMessage
579 func (m *GetNextIndex) Size() (size int) {
583 size += 1 * 64 // m.NodeName
584 size += 1 * 64 // m.NextName
587 func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
589 b = make([]byte, m.Size())
591 buf := codec.NewBuffer(b)
592 buf.EncodeBytes(m.NodeName, 64)
593 buf.EncodeBytes(m.NextName, 64)
594 return buf.Bytes(), nil
596 func (m *GetNextIndex) Unmarshal(b []byte) error {
597 buf := codec.NewBuffer(b)
598 m.NodeName = make([]byte, 64)
599 copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
600 m.NextName = make([]byte, 64)
601 copy(m.NextName, buf.DecodeBytes(len(m.NextName)))
605 // GetNextIndexReply defines message 'get_next_index_reply'.
606 type GetNextIndexReply struct {
607 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
608 NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
611 func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
612 func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
613 func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
614 func (*GetNextIndexReply) GetMessageType() api.MessageType {
615 return api.ReplyMessage
618 func (m *GetNextIndexReply) Size() (size int) {
622 size += 4 // m.Retval
623 size += 4 // m.NextIndex
626 func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
628 b = make([]byte, m.Size())
630 buf := codec.NewBuffer(b)
631 buf.EncodeInt32(m.Retval)
632 buf.EncodeUint32(m.NextIndex)
633 return buf.Bytes(), nil
635 func (m *GetNextIndexReply) Unmarshal(b []byte) error {
636 buf := codec.NewBuffer(b)
637 m.Retval = buf.DecodeInt32()
638 m.NextIndex = buf.DecodeUint32()
642 // GetNodeGraph defines message 'get_node_graph'.
643 type GetNodeGraph struct{}
645 func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
646 func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
647 func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
648 func (*GetNodeGraph) GetMessageType() api.MessageType {
649 return api.RequestMessage
652 func (m *GetNodeGraph) Size() (size int) {
658 func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
660 b = make([]byte, m.Size())
662 buf := codec.NewBuffer(b)
663 return buf.Bytes(), nil
665 func (m *GetNodeGraph) Unmarshal(b []byte) error {
669 // GetNodeGraphReply defines message 'get_node_graph_reply'.
670 type GetNodeGraphReply struct {
671 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
672 ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
675 func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
676 func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
677 func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
678 func (*GetNodeGraphReply) GetMessageType() api.MessageType {
679 return api.ReplyMessage
682 func (m *GetNodeGraphReply) Size() (size int) {
686 size += 4 // m.Retval
687 size += 8 // m.ReplyInShmem
690 func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
692 b = make([]byte, m.Size())
694 buf := codec.NewBuffer(b)
695 buf.EncodeInt32(m.Retval)
696 buf.EncodeUint64(m.ReplyInShmem)
697 return buf.Bytes(), nil
699 func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
700 buf := codec.NewBuffer(b)
701 m.Retval = buf.DecodeInt32()
702 m.ReplyInShmem = buf.DecodeUint64()
706 // GetNodeIndex defines message 'get_node_index'.
707 type GetNodeIndex struct {
708 NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
711 func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
712 func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
713 func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" }
714 func (*GetNodeIndex) GetMessageType() api.MessageType {
715 return api.RequestMessage
718 func (m *GetNodeIndex) Size() (size int) {
722 size += 1 * 64 // m.NodeName
725 func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
727 b = make([]byte, m.Size())
729 buf := codec.NewBuffer(b)
730 buf.EncodeBytes(m.NodeName, 64)
731 return buf.Bytes(), nil
733 func (m *GetNodeIndex) Unmarshal(b []byte) error {
734 buf := codec.NewBuffer(b)
735 m.NodeName = make([]byte, 64)
736 copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
740 // GetNodeIndexReply defines message 'get_node_index_reply'.
741 type GetNodeIndexReply struct {
742 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
743 NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
746 func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
747 func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
748 func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
749 func (*GetNodeIndexReply) GetMessageType() api.MessageType {
750 return api.ReplyMessage
753 func (m *GetNodeIndexReply) Size() (size int) {
757 size += 4 // m.Retval
758 size += 4 // m.NodeIndex
761 func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
763 b = make([]byte, m.Size())
765 buf := codec.NewBuffer(b)
766 buf.EncodeInt32(m.Retval)
767 buf.EncodeUint32(m.NodeIndex)
768 return buf.Bytes(), nil
770 func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
771 buf := codec.NewBuffer(b)
772 m.Retval = buf.DecodeInt32()
773 m.NodeIndex = buf.DecodeUint32()
777 // LogDetails defines message 'log_details'.
778 type LogDetails struct {
779 Timestamp Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
780 Level LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
781 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
782 Message string `binapi:"string[256],name=message" json:"message,omitempty"`
785 func (m *LogDetails) Reset() { *m = LogDetails{} }
786 func (*LogDetails) GetMessageName() string { return "log_details" }
787 func (*LogDetails) GetCrcString() string { return "255827a1" }
788 func (*LogDetails) GetMessageType() api.MessageType {
789 return api.ReplyMessage
792 func (m *LogDetails) Size() (size int) {
796 size += 8 // m.Timestamp
798 size += 32 // m.MsgClass
799 size += 256 // m.Message
802 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
804 b = make([]byte, m.Size())
806 buf := codec.NewBuffer(b)
807 buf.EncodeFloat64(float64(m.Timestamp))
808 buf.EncodeUint32(uint32(m.Level))
809 buf.EncodeString(m.MsgClass, 32)
810 buf.EncodeString(m.Message, 256)
811 return buf.Bytes(), nil
813 func (m *LogDetails) Unmarshal(b []byte) error {
814 buf := codec.NewBuffer(b)
815 m.Timestamp = Timestamp(buf.DecodeFloat64())
816 m.Level = LogLevel(buf.DecodeUint32())
817 m.MsgClass = buf.DecodeString(32)
818 m.Message = buf.DecodeString(256)
822 // LogDump defines message 'log_dump'.
823 type LogDump struct {
824 StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
827 func (m *LogDump) Reset() { *m = LogDump{} }
828 func (*LogDump) GetMessageName() string { return "log_dump" }
829 func (*LogDump) GetCrcString() string { return "6ab31753" }
830 func (*LogDump) GetMessageType() api.MessageType {
831 return api.RequestMessage
834 func (m *LogDump) Size() (size int) {
838 size += 8 // m.StartTimestamp
841 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
843 b = make([]byte, m.Size())
845 buf := codec.NewBuffer(b)
846 buf.EncodeFloat64(float64(m.StartTimestamp))
847 return buf.Bytes(), nil
849 func (m *LogDump) Unmarshal(b []byte) error {
850 buf := codec.NewBuffer(b)
851 m.StartTimestamp = Timestamp(buf.DecodeFloat64())
855 // ShowThreads defines message 'show_threads'.
856 type ShowThreads struct{}
858 func (m *ShowThreads) Reset() { *m = ShowThreads{} }
859 func (*ShowThreads) GetMessageName() string { return "show_threads" }
860 func (*ShowThreads) GetCrcString() string { return "51077d14" }
861 func (*ShowThreads) GetMessageType() api.MessageType {
862 return api.RequestMessage
865 func (m *ShowThreads) Size() (size int) {
871 func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
873 b = make([]byte, m.Size())
875 buf := codec.NewBuffer(b)
876 return buf.Bytes(), nil
878 func (m *ShowThreads) Unmarshal(b []byte) error {
882 // ShowThreadsReply defines message 'show_threads_reply'.
883 type ShowThreadsReply struct {
884 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
885 Count uint32 `binapi:"u32,name=count" json:"-"`
886 ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
889 func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
890 func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
891 func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" }
892 func (*ShowThreadsReply) GetMessageType() api.MessageType {
893 return api.ReplyMessage
896 func (m *ShowThreadsReply) Size() (size int) {
900 size += 4 // m.Retval
902 for j1 := 0; j1 < len(m.ThreadData); j1++ {
905 if j1 < len(m.ThreadData) {
906 s1 = m.ThreadData[j1]
909 size += 1 * 64 // s1.Name
910 size += 1 * 64 // s1.Type
912 size += 4 // s1.CPUID
914 size += 4 // s1.CPUSocket
918 func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
920 b = make([]byte, m.Size())
922 buf := codec.NewBuffer(b)
923 buf.EncodeInt32(m.Retval)
924 buf.EncodeUint32(uint32(len(m.ThreadData)))
925 for j0 := 0; j0 < len(m.ThreadData); j0++ {
926 var v0 ThreadData // ThreadData
927 if j0 < len(m.ThreadData) {
928 v0 = m.ThreadData[j0]
930 buf.EncodeUint32(v0.ID)
931 buf.EncodeBytes(v0.Name, 64)
932 buf.EncodeBytes(v0.Type, 64)
933 buf.EncodeUint32(v0.PID)
934 buf.EncodeUint32(v0.CPUID)
935 buf.EncodeUint32(v0.Core)
936 buf.EncodeUint32(v0.CPUSocket)
938 return buf.Bytes(), nil
940 func (m *ShowThreadsReply) Unmarshal(b []byte) error {
941 buf := codec.NewBuffer(b)
942 m.Retval = buf.DecodeInt32()
943 m.Count = buf.DecodeUint32()
944 m.ThreadData = make([]ThreadData, m.Count)
945 for j0 := 0; j0 < len(m.ThreadData); j0++ {
946 m.ThreadData[j0].ID = buf.DecodeUint32()
947 m.ThreadData[j0].Name = make([]byte, 64)
948 copy(m.ThreadData[j0].Name, buf.DecodeBytes(len(m.ThreadData[j0].Name)))
949 m.ThreadData[j0].Type = make([]byte, 64)
950 copy(m.ThreadData[j0].Type, buf.DecodeBytes(len(m.ThreadData[j0].Type)))
951 m.ThreadData[j0].PID = buf.DecodeUint32()
952 m.ThreadData[j0].CPUID = buf.DecodeUint32()
953 m.ThreadData[j0].Core = buf.DecodeUint32()
954 m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
959 // ShowVersion defines message 'show_version'.
960 type ShowVersion struct{}
962 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
963 func (*ShowVersion) GetMessageName() string { return "show_version" }
964 func (*ShowVersion) GetCrcString() string { return "51077d14" }
965 func (*ShowVersion) GetMessageType() api.MessageType {
966 return api.RequestMessage
969 func (m *ShowVersion) Size() (size int) {
975 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
977 b = make([]byte, m.Size())
979 buf := codec.NewBuffer(b)
980 return buf.Bytes(), nil
982 func (m *ShowVersion) Unmarshal(b []byte) error {
986 // ShowVersionReply defines message 'show_version_reply'.
987 type ShowVersionReply struct {
988 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
989 Program string `binapi:"string[32],name=program" json:"program,omitempty"`
990 Version string `binapi:"string[32],name=version" json:"version,omitempty"`
991 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
992 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
995 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
996 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
997 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
998 func (*ShowVersionReply) GetMessageType() api.MessageType {
999 return api.ReplyMessage
1002 func (m *ShowVersionReply) Size() (size int) {
1006 size += 4 // m.Retval
1007 size += 32 // m.Program
1008 size += 32 // m.Version
1009 size += 32 // m.BuildDate
1010 size += 256 // m.BuildDirectory
1013 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
1015 b = make([]byte, m.Size())
1017 buf := codec.NewBuffer(b)
1018 buf.EncodeInt32(m.Retval)
1019 buf.EncodeString(m.Program, 32)
1020 buf.EncodeString(m.Version, 32)
1021 buf.EncodeString(m.BuildDate, 32)
1022 buf.EncodeString(m.BuildDirectory, 256)
1023 return buf.Bytes(), nil
1025 func (m *ShowVersionReply) Unmarshal(b []byte) error {
1026 buf := codec.NewBuffer(b)
1027 m.Retval = buf.DecodeInt32()
1028 m.Program = buf.DecodeString(32)
1029 m.Version = buf.DecodeString(32)
1030 m.BuildDate = buf.DecodeString(32)
1031 m.BuildDirectory = buf.DecodeString(256)
1035 // ShowVpeSystemTime defines message 'show_vpe_system_time'.
1036 type ShowVpeSystemTime struct{}
1038 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
1039 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
1040 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
1041 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
1042 return api.RequestMessage
1045 func (m *ShowVpeSystemTime) Size() (size int) {
1051 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
1053 b = make([]byte, m.Size())
1055 buf := codec.NewBuffer(b)
1056 return buf.Bytes(), nil
1058 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
1062 // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
1063 type ShowVpeSystemTimeReply struct {
1064 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1065 VpeSystemTime Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
1068 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
1069 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
1070 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
1071 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
1072 return api.ReplyMessage
1075 func (m *ShowVpeSystemTimeReply) Size() (size int) {
1079 size += 4 // m.Retval
1080 size += 8 // m.VpeSystemTime
1083 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
1085 b = make([]byte, m.Size())
1087 buf := codec.NewBuffer(b)
1088 buf.EncodeInt32(m.Retval)
1089 buf.EncodeFloat64(float64(m.VpeSystemTime))
1090 return buf.Bytes(), nil
1092 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
1093 buf := codec.NewBuffer(b)
1094 m.Retval = buf.DecodeInt32()
1095 m.VpeSystemTime = Timestamp(buf.DecodeFloat64())
1099 func init() { file_vpe_binapi_init() }
1100 func file_vpe_binapi_init() {
1101 api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_9ab92f7a")
1102 api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
1103 api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
1104 api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
1105 api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
1106 api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
1107 api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
1108 api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
1109 api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
1110 api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
1111 api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
1112 api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
1113 api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_9ab92f7a")
1114 api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
1115 api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
1116 api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
1117 api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_6c9a495d")
1118 api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
1119 api.RegisterMessage((*LogDetails)(nil), "log_details_255827a1")
1120 api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
1121 api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
1122 api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_f5e0b66f")
1123 api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
1124 api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
1125 api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
1126 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
1129 // Messages returns list of all messages in this module.
1130 func AllMessages() []api.Message {
1131 return []api.Message{
1132 (*AddNodeNext)(nil),
1133 (*AddNodeNextReply)(nil),
1136 (*CliInbandReply)(nil),
1138 (*ControlPing)(nil),
1139 (*ControlPingReply)(nil),
1140 (*GetF64EndianValue)(nil),
1141 (*GetF64EndianValueReply)(nil),
1142 (*GetF64IncrementByOne)(nil),
1143 (*GetF64IncrementByOneReply)(nil),
1144 (*GetNextIndex)(nil),
1145 (*GetNextIndexReply)(nil),
1146 (*GetNodeGraph)(nil),
1147 (*GetNodeGraphReply)(nil),
1148 (*GetNodeIndex)(nil),
1149 (*GetNodeIndexReply)(nil),
1152 (*ShowThreads)(nil),
1153 (*ShowThreadsReply)(nil),
1154 (*ShowVersion)(nil),
1155 (*ShowVersionReply)(nil),
1156 (*ShowVpeSystemTime)(nil),
1157 (*ShowVpeSystemTimeReply)(nil),