Package org.yamcs.tctm.cfs
Class CfsCommandPostprocessor
- java.lang.Object
-
- org.yamcs.tctm.cfs.CfsCommandPostprocessor
-
- All Implemented Interfaces:
CommandPostprocessor
public class CfsCommandPostprocessor extends Object implements 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 Modifier and Type Field Description protected CommandHistoryPublisher
commandHistoryPublisher
protected CcsdsSeqCountFiller
seqFiller
-
Constructor Summary
Constructors Constructor Description CfsCommandPostprocessor(String yamcsInstance)
CfsCommandPostprocessor(String yamcsInstance, YConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
process(PreparedCommand pc)
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 processed-
Methods 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 Detail
-
seqFiller
protected CcsdsSeqCountFiller seqFiller
-
commandHistoryPublisher
protected CommandHistoryPublisher commandHistoryPublisher
-
-
Constructor Detail
-
CfsCommandPostprocessor
public CfsCommandPostprocessor(String yamcsInstance)
-
CfsCommandPostprocessor
public CfsCommandPostprocessor(String yamcsInstance, YConfiguration config)
-
-
Method Detail
-
process
public byte[] process(PreparedCommand pc)
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 postprocessor is expected to fail the command in the command history (also filling in an appropiate reason)- Specified by:
process
in interfaceCommandPostprocessor
- Returns:
-
setCommandHistoryPublisher
public void setCommandHistoryPublisher(CommandHistoryPublisher commandHistoryListener)
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
-
-