From 1acf41966ad8b339b2b594e3887ba9c0d77f860d Mon Sep 17 00:00:00 2001 From: Matt Clarke Date: Mon, 2 Jan 2023 08:00:35 +0000 Subject: [PATCH] bump to latest flatbuffers --- requirements.txt | 2 +- streaming_data_types/area_detector_ADAr.py | 2 +- streaming_data_types/area_detector_NDAr.py | 4 ++-- streaming_data_types/forwarder_config_update_rf5k.py | 2 +- streaming_data_types/histogram_hs00.py | 2 +- streaming_data_types/histogram_hs01.py | 2 +- streaming_data_types/logdata_f142.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2c75ce0..07b351b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -flatbuffers==1.12 +flatbuffers==22.11.23 numpy diff --git a/streaming_data_types/area_detector_ADAr.py b/streaming_data_types/area_detector_ADAr.py index 9ad1aad..b8374d9 100644 --- a/streaming_data_types/area_detector_ADAr.py +++ b/streaming_data_types/area_detector_ADAr.py @@ -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) diff --git a/streaming_data_types/area_detector_NDAr.py b/streaming_data_types/area_detector_NDAr.py index 8e3a048..12ac809 100644 --- a/streaming_data_types/area_detector_NDAr.py +++ b/streaming_data_types/area_detector_NDAr.py @@ -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) diff --git a/streaming_data_types/forwarder_config_update_rf5k.py b/streaming_data_types/forwarder_config_update_rf5k.py index 5cc3b87..9638102 100644 --- a/streaming_data_types/forwarder_config_update_rf5k.py +++ b/streaming_data_types/forwarder_config_update_rf5k.py @@ -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) diff --git a/streaming_data_types/histogram_hs00.py b/streaming_data_types/histogram_hs00.py index 4c8700a..0121bbd 100644 --- a/streaming_data_types/histogram_hs00.py +++ b/streaming_data_types/histogram_hs00.py @@ -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"]) diff --git a/streaming_data_types/histogram_hs01.py b/streaming_data_types/histogram_hs01.py index 09d7faf..160585f 100644 --- a/streaming_data_types/histogram_hs01.py +++ b/streaming_data_types/histogram_hs01.py @@ -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"]) diff --git a/streaming_data_types/logdata_f142.py b/streaming_data_types/logdata_f142.py index b38e7fc..8186c63 100644 --- a/streaming_data_types/logdata_f142.py +++ b/streaming_data_types/logdata_f142.py @@ -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)