Package org.yamcs.tctm.pus
Class PusPacketPreprocessor
- java.lang.Object
-
- org.yamcs.tctm.AbstractPacketPreprocessor
-
- org.yamcs.tctm.pus.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.
-
-
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 PusPacketPreprocessor(String yamcsInstance)PusPacketPreprocessor(String yamcsInstance, YConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TmPacketprocess(TmPacket tmPacket)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
checkForSequenceDiscontinuity, process
-
-
-
-
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:PacketPreprocessorProcesses 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
-
-