synapse-fbs 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. synapse_fbs-0.1.0/PKG-INFO +27 -0
  2. synapse_fbs-0.1.0/README.md +17 -0
  3. synapse_fbs-0.1.0/pyproject.toml +19 -0
  4. synapse_fbs-0.1.0/setup.cfg +4 -0
  5. synapse_fbs-0.1.0/synapse/__init__.py +0 -0
  6. synapse_fbs-0.1.0/synapse/log/LogFileHeader.py +93 -0
  7. synapse_fbs-0.1.0/synapse/log/LogFrame.py +106 -0
  8. synapse_fbs-0.1.0/synapse/log/LogRecord.py +70 -0
  9. synapse_fbs-0.1.0/synapse/log/RecordPayload.py +10 -0
  10. synapse_fbs-0.1.0/synapse/log/SchemaRecord.py +158 -0
  11. synapse_fbs-0.1.0/synapse/log/TopicRecord.py +93 -0
  12. synapse_fbs-0.1.0/synapse/log/__init__.py +0 -0
  13. synapse_fbs-0.1.0/synapse/sil/SimInput.py +131 -0
  14. synapse_fbs-0.1.0/synapse/sil/__init__.py +0 -0
  15. synapse_fbs-0.1.0/synapse/topic/AttitudeEuler.py +32 -0
  16. synapse_fbs-0.1.0/synapse/topic/ControlStatus.py +51 -0
  17. synapse_fbs-0.1.0/synapse/topic/FlightSnapshot.py +173 -0
  18. synapse_fbs-0.1.0/synapse/topic/MocapDefinition.py +174 -0
  19. synapse_fbs-0.1.0/synapse/topic/MocapFrame.py +207 -0
  20. synapse_fbs-0.1.0/synapse/topic/MocapMarkerDefinition.py +76 -0
  21. synapse_fbs-0.1.0/synapse/topic/MocapMarkerSample.py +38 -0
  22. synapse_fbs-0.1.0/synapse/topic/MocapRigidBodyDefinition.py +63 -0
  23. synapse_fbs-0.1.0/synapse/topic/MocapRigidBodySample.py +52 -0
  24. synapse_fbs-0.1.0/synapse/topic/MocapSegmentDefinition.py +89 -0
  25. synapse_fbs-0.1.0/synapse/topic/MocapSegmentSample.py +52 -0
  26. synapse_fbs-0.1.0/synapse/topic/MotorOutput.py +97 -0
  27. synapse_fbs-0.1.0/synapse/topic/MotorRaw4u16.py +35 -0
  28. synapse_fbs-0.1.0/synapse/topic/MotorValues4f.py +35 -0
  29. synapse_fbs-0.1.0/synapse/topic/Quaternionf.py +35 -0
  30. synapse_fbs-0.1.0/synapse/topic/RateTriplet.py +32 -0
  31. synapse_fbs-0.1.0/synapse/topic/RcChannels16.py +71 -0
  32. synapse_fbs-0.1.0/synapse/topic/Vec2f.py +29 -0
  33. synapse_fbs-0.1.0/synapse/topic/Vec3f.py +32 -0
  34. synapse_fbs-0.1.0/synapse/topic/VehicleOpticalFlow.py +54 -0
  35. synapse_fbs-0.1.0/synapse/topic/VehicleOpticalFlowData.py +63 -0
  36. synapse_fbs-0.1.0/synapse/topic/VehicleOpticalFlowVel.py +54 -0
  37. synapse_fbs-0.1.0/synapse/topic/VehicleOpticalFlowVelData.py +68 -0
  38. synapse_fbs-0.1.0/synapse/topic/__init__.py +0 -0
  39. synapse_fbs-0.1.0/synapse_fbs.egg-info/PKG-INFO +27 -0
  40. synapse_fbs-0.1.0/synapse_fbs.egg-info/SOURCES.txt +41 -0
  41. synapse_fbs-0.1.0/synapse_fbs.egg-info/dependency_links.txt +1 -0
  42. synapse_fbs-0.1.0/synapse_fbs.egg-info/requires.txt +1 -0
  43. synapse_fbs-0.1.0/synapse_fbs.egg-info/top_level.txt +1 -0
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.4
2
+ Name: synapse-fbs
3
+ Version: 0.1.0
4
+ Summary: Generated Python FlatBuffers bindings for Synapse schemas
5
+ License-Expression: MIT OR Apache-2.0
6
+ Project-URL: Repository, https://github.com/CogniPilot/synapse_fbs
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: flatbuffers==25.12.19
10
+
11
+ # synapse-fbs
12
+
13
+ Generated Python FlatBuffers bindings for the Synapse message schemas.
14
+
15
+ The schema source of truth lives in `fbs/`. CI stages this package under
16
+ `target/xtask/packages/python`, generates bindings there, then publishes it to
17
+ PyPI. To build locally from the repository root:
18
+
19
+ ```sh
20
+ cargo run --locked --manifest-path xtask/Cargo.toml -- ci
21
+ ```
22
+
23
+ Install the staged wheel locally with:
24
+
25
+ ```sh
26
+ pip install target/xtask/packages/python/dist/*.whl
27
+ ```
@@ -0,0 +1,17 @@
1
+ # synapse-fbs
2
+
3
+ Generated Python FlatBuffers bindings for the Synapse message schemas.
4
+
5
+ The schema source of truth lives in `fbs/`. CI stages this package under
6
+ `target/xtask/packages/python`, generates bindings there, then publishes it to
7
+ PyPI. To build locally from the repository root:
8
+
9
+ ```sh
10
+ cargo run --locked --manifest-path xtask/Cargo.toml -- ci
11
+ ```
12
+
13
+ Install the staged wheel locally with:
14
+
15
+ ```sh
16
+ pip install target/xtask/packages/python/dist/*.whl
17
+ ```
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "synapse-fbs"
7
+ version = "0.1.0"
8
+ description = "Generated Python FlatBuffers bindings for Synapse schemas"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT OR Apache-2.0"
12
+ dependencies = ["flatbuffers==25.12.19"]
13
+
14
+ [project.urls]
15
+ Repository = "https://github.com/CogniPilot/synapse_fbs"
16
+
17
+ [tool.setuptools.packages.find]
18
+ where = ["."]
19
+ include = ["synapse*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,93 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+ np = import_numpy()
8
+
9
+ class LogFileHeader(object):
10
+ __slots__ = ['_tab']
11
+
12
+ @classmethod
13
+ def GetRootAs(cls, buf, offset=0):
14
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15
+ x = LogFileHeader()
16
+ x.Init(buf, n + offset)
17
+ return x
18
+
19
+ @classmethod
20
+ def GetRootAsLogFileHeader(cls, buf, offset=0):
21
+ """This method is deprecated. Please switch to GetRootAs."""
22
+ return cls.GetRootAs(buf, offset)
23
+ @classmethod
24
+ def LogFileHeaderBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x53\x59\x4C\x47", size_prefixed=size_prefixed)
26
+
27
+ # LogFileHeader
28
+ def Init(self, buf, pos):
29
+ self._tab = flatbuffers.table.Table(buf, pos)
30
+
31
+ # LogFileHeader
32
+ def FormatVersion(self):
33
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34
+ if o != 0:
35
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
36
+ return 0
37
+
38
+ # LogFileHeader
39
+ def CreatedUnixUs(self):
40
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41
+ if o != 0:
42
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
43
+ return 0
44
+
45
+ # LogFileHeader
46
+ def Source(self):
47
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
48
+ if o != 0:
49
+ return self._tab.String(o + self._tab.Pos)
50
+ return None
51
+
52
+ # LogFileHeader
53
+ def Description(self):
54
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
55
+ if o != 0:
56
+ return self._tab.String(o + self._tab.Pos)
57
+ return None
58
+
59
+ def LogFileHeaderStart(builder):
60
+ builder.StartObject(4)
61
+
62
+ def Start(builder):
63
+ LogFileHeaderStart(builder)
64
+
65
+ def LogFileHeaderAddFormatVersion(builder, formatVersion):
66
+ builder.PrependUint32Slot(0, formatVersion, 0)
67
+
68
+ def AddFormatVersion(builder, formatVersion):
69
+ LogFileHeaderAddFormatVersion(builder, formatVersion)
70
+
71
+ def LogFileHeaderAddCreatedUnixUs(builder, createdUnixUs):
72
+ builder.PrependUint64Slot(1, createdUnixUs, 0)
73
+
74
+ def AddCreatedUnixUs(builder, createdUnixUs):
75
+ LogFileHeaderAddCreatedUnixUs(builder, createdUnixUs)
76
+
77
+ def LogFileHeaderAddSource(builder, source):
78
+ builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(source), 0)
79
+
80
+ def AddSource(builder, source):
81
+ LogFileHeaderAddSource(builder, source)
82
+
83
+ def LogFileHeaderAddDescription(builder, description):
84
+ builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(description), 0)
85
+
86
+ def AddDescription(builder, description):
87
+ LogFileHeaderAddDescription(builder, description)
88
+
89
+ def LogFileHeaderEnd(builder):
90
+ return builder.EndObject()
91
+
92
+ def End(builder):
93
+ return LogFileHeaderEnd(builder)
@@ -0,0 +1,106 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+ np = import_numpy()
8
+
9
+ class LogFrame(object):
10
+ __slots__ = ['_tab']
11
+
12
+ @classmethod
13
+ def GetRootAs(cls, buf, offset=0):
14
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15
+ x = LogFrame()
16
+ x.Init(buf, n + offset)
17
+ return x
18
+
19
+ @classmethod
20
+ def GetRootAsLogFrame(cls, buf, offset=0):
21
+ """This method is deprecated. Please switch to GetRootAs."""
22
+ return cls.GetRootAs(buf, offset)
23
+ @classmethod
24
+ def LogFrameBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x53\x59\x4C\x47", size_prefixed=size_prefixed)
26
+
27
+ # LogFrame
28
+ def Init(self, buf, pos):
29
+ self._tab = flatbuffers.table.Table(buf, pos)
30
+
31
+ # LogFrame
32
+ def MonotonicUs(self):
33
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34
+ if o != 0:
35
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
36
+ return 0
37
+
38
+ # LogFrame
39
+ def TopicId(self):
40
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41
+ if o != 0:
42
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
43
+ return 0
44
+
45
+ # LogFrame
46
+ def Payload(self, j):
47
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
48
+ if o != 0:
49
+ a = self._tab.Vector(o)
50
+ return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
51
+ return 0
52
+
53
+ # LogFrame
54
+ def PayloadAsNumpy(self):
55
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
56
+ if o != 0:
57
+ return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
58
+ return 0
59
+
60
+ # LogFrame
61
+ def PayloadLength(self):
62
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
63
+ if o != 0:
64
+ return self._tab.VectorLen(o)
65
+ return 0
66
+
67
+ # LogFrame
68
+ def PayloadIsNone(self):
69
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
70
+ return o == 0
71
+
72
+ def LogFrameStart(builder):
73
+ builder.StartObject(3)
74
+
75
+ def Start(builder):
76
+ LogFrameStart(builder)
77
+
78
+ def LogFrameAddMonotonicUs(builder, monotonicUs):
79
+ builder.PrependUint64Slot(0, monotonicUs, 0)
80
+
81
+ def AddMonotonicUs(builder, monotonicUs):
82
+ LogFrameAddMonotonicUs(builder, monotonicUs)
83
+
84
+ def LogFrameAddTopicId(builder, topicId):
85
+ builder.PrependUint32Slot(1, topicId, 0)
86
+
87
+ def AddTopicId(builder, topicId):
88
+ LogFrameAddTopicId(builder, topicId)
89
+
90
+ def LogFrameAddPayload(builder, payload):
91
+ builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(payload), 0)
92
+
93
+ def AddPayload(builder, payload):
94
+ LogFrameAddPayload(builder, payload)
95
+
96
+ def LogFrameStartPayloadVector(builder, numElems):
97
+ return builder.StartVector(1, numElems, 1)
98
+
99
+ def StartPayloadVector(builder, numElems):
100
+ return LogFrameStartPayloadVector(builder, numElems)
101
+
102
+ def LogFrameEnd(builder):
103
+ return builder.EndObject()
104
+
105
+ def End(builder):
106
+ return LogFrameEnd(builder)
@@ -0,0 +1,70 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+ np = import_numpy()
8
+
9
+ class LogRecord(object):
10
+ __slots__ = ['_tab']
11
+
12
+ @classmethod
13
+ def GetRootAs(cls, buf, offset=0):
14
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15
+ x = LogRecord()
16
+ x.Init(buf, n + offset)
17
+ return x
18
+
19
+ @classmethod
20
+ def GetRootAsLogRecord(cls, buf, offset=0):
21
+ """This method is deprecated. Please switch to GetRootAs."""
22
+ return cls.GetRootAs(buf, offset)
23
+ @classmethod
24
+ def LogRecordBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x53\x59\x4C\x47", size_prefixed=size_prefixed)
26
+
27
+ # LogRecord
28
+ def Init(self, buf, pos):
29
+ self._tab = flatbuffers.table.Table(buf, pos)
30
+
31
+ # LogRecord
32
+ def RecordType(self):
33
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34
+ if o != 0:
35
+ return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
36
+ return 0
37
+
38
+ # LogRecord
39
+ def Record(self):
40
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41
+ if o != 0:
42
+ from flatbuffers.table import Table
43
+ obj = Table(bytearray(), 0)
44
+ self._tab.Union(obj, o)
45
+ return obj
46
+ return None
47
+
48
+ def LogRecordStart(builder):
49
+ builder.StartObject(2)
50
+
51
+ def Start(builder):
52
+ LogRecordStart(builder)
53
+
54
+ def LogRecordAddRecordType(builder, recordType):
55
+ builder.PrependUint8Slot(0, recordType, 0)
56
+
57
+ def AddRecordType(builder, recordType):
58
+ LogRecordAddRecordType(builder, recordType)
59
+
60
+ def LogRecordAddRecord(builder, record):
61
+ builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(record), 0)
62
+
63
+ def AddRecord(builder, record):
64
+ LogRecordAddRecord(builder, record)
65
+
66
+ def LogRecordEnd(builder):
67
+ return builder.EndObject()
68
+
69
+ def End(builder):
70
+ return LogRecordEnd(builder)
@@ -0,0 +1,10 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ class RecordPayload(object):
6
+ NONE = 0
7
+ LogFileHeader = 1
8
+ SchemaRecord = 2
9
+ TopicRecord = 3
10
+ LogFrame = 4
@@ -0,0 +1,158 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+ np = import_numpy()
8
+
9
+ class SchemaRecord(object):
10
+ __slots__ = ['_tab']
11
+
12
+ @classmethod
13
+ def GetRootAs(cls, buf, offset=0):
14
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15
+ x = SchemaRecord()
16
+ x.Init(buf, n + offset)
17
+ return x
18
+
19
+ @classmethod
20
+ def GetRootAsSchemaRecord(cls, buf, offset=0):
21
+ """This method is deprecated. Please switch to GetRootAs."""
22
+ return cls.GetRootAs(buf, offset)
23
+ @classmethod
24
+ def SchemaRecordBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x53\x59\x4C\x47", size_prefixed=size_prefixed)
26
+
27
+ # SchemaRecord
28
+ def Init(self, buf, pos):
29
+ self._tab = flatbuffers.table.Table(buf, pos)
30
+
31
+ # SchemaRecord
32
+ def SchemaId(self):
33
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34
+ if o != 0:
35
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
36
+ return 0
37
+
38
+ # SchemaRecord
39
+ def Name(self):
40
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41
+ if o != 0:
42
+ return self._tab.String(o + self._tab.Pos)
43
+ return None
44
+
45
+ # SchemaRecord
46
+ def RootType(self):
47
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
48
+ if o != 0:
49
+ return self._tab.String(o + self._tab.Pos)
50
+ return None
51
+
52
+ # SchemaRecord
53
+ def FileIdentifier(self):
54
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
55
+ if o != 0:
56
+ return self._tab.String(o + self._tab.Pos)
57
+ return None
58
+
59
+ # SchemaRecord
60
+ def FbsText(self):
61
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
62
+ if o != 0:
63
+ return self._tab.String(o + self._tab.Pos)
64
+ return None
65
+
66
+ # SchemaRecord
67
+ def FbsSha256(self):
68
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
69
+ if o != 0:
70
+ return self._tab.String(o + self._tab.Pos)
71
+ return None
72
+
73
+ # SchemaRecord
74
+ def Bfbs(self, j):
75
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
76
+ if o != 0:
77
+ a = self._tab.Vector(o)
78
+ return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
79
+ return 0
80
+
81
+ # SchemaRecord
82
+ def BfbsAsNumpy(self):
83
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
84
+ if o != 0:
85
+ return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
86
+ return 0
87
+
88
+ # SchemaRecord
89
+ def BfbsLength(self):
90
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
91
+ if o != 0:
92
+ return self._tab.VectorLen(o)
93
+ return 0
94
+
95
+ # SchemaRecord
96
+ def BfbsIsNone(self):
97
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
98
+ return o == 0
99
+
100
+ def SchemaRecordStart(builder):
101
+ builder.StartObject(7)
102
+
103
+ def Start(builder):
104
+ SchemaRecordStart(builder)
105
+
106
+ def SchemaRecordAddSchemaId(builder, schemaId):
107
+ builder.PrependUint64Slot(0, schemaId, 0)
108
+
109
+ def AddSchemaId(builder, schemaId):
110
+ SchemaRecordAddSchemaId(builder, schemaId)
111
+
112
+ def SchemaRecordAddName(builder, name):
113
+ builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
114
+
115
+ def AddName(builder, name):
116
+ SchemaRecordAddName(builder, name)
117
+
118
+ def SchemaRecordAddRootType(builder, rootType):
119
+ builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(rootType), 0)
120
+
121
+ def AddRootType(builder, rootType):
122
+ SchemaRecordAddRootType(builder, rootType)
123
+
124
+ def SchemaRecordAddFileIdentifier(builder, fileIdentifier):
125
+ builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(fileIdentifier), 0)
126
+
127
+ def AddFileIdentifier(builder, fileIdentifier):
128
+ SchemaRecordAddFileIdentifier(builder, fileIdentifier)
129
+
130
+ def SchemaRecordAddFbsText(builder, fbsText):
131
+ builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(fbsText), 0)
132
+
133
+ def AddFbsText(builder, fbsText):
134
+ SchemaRecordAddFbsText(builder, fbsText)
135
+
136
+ def SchemaRecordAddFbsSha256(builder, fbsSha256):
137
+ builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(fbsSha256), 0)
138
+
139
+ def AddFbsSha256(builder, fbsSha256):
140
+ SchemaRecordAddFbsSha256(builder, fbsSha256)
141
+
142
+ def SchemaRecordAddBfbs(builder, bfbs):
143
+ builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(bfbs), 0)
144
+
145
+ def AddBfbs(builder, bfbs):
146
+ SchemaRecordAddBfbs(builder, bfbs)
147
+
148
+ def SchemaRecordStartBfbsVector(builder, numElems):
149
+ return builder.StartVector(1, numElems, 1)
150
+
151
+ def StartBfbsVector(builder, numElems):
152
+ return SchemaRecordStartBfbsVector(builder, numElems)
153
+
154
+ def SchemaRecordEnd(builder):
155
+ return builder.EndObject()
156
+
157
+ def End(builder):
158
+ return SchemaRecordEnd(builder)
@@ -0,0 +1,93 @@
1
+ # automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ # namespace: log
4
+
5
+ import flatbuffers
6
+ from flatbuffers.compat import import_numpy
7
+ np = import_numpy()
8
+
9
+ class TopicRecord(object):
10
+ __slots__ = ['_tab']
11
+
12
+ @classmethod
13
+ def GetRootAs(cls, buf, offset=0):
14
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
15
+ x = TopicRecord()
16
+ x.Init(buf, n + offset)
17
+ return x
18
+
19
+ @classmethod
20
+ def GetRootAsTopicRecord(cls, buf, offset=0):
21
+ """This method is deprecated. Please switch to GetRootAs."""
22
+ return cls.GetRootAs(buf, offset)
23
+ @classmethod
24
+ def TopicRecordBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
25
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x53\x59\x4C\x47", size_prefixed=size_prefixed)
26
+
27
+ # TopicRecord
28
+ def Init(self, buf, pos):
29
+ self._tab = flatbuffers.table.Table(buf, pos)
30
+
31
+ # TopicRecord
32
+ def TopicId(self):
33
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
34
+ if o != 0:
35
+ return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos)
36
+ return 0
37
+
38
+ # TopicRecord
39
+ def Name(self):
40
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
41
+ if o != 0:
42
+ return self._tab.String(o + self._tab.Pos)
43
+ return None
44
+
45
+ # TopicRecord
46
+ def SchemaId(self):
47
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
48
+ if o != 0:
49
+ return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
50
+ return 0
51
+
52
+ # TopicRecord
53
+ def Encoding(self):
54
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
55
+ if o != 0:
56
+ return self._tab.String(o + self._tab.Pos)
57
+ return None
58
+
59
+ def TopicRecordStart(builder):
60
+ builder.StartObject(4)
61
+
62
+ def Start(builder):
63
+ TopicRecordStart(builder)
64
+
65
+ def TopicRecordAddTopicId(builder, topicId):
66
+ builder.PrependUint32Slot(0, topicId, 0)
67
+
68
+ def AddTopicId(builder, topicId):
69
+ TopicRecordAddTopicId(builder, topicId)
70
+
71
+ def TopicRecordAddName(builder, name):
72
+ builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0)
73
+
74
+ def AddName(builder, name):
75
+ TopicRecordAddName(builder, name)
76
+
77
+ def TopicRecordAddSchemaId(builder, schemaId):
78
+ builder.PrependUint64Slot(2, schemaId, 0)
79
+
80
+ def AddSchemaId(builder, schemaId):
81
+ TopicRecordAddSchemaId(builder, schemaId)
82
+
83
+ def TopicRecordAddEncoding(builder, encoding):
84
+ builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(encoding), 0)
85
+
86
+ def AddEncoding(builder, encoding):
87
+ TopicRecordAddEncoding(builder, encoding)
88
+
89
+ def TopicRecordEnd(builder):
90
+ return builder.EndObject()
91
+
92
+ def End(builder):
93
+ return TopicRecordEnd(builder)
File without changes