github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.4.0-dev 4 // VPP: 23.02-rc0~189-g57127b32a 5 // source: /usr/share/vpp/api/plugins/crypto_sw_scheduler.api.json 6 7 // Package crypto_sw_scheduler contains generated bindings for API file crypto_sw_scheduler.api. 8 // 9 // Contents: 10 // 2 messages 11 // 12 package crypto_sw_scheduler 13 14 import ( 15 api "git.fd.io/govpp.git/api" 16 codec "git.fd.io/govpp.git/codec" 17 ) 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the GoVPP api package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // GoVPP api package needs to be updated. 23 const _ = api.GoVppAPIPackageIsVersion2 24 25 const ( 26 APIFile = "crypto_sw_scheduler" 27 APIVersion = "0.1.0" 28 VersionCrc = 0xf4b02951 29 ) 30 31 // CryptoSwSchedulerSetWorker defines message 'crypto_sw_scheduler_set_worker'. 32 // InProgress: the message form may change in the future versions 33 type CryptoSwSchedulerSetWorker struct { 34 WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` 35 CryptoEnable bool `binapi:"bool,name=crypto_enable" json:"crypto_enable,omitempty"` 36 } 37 38 func (m *CryptoSwSchedulerSetWorker) Reset() { *m = CryptoSwSchedulerSetWorker{} } 39 func (*CryptoSwSchedulerSetWorker) GetMessageName() string { return "crypto_sw_scheduler_set_worker" } 40 func (*CryptoSwSchedulerSetWorker) GetCrcString() string { return "b4274502" } 41 func (*CryptoSwSchedulerSetWorker) GetMessageType() api.MessageType { 42 return api.RequestMessage 43 } 44 45 func (m *CryptoSwSchedulerSetWorker) Size() (size int) { 46 if m == nil { 47 return 0 48 } 49 size += 4 // m.WorkerIndex 50 size += 1 // m.CryptoEnable 51 return size 52 } 53 func (m *CryptoSwSchedulerSetWorker) Marshal(b []byte) ([]byte, error) { 54 if b == nil { 55 b = make([]byte, m.Size()) 56 } 57 buf := codec.NewBuffer(b) 58 buf.EncodeUint32(m.WorkerIndex) 59 buf.EncodeBool(m.CryptoEnable) 60 return buf.Bytes(), nil 61 } 62 func (m *CryptoSwSchedulerSetWorker) Unmarshal(b []byte) error { 63 buf := codec.NewBuffer(b) 64 m.WorkerIndex = buf.DecodeUint32() 65 m.CryptoEnable = buf.DecodeBool() 66 return nil 67 } 68 69 // CryptoSwSchedulerSetWorkerReply defines message 'crypto_sw_scheduler_set_worker_reply'. 70 // InProgress: the message form may change in the future versions 71 type CryptoSwSchedulerSetWorkerReply struct { 72 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 73 } 74 75 func (m *CryptoSwSchedulerSetWorkerReply) Reset() { *m = CryptoSwSchedulerSetWorkerReply{} } 76 func (*CryptoSwSchedulerSetWorkerReply) GetMessageName() string { 77 return "crypto_sw_scheduler_set_worker_reply" 78 } 79 func (*CryptoSwSchedulerSetWorkerReply) GetCrcString() string { return "e8d4e804" } 80 func (*CryptoSwSchedulerSetWorkerReply) GetMessageType() api.MessageType { 81 return api.ReplyMessage 82 } 83 84 func (m *CryptoSwSchedulerSetWorkerReply) Size() (size int) { 85 if m == nil { 86 return 0 87 } 88 size += 4 // m.Retval 89 return size 90 } 91 func (m *CryptoSwSchedulerSetWorkerReply) Marshal(b []byte) ([]byte, error) { 92 if b == nil { 93 b = make([]byte, m.Size()) 94 } 95 buf := codec.NewBuffer(b) 96 buf.EncodeInt32(m.Retval) 97 return buf.Bytes(), nil 98 } 99 func (m *CryptoSwSchedulerSetWorkerReply) Unmarshal(b []byte) error { 100 buf := codec.NewBuffer(b) 101 m.Retval = buf.DecodeInt32() 102 return nil 103 } 104 105 func init() { file_crypto_sw_scheduler_binapi_init() } 106 func file_crypto_sw_scheduler_binapi_init() { 107 api.RegisterMessage((*CryptoSwSchedulerSetWorker)(nil), "crypto_sw_scheduler_set_worker_b4274502") 108 api.RegisterMessage((*CryptoSwSchedulerSetWorkerReply)(nil), "crypto_sw_scheduler_set_worker_reply_e8d4e804") 109 } 110 111 // Messages returns list of all messages in this module. 112 func AllMessages() []api.Message { 113 return []api.Message{ 114 (*CryptoSwSchedulerSetWorker)(nil), 115 (*CryptoSwSchedulerSetWorkerReply)(nil), 116 } 117 }