// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/trace.api.json
// Package trace contains generated bindings for API file trace.api.
package trace
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
return api.RequestMessage
}
-func (m *TraceProfileAdd) Size() int {
+func (m *TraceProfileAdd) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.TraceType
size += 1 // m.NumElts
size += 1 // m.TraceTsp
return size
}
func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint8(uint8(m.TraceType))
- buf.EncodeUint8(uint8(m.NumElts))
- buf.EncodeUint8(uint8(m.TraceTsp))
- buf.EncodeUint32(uint32(m.NodeID))
- buf.EncodeUint32(uint32(m.AppData))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint8(m.TraceType)
+ buf.EncodeUint8(m.NumElts)
+ buf.EncodeUint8(m.TraceTsp)
+ buf.EncodeUint32(m.NodeID)
+ buf.EncodeUint32(m.AppData)
return buf.Bytes(), nil
}
func (m *TraceProfileAdd) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *TraceProfileAddReply) Size() int {
+func (m *TraceProfileAddReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *TraceProfileAddReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *TraceProfileAddReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *TraceProfileDel) Size() int {
+func (m *TraceProfileDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *TraceProfileDel) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *TraceProfileDelReply) Size() int {
+func (m *TraceProfileDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *TraceProfileDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *TraceProfileDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *TraceProfileShowConfig) Size() int {
+func (m *TraceProfileShowConfig) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *TraceProfileShowConfigReply) Size() int {
+func (m *TraceProfileShowConfigReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 1 // m.TraceType
size += 1 // m.NumElts
return size
}
func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint8(uint8(m.TraceType))
- buf.EncodeUint8(uint8(m.NumElts))
- buf.EncodeUint8(uint8(m.TraceTsp))
- buf.EncodeUint32(uint32(m.NodeID))
- buf.EncodeUint32(uint32(m.AppData))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint8(m.TraceType)
+ buf.EncodeUint8(m.NumElts)
+ buf.EncodeUint8(m.TraceTsp)
+ buf.EncodeUint32(m.NodeID)
+ buf.EncodeUint32(m.AppData)
return buf.Bytes(), nil
}
func (m *TraceProfileShowConfigReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.TraceType = buf.DecodeUint8()
m.NumElts = buf.DecodeUint8()
m.TraceTsp = buf.DecodeUint8()