forked from scionproto/scion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sibra.capnp.go
195 lines (153 loc) · 5.75 KB
/
sibra.capnp.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
// Code generated by capnpc-go. DO NOT EDIT.
package proto
import (
capnp "zombiezen.com/go/capnproto2"
text "zombiezen.com/go/capnproto2/encoding/text"
schemas "zombiezen.com/go/capnproto2/schemas"
)
type SibraPCBExt struct{ capnp.Struct }
// SibraPCBExt_TypeID is the unique identifier for the type SibraPCBExt.
const SibraPCBExt_TypeID = 0xb8fde9b959e9608d
func NewSibraPCBExt(s *capnp.Segment) (SibraPCBExt, error) {
st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
return SibraPCBExt{st}, err
}
func NewRootSibraPCBExt(s *capnp.Segment) (SibraPCBExt, error) {
st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3})
return SibraPCBExt{st}, err
}
func ReadRootSibraPCBExt(msg *capnp.Message) (SibraPCBExt, error) {
root, err := msg.RootPtr()
return SibraPCBExt{root.Struct()}, err
}
func (s SibraPCBExt) String() string {
str, _ := text.Marshal(0xb8fde9b959e9608d, s.Struct)
return str
}
func (s SibraPCBExt) Id() ([]byte, error) {
p, err := s.Struct.Ptr(0)
return []byte(p.Data()), err
}
func (s SibraPCBExt) HasId() bool {
p, err := s.Struct.Ptr(0)
return p.IsValid() || err != nil
}
func (s SibraPCBExt) SetId(v []byte) error {
return s.Struct.SetData(0, v)
}
func (s SibraPCBExt) Info() ([]byte, error) {
p, err := s.Struct.Ptr(1)
return []byte(p.Data()), err
}
func (s SibraPCBExt) HasInfo() bool {
p, err := s.Struct.Ptr(1)
return p.IsValid() || err != nil
}
func (s SibraPCBExt) SetInfo(v []byte) error {
return s.Struct.SetData(1, v)
}
func (s SibraPCBExt) Up() bool {
return s.Struct.Bit(0)
}
func (s SibraPCBExt) SetUp(v bool) {
s.Struct.SetBit(0, v)
}
func (s SibraPCBExt) Sofs() (capnp.DataList, error) {
p, err := s.Struct.Ptr(2)
return capnp.DataList{List: p.List()}, err
}
func (s SibraPCBExt) HasSofs() bool {
p, err := s.Struct.Ptr(2)
return p.IsValid() || err != nil
}
func (s SibraPCBExt) SetSofs(v capnp.DataList) error {
return s.Struct.SetPtr(2, v.List.ToPtr())
}
// NewSofs sets the sofs field to a newly
// allocated capnp.DataList, preferring placement in s's segment.
func (s SibraPCBExt) NewSofs(n int32) (capnp.DataList, error) {
l, err := capnp.NewDataList(s.Struct.Segment(), n)
if err != nil {
return capnp.DataList{}, err
}
err = s.Struct.SetPtr(2, l.List.ToPtr())
return l, err
}
// SibraPCBExt_List is a list of SibraPCBExt.
type SibraPCBExt_List struct{ capnp.List }
// NewSibraPCBExt creates a new list of SibraPCBExt.
func NewSibraPCBExt_List(s *capnp.Segment, sz int32) (SibraPCBExt_List, error) {
l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 3}, sz)
return SibraPCBExt_List{l}, err
}
func (s SibraPCBExt_List) At(i int) SibraPCBExt { return SibraPCBExt{s.List.Struct(i)} }
func (s SibraPCBExt_List) Set(i int, v SibraPCBExt) error { return s.List.SetStruct(i, v.Struct) }
func (s SibraPCBExt_List) String() string {
str, _ := text.MarshalList(0xb8fde9b959e9608d, s.List)
return str
}
// SibraPCBExt_Promise is a wrapper for a SibraPCBExt promised by a client call.
type SibraPCBExt_Promise struct{ *capnp.Pipeline }
func (p SibraPCBExt_Promise) Struct() (SibraPCBExt, error) {
s, err := p.Pipeline.Struct()
return SibraPCBExt{s}, err
}
type SibraPayload struct{ capnp.Struct }
// SibraPayload_TypeID is the unique identifier for the type SibraPayload.
const SibraPayload_TypeID = 0xf231c8f55f84c390
func NewSibraPayload(s *capnp.Segment) (SibraPayload, error) {
st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
return SibraPayload{st}, err
}
func NewRootSibraPayload(s *capnp.Segment) (SibraPayload, error) {
st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0})
return SibraPayload{st}, err
}
func ReadRootSibraPayload(msg *capnp.Message) (SibraPayload, error) {
root, err := msg.RootPtr()
return SibraPayload{root.Struct()}, err
}
func (s SibraPayload) String() string {
str, _ := text.Marshal(0xf231c8f55f84c390, s.Struct)
return str
}
// SibraPayload_List is a list of SibraPayload.
type SibraPayload_List struct{ capnp.List }
// NewSibraPayload creates a new list of SibraPayload.
func NewSibraPayload_List(s *capnp.Segment, sz int32) (SibraPayload_List, error) {
l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 0, PointerCount: 0}, sz)
return SibraPayload_List{l}, err
}
func (s SibraPayload_List) At(i int) SibraPayload { return SibraPayload{s.List.Struct(i)} }
func (s SibraPayload_List) Set(i int, v SibraPayload) error { return s.List.SetStruct(i, v.Struct) }
func (s SibraPayload_List) String() string {
str, _ := text.MarshalList(0xf231c8f55f84c390, s.List)
return str
}
// SibraPayload_Promise is a wrapper for a SibraPayload promised by a client call.
type SibraPayload_Promise struct{ *capnp.Pipeline }
func (p SibraPayload_Promise) Struct() (SibraPayload, error) {
s, err := p.Pipeline.Struct()
return SibraPayload{s}, err
}
const schema_d7ac72be29310d11 = "x\xdal\x8e\xbfJ\xf3p\x14\x86\xdf\xf7\x9c\xe4\xcb7" +
"4m\x0f\xcd\xe4\x1d\xd4A\xe8\xe0\xe2\xe4\x1f:\xb8\xe5" +
"\x87\x93 \xd8h,\x0d\xd4&4\x0a\xbaw\x15\xbc\x10" +
"wuq\xd0E\xbc\x01/A\xba\x0a\x8e\x12\xf9\x09\x82" +
"\x83\xd3\xe19\xef3<\xdd|S,\xbc\x05\xdc\xff\xf0" +
"_s5Z\xee\xdf/?\xef\xe0Zdc\xf1\xa0\xff" +
"0\xbfyE\xa8\x11`[\x8f\xb6\xeb\xef\xf0\x0dl\xae" +
"\x9f\x16\x87\x1f\xcf\x83wX\xeb\x97\x18D@\xaf\xcf\x97" +
"\xde:#hS\x17G\xf3l\xed8\x93jVm\xec" +
"yHw\xb6\x87\x17gHI\xd7\xd5\x00\x08\x08X\xb6" +
"\x02\xb8\x03\xa5\x9b\x08\x8dL\xe8\x9f'\xab\x80\x1b)\xdd" +
"THI(\x80\x15^\xcc\x95\xae\x12\x9aJB\x05\xec" +
"\xd4\x8b\x13\xa5[\x08\xb5\xc8\x19C\x18\x83\x9db6." +
"\x7f@\xcf+\x12B\x82\x9d\xba\x1c\xd7l\x83\xa9\xf2{" +
"n\x83\x7f\x85f\x97\xd32\xcb\xe1S\xbf\x02\x00\x00\xff" +
"\xff\xbe\x04?("
func init() {
schemas.Register(schema_d7ac72be29310d11,
0xb8fde9b959e9608d,
0xf231c8f55f84c390)
}