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
ConstructorsConstructorDescriptionCspPacketPreprocessor(String yamcsInstance) CspPacketPreprocessor(String yamcsInstance, YConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionprotected longgetGenerationTime(TmPacket packet) Returns the generation time (= packet time).protected intgetSequenceCount(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, 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
-
CspPacketPreprocessor
-
CspPacketPreprocessor
-
-
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:
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.
-