java.lang.Object
org.yamcs.tctm.AbstractPacketPreprocessor
org.yamcs.tctm.CcsdsPacketPreprocessor
org.yamcs.tctm.pus.PusPacketPreprocessor
- All Implemented Interfaces:
PacketPreprocessor
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 read
- the APID and sequence count from the CCSDS primary header interested in the time and the sequence count.
- the time from the PUS secondary header and from the time packets.
The offset of where the time is read from is configurable as this has changed between different versions of the standards.
Example configuration:
dataLinks:
...
- name: tm_realtime
packetPreprocessorClassName: org.yamcs.tctm.pus.PusPacketPreprocessor
packetPreprocessorArgs:
errorDetection:
type: CRC-16-CCIIT
pktTimeOffset: 13
timePktTimeOffset: 7
timeEncoding:
epoch: CUSTOM
epochUTC: 1970-01-01T00:00:00Z
timeIncludesLeapSeconds: false
-
Nested Class Summary
Nested classes/interfaces inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
AbstractPacketPreprocessor.TimeDecoderType, AbstractPacketPreprocessor.TimeEpochs -
Field Summary
Fields inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
byteOrder, checkForSequenceDiscontinuity, CONFIG_KEY_BYTE_ORDER, CONFIG_KEY_CHECK_SEQUENCE, CONFIG_KEY_ERROR_DETECTION, CONFIG_KEY_TCO_SERVICE, CONFIG_KEY_TIME_ENCODING, customEpoch, customEpochIncludeLeapSecond, errorDetectionCalculator, eventProducer, log, tcoService, timeDecoder, timeEpoch, timeService, useLocalGenerationTime -
Constructor Summary
ConstructorsConstructorDescriptionPusPacketPreprocessor(String yamcsInstance) PusPacketPreprocessor(String yamcsInstance, YConfiguration config) -
Method Summary
Methods inherited from class org.yamcs.tctm.CcsdsPacketPreprocessor
checkSequenceMethods inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
checkForSequenceDiscontinuity, checkForSequenceDiscontinuity, getByteOrder, getDefaultDecoderType, getErrorDetectionWordCalculator, setRealtimePacketTime, shiftFromEpoch, verifyCrcMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.yamcs.tctm.PacketPreprocessor
process
-
Constructor Details
-
PusPacketPreprocessor
-
PusPacketPreprocessor
-
-
Method Details
-
process
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
-