/
EntryDescriptionRequest.go
168 lines (144 loc) · 4.73 KB
/
EntryDescriptionRequest.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package fbs
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type EntryDescriptionRequestT struct {
AddressType Addresstype
Address uint16
ObjectIndex uint16
SubIndex byte
ValueInfo byte
MaxLength uint32
}
func (t *EntryDescriptionRequestT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
EntryDescriptionRequestStart(builder)
EntryDescriptionRequestAddAddressType(builder, t.AddressType)
EntryDescriptionRequestAddAddress(builder, t.Address)
EntryDescriptionRequestAddObjectIndex(builder, t.ObjectIndex)
EntryDescriptionRequestAddSubIndex(builder, t.SubIndex)
EntryDescriptionRequestAddValueInfo(builder, t.ValueInfo)
EntryDescriptionRequestAddMaxLength(builder, t.MaxLength)
return EntryDescriptionRequestEnd(builder)
}
func (rcv *EntryDescriptionRequest) UnPackTo(t *EntryDescriptionRequestT) {
t.AddressType = rcv.AddressType()
t.Address = rcv.Address()
t.ObjectIndex = rcv.ObjectIndex()
t.SubIndex = rcv.SubIndex()
t.ValueInfo = rcv.ValueInfo()
t.MaxLength = rcv.MaxLength()
}
func (rcv *EntryDescriptionRequest) UnPack() *EntryDescriptionRequestT {
if rcv == nil { return nil }
t := &EntryDescriptionRequestT{}
rcv.UnPackTo(t)
return t
}
type EntryDescriptionRequest struct {
_tab flatbuffers.Table
}
func GetRootAsEntryDescriptionRequest(buf []byte, offset flatbuffers.UOffsetT) *EntryDescriptionRequest {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &EntryDescriptionRequest{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsEntryDescriptionRequest(buf []byte, offset flatbuffers.UOffsetT) *EntryDescriptionRequest {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &EntryDescriptionRequest{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *EntryDescriptionRequest) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *EntryDescriptionRequest) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *EntryDescriptionRequest) AddressType() Addresstype {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return Addresstype(rcv._tab.GetByte(o + rcv._tab.Pos))
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateAddressType(n Addresstype) bool {
return rcv._tab.MutateByteSlot(4, byte(n))
}
func (rcv *EntryDescriptionRequest) Address() uint16 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetUint16(o + rcv._tab.Pos)
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateAddress(n uint16) bool {
return rcv._tab.MutateUint16Slot(6, n)
}
func (rcv *EntryDescriptionRequest) ObjectIndex() uint16 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetUint16(o + rcv._tab.Pos)
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateObjectIndex(n uint16) bool {
return rcv._tab.MutateUint16Slot(8, n)
}
func (rcv *EntryDescriptionRequest) SubIndex() byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.GetByte(o + rcv._tab.Pos)
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateSubIndex(n byte) bool {
return rcv._tab.MutateByteSlot(10, n)
}
func (rcv *EntryDescriptionRequest) ValueInfo() byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.GetByte(o + rcv._tab.Pos)
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateValueInfo(n byte) bool {
return rcv._tab.MutateByteSlot(12, n)
}
func (rcv *EntryDescriptionRequest) MaxLength() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *EntryDescriptionRequest) MutateMaxLength(n uint32) bool {
return rcv._tab.MutateUint32Slot(14, n)
}
func EntryDescriptionRequestStart(builder *flatbuffers.Builder) {
builder.StartObject(6)
}
func EntryDescriptionRequestAddAddressType(builder *flatbuffers.Builder, addressType Addresstype) {
builder.PrependByteSlot(0, byte(addressType), 0)
}
func EntryDescriptionRequestAddAddress(builder *flatbuffers.Builder, address uint16) {
builder.PrependUint16Slot(1, address, 0)
}
func EntryDescriptionRequestAddObjectIndex(builder *flatbuffers.Builder, objectIndex uint16) {
builder.PrependUint16Slot(2, objectIndex, 0)
}
func EntryDescriptionRequestAddSubIndex(builder *flatbuffers.Builder, subIndex byte) {
builder.PrependByteSlot(3, subIndex, 0)
}
func EntryDescriptionRequestAddValueInfo(builder *flatbuffers.Builder, valueInfo byte) {
builder.PrependByteSlot(4, valueInfo, 0)
}
func EntryDescriptionRequestAddMaxLength(builder *flatbuffers.Builder, maxLength uint32) {
builder.PrependUint32Slot(5, maxLength, 0)
}
func EntryDescriptionRequestEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}