Class CspPacketPreprocessor

java.lang.Object
org.yamcs.tctm.AbstractPacketPreprocessor
org.yamcs.tctm.csp.CspPacketPreprocessor
All Implemented Interfaces:
PacketPreprocessor

public class CspPacketPreprocessor extends AbstractPacketPreprocessor
Link preprocessor for CSP 1.x packets (CubeSat Protocol)
  • Constructor Details

    • CspPacketPreprocessor

      public CspPacketPreprocessor(String yamcsInstance)
    • CspPacketPreprocessor

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

    • process

      public TmPacket process(TmPacket packet)
      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:
      packet - - the packet that has to be processed
      Returns:
      the processed packet
    • getGenerationTime

      protected long getGenerationTime(TmPacket packet)
      Returns the generation time (= packet time).

      Because no time information is available in CSP header, returns Yamcs-local time by default.

    • getSequenceCount

      protected int getSequenceCount(TmPacket packet)
      Returns a sequence count for identifying a packet in addition to the generation time.

      No sequence counter is available in CSP header, so the default implementation uses a local rotating counter.