Package org.yamcs.tctm
Class IssPacketPreprocessor
- java.lang.Object
-
- org.yamcs.tctm.AbstractPacketPreprocessor
-
- org.yamcs.tctm.IssPacketPreprocessor
-
- All Implemented Interfaces:
PacketPreprocessor
public class IssPacketPreprocessor extends AbstractPacketPreprocessor
This implements CCSDS packets as used in ISS (International Space Station).
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 (specific to ISS):- coarse time (32 bits)
- fine time (8 bits)
- time id(2 bits)
- checksum indicator (1 bit)
- spare (1 bit)
- packet type (4 bits)
- packet ID(32 bits)
This class is effectively making use of the following fields (all the other ones are ignored):- application process ID(APID) and packet sequence count: used to detect the discontinuity in packets as well as to form the unique key (used to not store duplicates)
- coarse time and fine time: used to derive the timestamp of the packet
- checksum indicator: used to know to compute and verify or not the checksum
- 16-SUM (default): running sum on each two bytes - the packet has to contain an even number of bytes
- CRC-16-CCIIT: CRC with the generator polynomial x^16 + x^12 + x^5 + 1
-
-
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 IssPacketPreprocessor(String yamcsInstance)
IssPacketPreprocessor(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 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
process
-
-
-
-
Constructor Detail
-
IssPacketPreprocessor
public IssPacketPreprocessor(String yamcsInstance)
-
IssPacketPreprocessor
public IssPacketPreprocessor(String yamcsInstance, YConfiguration config)
-
-
Method Detail
-
process
public TmPacket process(TmPacket tmPacket)
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:
tmPacket
- - 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.
-
-