X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fmdata%2Fmdata.ba.go;h=4a7f74cf4bc018b66fd0366e5686651038263418;hb=c94a962279858fb13eaacc689f47aed358373e44;hp=aba1deea19da43a0118a55e5b45b892041650ed5;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go index aba1dee..4a7f74c 100644 --- a/binapi/mdata/mdata.ba.go +++ b/binapi/mdata/mdata.ba.go @@ -2,7 +2,6 @@ // versions: // binapi-generator: v0.4.0-dev // VPP: 20.05-release -// source: /usr/share/vpp/api/plugins/mdata.api.json // Package mdata contains generated bindings for API file mdata.api. // @@ -41,21 +40,18 @@ func (*MdataEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *MdataEnableDisable) Size() int { +func (m *MdataEnableDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.EnableDisable return size } func (m *MdataEnableDisable) 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) buf.EncodeBool(m.EnableDisable) return buf.Bytes(), nil } @@ -77,27 +73,24 @@ func (*MdataEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *MdataEnableDisableReply) Size() int { +func (m *MdataEnableDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *MdataEnableDisableReply) 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 *MdataEnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil }