Skip to content

Commit

Permalink
bump to latest flatbuffers
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclarke authored Jan 2, 2023
1 parent ec4a5c0 commit 1acf419
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flatbuffers==1.12
flatbuffers==22.11.23
numpy
2 changes: 1 addition & 1 deletion streaming_data_types/area_detector_ADAr.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def serialise_ADAr(
ADArray.ADArrayStartAttributesVector(builder, len(attributes))
for item in reversed(temp_attributes):
builder.PrependUOffsetTRelative(item)
attributes_offset = builder.EndVector(len(attributes))
attributes_offset = builder.EndVector()

# Build the actual buffer
ADArray.ADArrayStart(builder)
Expand Down
4 changes: 2 additions & 2 deletions streaming_data_types/area_detector_NDAr.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def serialise_ndar(
# FlatBuffers builds arrays backwards
for s in reversed(dims):
builder.PrependUint64(s)
dims_offset = builder.EndVector(len(dims))
dims_offset = builder.EndVector()

# Build data
NDArray.NDArrayStartPDataVector(builder, len(data))
# FlatBuffers builds arrays backwards
for s in reversed(data):
builder.PrependUint8(s)
data_offset = builder.EndVector(len(data))
data_offset = builder.EndVector()

# Build the actual buffer
NDArray.NDArrayStart(builder)
Expand Down
2 changes: 1 addition & 1 deletion streaming_data_types/forwarder_config_update_rf5k.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def serialise_rf5k(config_change: UpdateType, streams: List[StreamInfo]) -> byte
ConfigUpdate.ConfigUpdateStartStreamsVector(builder, len(streams))
for stream_offset in stream_offsets:
builder.PrependUOffsetTRelative(stream_offset)
streams_offset = builder.EndVector(len(streams))
streams_offset = builder.EndVector()

# Build the actual buffer
ConfigUpdate.ConfigUpdateStart(builder)
Expand Down
2 changes: 1 addition & 1 deletion streaming_data_types/histogram_hs00.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def serialise_hs00(histogram):
# FlatBuffers builds arrays backwards
for m in reversed(metadata):
builder.PrependUOffsetTRelative(m)
metadata_vector = builder.EndVector(rank)
metadata_vector = builder.EndVector()

# Build the data
data_offset, data_type = _serialise_array(builder, histogram["data"])
Expand Down
2 changes: 1 addition & 1 deletion streaming_data_types/histogram_hs01.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def serialise_hs01(histogram):
# FlatBuffers builds arrays backwards
for m in reversed(metadata):
builder.PrependUOffsetTRelative(m)
metadata_vector = builder.EndVector(rank)
metadata_vector = builder.EndVector()

# Build the data
data_offset, data_type = _serialise_array(builder, histogram["data"])
Expand Down
2 changes: 1 addition & 1 deletion streaming_data_types/logdata_f142.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def _serialise_stringarray(builder: flatbuffers.Builder, data: np.ndarray, sourc
ArrayStringStartValueVector(builder, len(data))
for string_offset in string_offsets:
builder.PrependSOffsetTRelative(string_offset)
string_array_offset = builder.EndVector(len(data))
string_array_offset = builder.EndVector()
ArrayStringStart(builder)
ArrayStringAddValue(builder, string_array_offset)
value_position = ArrayStringEnd(builder)
Expand Down

0 comments on commit 1acf419

Please sign in to comment.