Package org.yamcs.tctm
Interface PacketPreprocessor
-
- All Known Implementing Classes:
AbstractPacketPreprocessor,CfsPacketPreprocessor,GenericPacketPreprocessor,IssPacketPreprocessor,PusPacketPreprocessor
public interface PacketPreprocessorThe packet preprocessor is responsible for extracting basic information required for yamcs packet processing:- 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
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidcheckForSequenceDiscontinuity(boolean checkForSequenceDiscontinuity)The packet preprocessor processes multiple packets that should be in sequence.default TmPacketprocess(byte[] packet)Deprecated.please useprocess(TmPacket)instead as it preserves packet properties such as earth reception time set by the frame linkdefault TmPacketprocess(TmPacket pwt)Processes the packet and returns it.
-
-
-
Method Detail
-
process
@Deprecated default TmPacket process(byte[] packet)
Deprecated.please useprocess(TmPacket)instead as it preserves packet properties such as earth reception time set by the frame linktransforms a binary packet into aTmPacketCan return null if the packet is corrupt- Parameters:
packet-- Returns:
-
process
default TmPacket process(TmPacket pwt)
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-
-
-