Class PusPacketPreprocessor

  • All Implemented Interfaces:
    PacketPreprocessor

    public class PusPacketPreprocessor
    extends AbstractPacketPreprocessor
    Implementation for ECSS PUS (ECSS-E-ST-70-41C) packets. The header structure is:

    Primary header (specified by CCSDS 133.0-B-1)

    • packet version number (3 bits)
    • packet type (1 bit)
    • secondary header flag (1 bit)
    • application process ID (11 bits)
    • sequence flags (2 bits)
    • packet sequence count (14 bits)

    Secondary header (PUS specific)

    • TM packet PUS version number (4 bits)
    • spacecraft time reference status (4 bits)
    • service type ID (8 bits)
    • message subtype ID (8 bits)
    • message type counter (16 bits)
    • destination ID (16 bits)
    • time (absolute time) variable
    • spare optional

    The time packets have no secondary header and the apid set to 0. The data part consists of the current onboard time in the same encoding like in the normal packets.

    In this class we are interested in the time and the sequence count.

    • Constructor Detail

      • PusPacketPreprocessor

        public PusPacketPreprocessor​(String yamcsInstance)
      • PusPacketPreprocessor

        public PusPacketPreprocessor​(String yamcsInstance,
                                     YConfiguration config)
    • Method Detail

      • process

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