Package org.yamcs.tctm.cfs
Class CfsCommandPostprocessor
java.lang.Object
org.yamcs.tctm.cfs.CfsCommandPostprocessor
- All Implemented Interfaces:
CommandPostprocessor
CFS TC packets:
- CCSDS primary header - 6 bytes. Should be set according to CCSDS 133.0-B.
- function code - 1 byte
- checksum - 1 byte
This class sets the CCSDS sequence count and packet length in the primary CCSDS header and the checksum in the secondary CCSDS header.
The other parts of the header/packet are expected to be set by the command composition according to the Mission Database.
Note that prior to this patch the cFS would expect the checksum and the function code swapped on little endian systems. The configuration option swapChecksumFc can be used to realize this behaviour:
dataLinks: ... commandPostprocessorClassName: org.yamcs.tctm.cfs.CfsCommandPostprocessor commandPostprocessorArgs: swapChecksumFc: true
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 commandHistoryListener) sets the command history listener which can be used by the preprocessor to provide command history entries related to the command processedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.tctm.CommandPostprocessor
getBinaryLength
-
Field Details
-
seqFiller
-
commandHistoryPublisher
-
-
Constructor Details
-
CfsCommandPostprocessor
public CfsCommandPostprocessor()
-
-
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
-
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
-
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
-