Package org.yamcs.tctm.csp
Class CspCommandPostprocessor
java.lang.Object
org.yamcs.tctm.csp.CspCommandPostprocessor
- All Implemented Interfaces:
CommandPostprocessor
Link postprocessor for CSP 1.x commands (CubeSat Protocol)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the size of the binary packet for this command.int
void
init
(String yamcsInstance, YConfiguration config) Called to initialise the postprocessor and set the cmd hist publisher (used to publish command acknowledgments), the timeService (required to timestamp acks) and the configurationbyte[]
processes the command and returns the binary buffer.void
setCommandHistoryPublisher
(CommandHistoryPublisher commandHistory) sets the command history listener which can be used by the preprocessor to provide command history entries related to the command processed
-
Field Details
-
log
-
maximumTcPacketLength
protected int maximumTcPacketLength -
commandHistory
-
-
Constructor Details
-
CspCommandPostprocessor
public CspCommandPostprocessor()
-
-
Method Details
-
init
Description copied from interface:CommandPostprocessor
Called to initialise the postprocessor and set the cmd hist publisher (used to publish command acknowledgments), the timeService (required to timestamp acks) and the configuration- Specified by:
init
in interfaceCommandPostprocessor
-
setCommandHistoryPublisher
Description copied from interface:CommandPostprocessor
sets the command history listener which can be used by the preprocessor to provide command history entries related to the command processed- Specified by:
setCommandHistoryPublisher
in interfaceCommandPostprocessor
-
process
Description copied from interface:CommandPostprocessor
processes the command and returns the binary buffer. Returns null if the command cannot be processed (e.g. its size does not correspond to what this processor expects). In this case, the post-processor is expected to fail the command in the command history (also filling in an appropriate reason)- Specified by:
process
in interfaceCommandPostprocessor
- Returns:
- the processed command or null if the command cannot be processed
-
getBinaryLength
Description copied from interface:CommandPostprocessor
Return the size of the binary packet for this command.This is required in the frame links which bundle multiple commands together to know if the command will fit into the frame before post-processing it.
- Specified by:
getBinaryLength
in interfaceCommandPostprocessor
- Returns:
- the size of the binary packet which the method
CommandPostprocessor.process(PreparedCommand)
will return.
-
getMaximumTcPacketLength
public int getMaximumTcPacketLength()
-