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