Class AbstractPacketPreprocessor

  • All Implemented Interfaces:
    PacketPreprocessor
    Direct Known Subclasses:
    CfsPacketPreprocessor, GenericPacketPreprocessor, IssPacketPreprocessor, PusPacketPreprocessor

    public abstract class AbstractPacketPreprocessor
    extends Object
    implements PacketPreprocessor
    This class provides some common facilities for the packet preprocessors. Options:
       dataLinks:
       ...
          packetPreprocessor: org.yamcs.tctm.concrete_classname
          packetPreprocessorArgs:
              byteOrder: LITTLE_ENDIAN
              timeEncoding:
                  epoch: CUSTOM
                  epochUTC: 1970-01-01T00:00:00Z
                  timeIncludesLeapSeconds: false
     
     
    The byteOrder option (default is BIG_ENDIAN) is used by some implementing classes to decode parts of the header.

    The timeEncoding is used to convert the extracted time to Yamcs time. epoch can be one of TAI, J2000, UNIX, GPS, CUSTOM.

    If CUSTOM is specified, the epochUTC has to be used to specify the UTC time which is used as an epoch (UTC is used here loosely because strictly speaking UTC has been only introduced in 1972 so it does not make sense for the times before).

    The time read from the packet is interpreted as delta from epochUTC.

    If timeIncludesLeapSeconds is true (default), the delta time is considered as having the leap seconds included (practically it is the real time that passed).

    TAI, J2000 and GPS have the leap seconds included, UNIX does not.

    The example above is equivalent with:

     timeEncoding:
        epoch: UNIX
     
    If this option is not configured, the default will be different for each pre-processor.