/
AppTaskInfo.go
291 lines (254 loc) · 7.75 KB
/
AppTaskInfo.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package fbs
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type AppTaskInfoT struct {
Name string
Priority uint32
Watchdog bool
WatchdogTime uint32
CycleTime uint32
AverageCycleTime uint32
MaxCycleTime uint32
MinCycleTime uint32
CycleCount uint32
WatchdogSensitivity uint32
Interval uint32
TaskType TaskType
OsHandle uint64
}
func (t *AppTaskInfoT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil { return 0 }
nameOffset := builder.CreateString(t.Name)
AppTaskInfoStart(builder)
AppTaskInfoAddName(builder, nameOffset)
AppTaskInfoAddPriority(builder, t.Priority)
AppTaskInfoAddWatchdog(builder, t.Watchdog)
AppTaskInfoAddWatchdogTime(builder, t.WatchdogTime)
AppTaskInfoAddCycleTime(builder, t.CycleTime)
AppTaskInfoAddAverageCycleTime(builder, t.AverageCycleTime)
AppTaskInfoAddMaxCycleTime(builder, t.MaxCycleTime)
AppTaskInfoAddMinCycleTime(builder, t.MinCycleTime)
AppTaskInfoAddCycleCount(builder, t.CycleCount)
AppTaskInfoAddWatchdogSensitivity(builder, t.WatchdogSensitivity)
AppTaskInfoAddInterval(builder, t.Interval)
AppTaskInfoAddTaskType(builder, t.TaskType)
AppTaskInfoAddOsHandle(builder, t.OsHandle)
return AppTaskInfoEnd(builder)
}
func (rcv *AppTaskInfo) UnPackTo(t *AppTaskInfoT) {
t.Name = string(rcv.Name())
t.Priority = rcv.Priority()
t.Watchdog = rcv.Watchdog()
t.WatchdogTime = rcv.WatchdogTime()
t.CycleTime = rcv.CycleTime()
t.AverageCycleTime = rcv.AverageCycleTime()
t.MaxCycleTime = rcv.MaxCycleTime()
t.MinCycleTime = rcv.MinCycleTime()
t.CycleCount = rcv.CycleCount()
t.WatchdogSensitivity = rcv.WatchdogSensitivity()
t.Interval = rcv.Interval()
t.TaskType = rcv.TaskType()
t.OsHandle = rcv.OsHandle()
}
func (rcv *AppTaskInfo) UnPack() *AppTaskInfoT {
if rcv == nil { return nil }
t := &AppTaskInfoT{}
rcv.UnPackTo(t)
return t
}
type AppTaskInfo struct {
_tab flatbuffers.Table
}
func GetRootAsAppTaskInfo(buf []byte, offset flatbuffers.UOffsetT) *AppTaskInfo {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &AppTaskInfo{}
x.Init(buf, n+offset)
return x
}
func GetSizePrefixedRootAsAppTaskInfo(buf []byte, offset flatbuffers.UOffsetT) *AppTaskInfo {
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
x := &AppTaskInfo{}
x.Init(buf, n+offset+flatbuffers.SizeUint32)
return x
}
func (rcv *AppTaskInfo) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *AppTaskInfo) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *AppTaskInfo) Name() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func (rcv *AppTaskInfo) Priority() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutatePriority(n uint32) bool {
return rcv._tab.MutateUint32Slot(6, n)
}
func (rcv *AppTaskInfo) Watchdog() bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.GetBool(o + rcv._tab.Pos)
}
return false
}
func (rcv *AppTaskInfo) MutateWatchdog(n bool) bool {
return rcv._tab.MutateBoolSlot(8, n)
}
func (rcv *AppTaskInfo) WatchdogTime() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateWatchdogTime(n uint32) bool {
return rcv._tab.MutateUint32Slot(10, n)
}
func (rcv *AppTaskInfo) CycleTime() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateCycleTime(n uint32) bool {
return rcv._tab.MutateUint32Slot(12, n)
}
func (rcv *AppTaskInfo) AverageCycleTime() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateAverageCycleTime(n uint32) bool {
return rcv._tab.MutateUint32Slot(14, n)
}
func (rcv *AppTaskInfo) MaxCycleTime() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateMaxCycleTime(n uint32) bool {
return rcv._tab.MutateUint32Slot(16, n)
}
func (rcv *AppTaskInfo) MinCycleTime() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateMinCycleTime(n uint32) bool {
return rcv._tab.MutateUint32Slot(18, n)
}
func (rcv *AppTaskInfo) CycleCount() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateCycleCount(n uint32) bool {
return rcv._tab.MutateUint32Slot(20, n)
}
func (rcv *AppTaskInfo) WatchdogSensitivity() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateWatchdogSensitivity(n uint32) bool {
return rcv._tab.MutateUint32Slot(22, n)
}
func (rcv *AppTaskInfo) Interval() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(24))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateInterval(n uint32) bool {
return rcv._tab.MutateUint32Slot(24, n)
}
func (rcv *AppTaskInfo) TaskType() TaskType {
o := flatbuffers.UOffsetT(rcv._tab.Offset(26))
if o != 0 {
return TaskType(rcv._tab.GetUint32(o + rcv._tab.Pos))
}
return 255
}
func (rcv *AppTaskInfo) MutateTaskType(n TaskType) bool {
return rcv._tab.MutateUint32Slot(26, uint32(n))
}
func (rcv *AppTaskInfo) OsHandle() uint64 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(28))
if o != 0 {
return rcv._tab.GetUint64(o + rcv._tab.Pos)
}
return 0
}
func (rcv *AppTaskInfo) MutateOsHandle(n uint64) bool {
return rcv._tab.MutateUint64Slot(28, n)
}
func AppTaskInfoStart(builder *flatbuffers.Builder) {
builder.StartObject(13)
}
func AppTaskInfoAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func AppTaskInfoAddPriority(builder *flatbuffers.Builder, priority uint32) {
builder.PrependUint32Slot(1, priority, 0)
}
func AppTaskInfoAddWatchdog(builder *flatbuffers.Builder, watchdog bool) {
builder.PrependBoolSlot(2, watchdog, false)
}
func AppTaskInfoAddWatchdogTime(builder *flatbuffers.Builder, watchdogTime uint32) {
builder.PrependUint32Slot(3, watchdogTime, 0)
}
func AppTaskInfoAddCycleTime(builder *flatbuffers.Builder, cycleTime uint32) {
builder.PrependUint32Slot(4, cycleTime, 0)
}
func AppTaskInfoAddAverageCycleTime(builder *flatbuffers.Builder, averageCycleTime uint32) {
builder.PrependUint32Slot(5, averageCycleTime, 0)
}
func AppTaskInfoAddMaxCycleTime(builder *flatbuffers.Builder, maxCycleTime uint32) {
builder.PrependUint32Slot(6, maxCycleTime, 0)
}
func AppTaskInfoAddMinCycleTime(builder *flatbuffers.Builder, minCycleTime uint32) {
builder.PrependUint32Slot(7, minCycleTime, 0)
}
func AppTaskInfoAddCycleCount(builder *flatbuffers.Builder, cycleCount uint32) {
builder.PrependUint32Slot(8, cycleCount, 0)
}
func AppTaskInfoAddWatchdogSensitivity(builder *flatbuffers.Builder, watchdogSensitivity uint32) {
builder.PrependUint32Slot(9, watchdogSensitivity, 0)
}
func AppTaskInfoAddInterval(builder *flatbuffers.Builder, interval uint32) {
builder.PrependUint32Slot(10, interval, 0)
}
func AppTaskInfoAddTaskType(builder *flatbuffers.Builder, taskType TaskType) {
builder.PrependUint32Slot(11, uint32(taskType), 255)
}
func AppTaskInfoAddOsHandle(builder *flatbuffers.Builder, osHandle uint64) {
builder.PrependUint64Slot(12, osHandle, 0)
}
func AppTaskInfoEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}