fprime_gds.common.pipeline.encoding
¶
encoding.py:
This file sets up the encoding and decoding handlers for use with the standard pipeline. This encapsulates the encoding and decoding into a single component that the be composed into the standard pipeline.
@mstarch
Module Contents¶
Classes¶
Sets up and runs the encoding and decoding for the standard pipeline. This include the following encoders and |
-
class
fprime_gds.common.pipeline.encoding.
EncodingDecoding
[source]¶ Sets up and runs the encoding and decoding for the standard pipeline. This include the following encoders and decoders for standard setups:
Events decoding
Channel decoding
File decoding
Command encoding
File encoding
-
setup_coders
(self, dictionaries, distributor, sender)[source]¶ Sets up the encoder and decoder layer of the GDS pipeline. This requires a dictionary set that has loaded the dictionaries needed for the decoders to work correctly. This will register then register the decoders with a supplied distributor to handle known types with the known decoders. Lastly, the sender will be registered to the encoder to handle the encoded data going out.
- Parameters
dictionaries – a dictionaries handling object holding dictionaries
distributor – distributor of data to register to
-
send_command
(self, command)[source]¶ Sends a command to the registered command encoder, and further down the stream. Note: this contains a local loopback to any command consumers to ensure that histories and logging are updated.
- Parameters
command – command object to send
-
register_event_consumer
(self, consumer)[source]¶ Registers a history with the event decoder.
- Parameters
consumer – consumer of events
-
remove_event_consumer
(self, consumer)[source]¶ Removes a history from the event decoder. Will raise an error if the history was not previously registered.
- Parameters
consumer – consumer of events
- Returns
a boolean indicating if the consumer was removed.
-
register_channel_consumer
(self, consumer)[source]¶ Registers a history with the telemetry decoder.
- Parameters
consumer – consumer of channels
-
remove_channel_consumer
(self, consumer)[source]¶ Removes a history from the telemetry decoder. Will raise an error if the history was not previously registered.
- Parameters
consumer – consumer of channels
- Returns
a boolean indicating if the consumer was removed.
-
register_command_consumer
(self, consumer)[source]¶ Registers a history with the standard pipeline.
- Parameters
consumer – consumer of commands
-
remove_command_consumer
(self, consumer)[source]¶ Removes a history that is subscribed to command data. Will raise an error if the history was not previously registered.
- Parameters
consumer – consumer of commands
- Returns
a boolean indicating if the consumer was removed.
Build: 1.4.1