Package org.yamcs.tctm
Interface PacketPreprocessor
- All Known Implementing Classes:
AbstractPacketPreprocessor
,CcsdsPacketPreprocessor
,CfsPacketPreprocessor
,CspPacketPreprocessor
,GenericPacketPreprocessor
,IssPacketPreprocessor
,PusPacketPreprocessor
public interface PacketPreprocessor
The packet preprocessor is responsible for extracting basic information required for yamcs packet processing:
It is assumed that the (generation time, sequence count) uniquely identify the packet.
The implementing classes need to have a constructor with one or two arguments:
The second one will be called if the preprocessor is declared with "args".
- packet generation time
- packet acquisition time
- sequence count
It is assumed that the (generation time, sequence count) uniquely identify the packet.
The implementing classes need to have a constructor with one or two arguments:
- MyPackerPreprocessor (String yamcsInstance), or
- MyPackerPreprocessor (String yamcsInstance, Map<String, Object> args)
The second one will be called if the preprocessor is declared with "args".
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
checkForSequenceDiscontinuity
(boolean checkForSequenceDiscontinuity) The packet preprocessor processes multiple packets that should be in sequence.default TmPacket
process
(byte[] packet) Deprecated.default TmPacket
Processes the packet and returns it.
-
Method Details
-
process
Deprecated.please useprocess(TmPacket)
instead as it preserves packet properties such as earth reception time set by the frame linktransforms a binary packet into aTmPacket
Can return null if the packet is corrupt- Parameters:
packet
-- Returns:
-
process
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:
pwt
- - the packet that has to be processed- Returns:
- the processed packet
-
checkForSequenceDiscontinuity
default void checkForSequenceDiscontinuity(boolean checkForSequenceDiscontinuity) 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.- Parameters:
checkForSequenceDiscontinuity
-
-
process(TmPacket)
instead as it preserves packet properties such as earth reception time set by the frame link