Package org.yamcs.tctm.cfs
Class CfsPacketPreprocessor
- java.lang.Object
-
- org.yamcs.tctm.AbstractPacketPreprocessor
-
- org.yamcs.tctm.cfs.CfsPacketPreprocessor
-
- All Implemented Interfaces:
PacketPreprocessor
public class CfsPacketPreprocessor extends AbstractPacketPreprocessor
Preprocessor for the CFS TM packets:- CCSDS primary header 6 bytes
- Time seconds 4 bytes
- subseconds(1/2^16 fraction of seconds) 2 bytes
dataLinks: ... packetPreprocessor: org.yamcs.tctm.cfs.CfsPacketPreprocessor packetPreprocessorArgs: byteOrder: LITTLE_ENDIAN timeEncoding: epoch: CUSTOM epochUTC: 1970-01-01T00:00:00Z timeIncludesLeapSeconds: false
ThebyteOrder
option (default isBIG_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 seeAbstractPacketPreprocessor
. 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
AbstractPacketPreprocessor.TimeEpochs
-
-
Field Summary
-
Fields inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
byteOrder, CONFIG_KEY_ERROR_DETECTION, CONFIG_KEY_TCO_SERVICE, CONFIG_KEY_TIME_ENCODING, customEpoch, customEpochIncludeLeapSecond, errorDetectionCalculator, eventProducer, log, tcoService, timeDecoder, timeEpoch, timeService, useLocalGenerationTime
-
-
Constructor Summary
Constructors Constructor Description CfsPacketPreprocessor(String yamcsInstance)
CfsPacketPreprocessor(String yamcsInstance, YConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkForSequenceDiscontinuity()
void
checkForSequenceDiscontinuity(boolean checkForSequenceDiscontinuity)
The packet preprocessor processes multiple packets that should be in sequence.TmPacket
process(TmPacket pkt)
Processes the packet and returns it.-
Methods inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
getErrorDetectionWordCalculator, shiftFromEpoch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.tctm.PacketPreprocessor
process
-
-
-
-
Constructor Detail
-
CfsPacketPreprocessor
public CfsPacketPreprocessor(String yamcsInstance)
-
CfsPacketPreprocessor
public CfsPacketPreprocessor(String yamcsInstance, YConfiguration config)
-
-
Method Detail
-
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
-
checkForSequenceDiscontinuity
public boolean checkForSequenceDiscontinuity()
-
checkForSequenceDiscontinuity
public void checkForSequenceDiscontinuity(boolean checkForSequenceDiscontinuity)
Description copied from interface:PacketPreprocessor
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.
-
-