1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
5 // source: /usr/share/vpp/api/core/vpe.api.json
7 // Package vpe contains generated bindings for API file vpe.api.
15 api "git.fd.io/govpp.git/api"
16 vpe_types "git.fd.io/govpp.git/binapi/vpe_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0xbbfa7484
32 // LogDetails defines message 'log_details'.
33 type LogDetails struct {
34 Timestamp vpe_types.Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
35 Level vpe_types.LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
36 MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
37 Message string `binapi:"string[256],name=message" json:"message,omitempty"`
40 func (m *LogDetails) Reset() { *m = LogDetails{} }
41 func (*LogDetails) GetMessageName() string { return "log_details" }
42 func (*LogDetails) GetCrcString() string { return "03d61cc0" }
43 func (*LogDetails) GetMessageType() api.MessageType {
44 return api.ReplyMessage
47 func (m *LogDetails) Size() (size int) {
51 size += 8 // m.Timestamp
53 size += 32 // m.MsgClass
54 size += 256 // m.Message
57 func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
59 b = make([]byte, m.Size())
61 buf := codec.NewBuffer(b)
62 buf.EncodeFloat64(float64(m.Timestamp))
63 buf.EncodeUint32(uint32(m.Level))
64 buf.EncodeString(m.MsgClass, 32)
65 buf.EncodeString(m.Message, 256)
66 return buf.Bytes(), nil
68 func (m *LogDetails) Unmarshal(b []byte) error {
69 buf := codec.NewBuffer(b)
70 m.Timestamp = vpe_types.Timestamp(buf.DecodeFloat64())
71 m.Level = vpe_types.LogLevel(buf.DecodeUint32())
72 m.MsgClass = buf.DecodeString(32)
73 m.Message = buf.DecodeString(256)
77 // LogDump defines message 'log_dump'.
79 StartTimestamp vpe_types.Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
82 func (m *LogDump) Reset() { *m = LogDump{} }
83 func (*LogDump) GetMessageName() string { return "log_dump" }
84 func (*LogDump) GetCrcString() string { return "6ab31753" }
85 func (*LogDump) GetMessageType() api.MessageType {
86 return api.RequestMessage
89 func (m *LogDump) Size() (size int) {
93 size += 8 // m.StartTimestamp
96 func (m *LogDump) Marshal(b []byte) ([]byte, error) {
98 b = make([]byte, m.Size())
100 buf := codec.NewBuffer(b)
101 buf.EncodeFloat64(float64(m.StartTimestamp))
102 return buf.Bytes(), nil
104 func (m *LogDump) Unmarshal(b []byte) error {
105 buf := codec.NewBuffer(b)
106 m.StartTimestamp = vpe_types.Timestamp(buf.DecodeFloat64())
110 // ShowVersion defines message 'show_version'.
111 type ShowVersion struct{}
113 func (m *ShowVersion) Reset() { *m = ShowVersion{} }
114 func (*ShowVersion) GetMessageName() string { return "show_version" }
115 func (*ShowVersion) GetCrcString() string { return "51077d14" }
116 func (*ShowVersion) GetMessageType() api.MessageType {
117 return api.RequestMessage
120 func (m *ShowVersion) Size() (size int) {
126 func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
128 b = make([]byte, m.Size())
130 buf := codec.NewBuffer(b)
131 return buf.Bytes(), nil
133 func (m *ShowVersion) Unmarshal(b []byte) error {
137 // ShowVersionReply defines message 'show_version_reply'.
138 type ShowVersionReply struct {
139 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
140 Program string `binapi:"string[32],name=program" json:"program,omitempty"`
141 Version string `binapi:"string[32],name=version" json:"version,omitempty"`
142 BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
143 BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
146 func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
147 func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
148 func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
149 func (*ShowVersionReply) GetMessageType() api.MessageType {
150 return api.ReplyMessage
153 func (m *ShowVersionReply) Size() (size int) {
157 size += 4 // m.Retval
158 size += 32 // m.Program
159 size += 32 // m.Version
160 size += 32 // m.BuildDate
161 size += 256 // m.BuildDirectory
164 func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
166 b = make([]byte, m.Size())
168 buf := codec.NewBuffer(b)
169 buf.EncodeInt32(m.Retval)
170 buf.EncodeString(m.Program, 32)
171 buf.EncodeString(m.Version, 32)
172 buf.EncodeString(m.BuildDate, 32)
173 buf.EncodeString(m.BuildDirectory, 256)
174 return buf.Bytes(), nil
176 func (m *ShowVersionReply) Unmarshal(b []byte) error {
177 buf := codec.NewBuffer(b)
178 m.Retval = buf.DecodeInt32()
179 m.Program = buf.DecodeString(32)
180 m.Version = buf.DecodeString(32)
181 m.BuildDate = buf.DecodeString(32)
182 m.BuildDirectory = buf.DecodeString(256)
186 // ShowVpeSystemTime defines message 'show_vpe_system_time'.
187 type ShowVpeSystemTime struct{}
189 func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
190 func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
191 func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
192 func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
193 return api.RequestMessage
196 func (m *ShowVpeSystemTime) Size() (size int) {
202 func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 return buf.Bytes(), nil
209 func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
213 // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
214 type ShowVpeSystemTimeReply struct {
215 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
216 VpeSystemTime vpe_types.Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
219 func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
220 func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
221 func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
222 func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
223 return api.ReplyMessage
226 func (m *ShowVpeSystemTimeReply) Size() (size int) {
230 size += 4 // m.Retval
231 size += 8 // m.VpeSystemTime
234 func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
236 b = make([]byte, m.Size())
238 buf := codec.NewBuffer(b)
239 buf.EncodeInt32(m.Retval)
240 buf.EncodeFloat64(float64(m.VpeSystemTime))
241 return buf.Bytes(), nil
243 func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
244 buf := codec.NewBuffer(b)
245 m.Retval = buf.DecodeInt32()
246 m.VpeSystemTime = vpe_types.Timestamp(buf.DecodeFloat64())
250 func init() { file_vpe_binapi_init() }
251 func file_vpe_binapi_init() {
252 api.RegisterMessage((*LogDetails)(nil), "log_details_03d61cc0")
253 api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
254 api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
255 api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
256 api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
257 api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
260 // Messages returns list of all messages in this module.
261 func AllMessages() []api.Message {
262 return []api.Message{
266 (*ShowVersionReply)(nil),
267 (*ShowVpeSystemTime)(nil),
268 (*ShowVpeSystemTimeReply)(nil),