-
Notifications
You must be signed in to change notification settings - Fork 0
/
Controls.go
60 lines (49 loc) · 1.2 KB
/
Controls.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
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package fbs
import (
"strconv"
flatbuffers "github.com/google/flatbuffers/go"
)
/// Special extensions to modify Scheduler and system behavior e.g. activation of DEBUG mode
type Controls byte
const (
ControlsNONE Controls = 0
/// Deactivation of hardware watchdog and task watchdogs to enabling debugging of machine
ControlsDebug Controls = 1
)
var EnumNamesControls = map[Controls]string{
ControlsNONE: "NONE",
ControlsDebug: "Debug",
}
var EnumValuesControls = map[string]Controls{
"NONE": ControlsNONE,
"Debug": ControlsDebug,
}
func (v Controls) String() string {
if s, ok := EnumNamesControls[v]; ok {
return s
}
return "Controls(" + strconv.FormatInt(int64(v), 10) + ")"
}
type ControlsT struct {
Type Controls
Value interface{}
}
func (t *ControlsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil {
return 0
}
switch t.Type {
case ControlsDebug:
return t.Value.(*DebugT).Pack(builder)
}
return 0
}
func (rcv Controls) UnPack(table flatbuffers.Table) *ControlsT {
switch rcv {
case ControlsDebug:
x := Debug{_tab: table}
return &ControlsT{ Type: ControlsDebug, Value: x.UnPack() }
}
return nil
}