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
The checksum is an XOR of all bytes from the packet with the initial checksum set to 0.

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 Details

  • Constructor Details

    • CfsCommandPostprocessor

      public CfsCommandPostprocessor(String yamcsInstance)
    • CfsCommandPostprocessor

      public CfsCommandPostprocessor(String yamcsInstance, YConfiguration config)
  • Method Details

    • 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 interface CommandPostprocessor
      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 interface CommandPostprocessor