/
EthercatMailboxInfo.go
62 lines (51 loc) · 1.63 KB
/
EthercatMailboxInfo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package fbs
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type EthercatMailboxInfoT struct {
SizeIn uint32
SizeOut uint32
}
func (t *EthercatMailboxInfoT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
return CreateEthercatMailboxInfo(builder, t.SizeIn, t.SizeOut)
}
func (rcv *EthercatMailboxInfo) UnPackTo(t *EthercatMailboxInfoT) {
t.SizeIn = rcv.SizeIn()
t.SizeOut = rcv.SizeOut()
}
func (rcv *EthercatMailboxInfo) UnPack() *EthercatMailboxInfoT {
if rcv == nil { return nil }
t := &EthercatMailboxInfoT{}
rcv.UnPackTo(t)
return t
}
type EthercatMailboxInfo struct {
_tab flatbuffers.Struct
}
func (rcv *EthercatMailboxInfo) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *EthercatMailboxInfo) Table() flatbuffers.Table {
return rcv._tab.Table
}
func (rcv *EthercatMailboxInfo) SizeIn() uint32 {
return rcv._tab.GetUint32(rcv._tab.Pos + flatbuffers.UOffsetT(0))
}
func (rcv *EthercatMailboxInfo) MutateSizeIn(n uint32) bool {
return rcv._tab.MutateUint32(rcv._tab.Pos+flatbuffers.UOffsetT(0), n)
}
func (rcv *EthercatMailboxInfo) SizeOut() uint32 {
return rcv._tab.GetUint32(rcv._tab.Pos + flatbuffers.UOffsetT(4))
}
func (rcv *EthercatMailboxInfo) MutateSizeOut(n uint32) bool {
return rcv._tab.MutateUint32(rcv._tab.Pos+flatbuffers.UOffsetT(4), n)
}
func CreateEthercatMailboxInfo(builder *flatbuffers.Builder, sizeIn uint32, sizeOut uint32) flatbuffers.UOffsetT {
builder.Prep(4, 8)
builder.PrependUint32(sizeOut)
builder.PrependUint32(sizeIn)
return builder.Offset()
}