Package org.yamcs.tctm.csp
Class CspPacketPreprocessor
java.lang.Object
org.yamcs.tctm.AbstractPacketPreprocessor
org.yamcs.tctm.csp.CspPacketPreprocessor
- All Implemented Interfaces:
PacketPreprocessor
Link preprocessor for CSP 1.x packets (CubeSat Protocol)
-
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, ETYPE_CORRUPTED_PACKET, eventProducer, log, tcoService, timeDecoder, timeEpoch, timeService, useLocalGenerationTime
-
Constructor Summary
ConstructorDescriptionCspPacketPreprocessor
(String yamcsInstance) CspPacketPreprocessor
(String yamcsInstance, YConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionprotected long
getGenerationTime
(TmPacket packet) Returns the generation time (= packet time).protected int
getSequenceCount
(TmPacket packet) Returns a sequence count for identifying a packet in addition to the generation time.Processes the packet and returns it.Methods inherited from class org.yamcs.tctm.AbstractPacketPreprocessor
checkForSequenceDiscontinuity, checkForSequenceDiscontinuity, getByteOrder, getDefaultDecoderType, getErrorDetectionWordCalculator, setRealtimePacketTime, shiftFromEpoch, verifyCrc
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 Details
-
CspPacketPreprocessor
-
CspPacketPreprocessor
-
-
Method Details
-
process
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:
packet
- - the packet that has to be processed- Returns:
- the processed packet
-
getGenerationTime
Returns the generation time (= packet time).Because no time information is available in CSP header, returns Yamcs-local time by default.
-
getSequenceCount
Returns a sequence count for identifying a packet in addition to the generation time.No sequence counter is available in CSP header, so the default implementation uses a local rotating counter.
-