Interface PacketPreprocessor

  • All Known Implementing Classes:
    AbstractPacketPreprocessor, CfsPacketPreprocessor, GenericPacketPreprocessor, IssPacketPreprocessor, PusPacketPreprocessor

    public interface PacketPreprocessor
    The packet preprocessor is responsible for extracting basic information required for yamcs packet processing:
    • packet generation time
    • packet acquisition time
    • sequence count

    It is assumed that the (generation time, sequence count) uniquely identify the packet.

    The implementing classes need to have a constructor with one or two arguments:
    • MyPackerPreprocessor (String yamcsInstance), or
    • MyPackerPreprocessor (String yamcsInstance, Map<String, Object> args)

    The second one will be called if the preprocessor is declared with "args".
    • Method Detail

      • process

        @Deprecated
        default TmPacket process​(byte[] packet)
        Deprecated.
        please use process(TmPacket) instead as it preserves packet properties such as earth reception time set by the frame link
        transforms a binary packet into a TmPacket Can return null if the packet is corrupt
        Parameters:
        packet -
        Returns:
      • process

        default TmPacket process​(TmPacket pwt)
        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:
        pwt - - the packet that has to be processed
        Returns:
        the processed packet
      • checkForSequenceDiscontinuity

        default void checkForSequenceDiscontinuity​(boolean checkForSequenceDiscontinuity)
        The packet preprocessor processes multiple packets that should be in sequence. This flag can be used to check that indeed the packets are in sequence and produce a warning otherwise.
        Parameters:
        checkForSequenceDiscontinuity -