Class CfsPacketPreprocessor

All Implemented Interfaces:
PacketPreprocessor

public class CfsPacketPreprocessor extends CcsdsPacketPreprocessor
Preprocessor for the CFS TM packets:
  • CCSDS primary header 6 bytes
  • Time seconds 4 bytes
  • subseconds(1/2^16 fraction of seconds) 2 bytes
Options:
   dataLinks:
   ...
      packetPreprocessor: org.yamcs.tctm.cfs.CfsPacketPreprocessor
      packetPreprocessorArgs:
          byteOrder: LITTLE_ENDIAN
          timeEncoding:
              epoch: CUSTOM
              epochUTC: 1970-01-01T00:00:00Z
              timeIncludesLeapSeconds: false
 
 
The byteOrder option (default is BIG_ENDIAN) is used only for decoding the timestamp in the secondary header: the 4 bytes second and 2 bytes subseconds are decoded in little endian.

The primary CCSDS header is always decoded as BIG_ENDIAN.

For explanation on the timeEncoding property, please see AbstractPacketPreprocessor. The default timeEncoding used if none is specified, is GPS, equivalent with this configuration:

 timeEncoding:
     epoch: GPS
 
which is also equivalent with this more detailed configuration:
 timeEncoding:
     epoch: CUSTOM
     epochUTC: "1980-01-06T00:00:00Z"
     timeIncludesLeapSeconds: true
 
  • Constructor Details

    • CfsPacketPreprocessor

      public CfsPacketPreprocessor(String yamcsInstance)
    • CfsPacketPreprocessor

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

    • process

      public TmPacket process(TmPacket pkt)
      Description copied from interface: PacketPreprocessor
      Processes the packet and returns it.

      What this function does is project depended. However, we expect that the generation time and sequence count are filled in.

      Can return null if the packet is to be ignored.

      Parameters:
      pkt - - the packet that has to be processed
      Returns:
      the processed packet