diff --git a/mytoolit/can/network.py b/mytoolit/can/network.py index 7f716493..db9b60bc 100644 --- a/mytoolit/can/network.py +++ b/mytoolit/can/network.py @@ -39,7 +39,6 @@ from mytoolit.can.streaming import ( AsyncStreamBuffer, StreamingConfiguration, - StreamingConfigBits, StreamingData, StreamingFormat, StreamingFormatVoltage, @@ -1923,7 +1922,6 @@ async def read_streaming_data_single(self) -> StreamingData: values=values, timestamp=response.timestamp, counter=response.data[1], - channels=StreamingConfigBits(first=True, second=True, third=True), ) return data diff --git a/mytoolit/can/streaming.py b/mytoolit/can/streaming.py index 38bb0e94..5ff8ac66 100644 --- a/mytoolit/can/streaming.py +++ b/mytoolit/can/streaming.py @@ -309,7 +309,6 @@ def on_message_received(self, msg: Message) -> None: timestamp=timestamp, counter=counter, values=values, - channels=self.configuration.channels, ) # Calculate amount of lost messages @@ -612,11 +611,7 @@ class StreamingData: """Support for storing data of a streaming message""" def __init__( - self, - counter: int, - timestamp: float, - values: Sequence[float], - channels: StreamingConfigBits, + self, counter: int, timestamp: float, values: Sequence[float] ) -> None: """Initialize the streaming data with the given arguments @@ -632,16 +627,11 @@ def __init__( values: The streaming values - channels: - A bitfield specifying which of the measurement channels was enabled - when the measurement took place - """ self.counter = counter self.timestamp = timestamp self.values = values - self.channels = channels def apply( self, @@ -658,10 +648,7 @@ def apply( Examples -------- - >>> channel3 = StreamingConfigBits( - ... first=False, second=False, third=True) - >>> data = StreamingData( - ... values=[1, 2, 3], counter=21, timestamp=1, channels=channel3) + >>> data = StreamingData(values=[1, 2, 3], counter=21, timestamp=1) >>> data.apply(lambda value: value + 10) >>> data.values [11, 12, 13] @@ -678,10 +665,7 @@ def __repr__(self): Examples -------- - >>> all = StreamingConfigBits( - ... first=True, second=True, third=True) - >>> StreamingData( - ... values=[1, 2, 3], counter=21, timestamp=1, channels=all) + >>> StreamingData(values=[1, 2, 3], counter=21, timestamp=1) [1, 2, 3]@1 #21 """ diff --git a/mytoolit/measurement/storage.py b/mytoolit/measurement/storage.py index 71637e0e..283f15aa 100644 --- a/mytoolit/measurement/storage.py +++ b/mytoolit/measurement/storage.py @@ -312,11 +312,8 @@ def add_streaming_data( >>> channel3 = StreamingConfiguration(first=False, second=False, ... third=True) - >>> bits3 = channel3.channels - >>> data1 = StreamingData( - ... values=[1, 2, 3], counter=21, timestamp=1, channels=bits3) - >>> data2 = StreamingData( - ... values=[4, 5, 6], counter=22, timestamp=2, channels=bits3) + >>> data1 = StreamingData(values=[1, 2, 3], counter=21, timestamp=1) + >>> data2 = StreamingData(values=[4, 5, 6], counter=22, timestamp=2) >>> filepath = Path("test.hdf5") >>> with Storage(filepath, channel3) as storage: ... storage.add_streaming_data(data1) @@ -326,11 +323,8 @@ def add_streaming_data( Store streaming data for three channels >>> all = StreamingConfiguration(first=True, second=True, third=True) - >>> bits_all = all.channels - >>> data1 = StreamingData( - ... values=[1, 2, 3], counter=21, timestamp=1, channels=bits_all) - >>> data2 = StreamingData( - ... values=[4, 5, 6], counter=22, timestamp=2, channels=bits_all) + >>> data1 = StreamingData(values=[1, 2, 3], counter=21, timestamp=1) + >>> data2 = StreamingData(values=[4, 5, 6], counter=22, timestamp=2) >>> with Storage(filepath, all) as storage: ... storage.add_streaming_data(data1) ... storage.add_streaming_data(data2)