Class Pus1Verifier
- All Implemented Interfaces:
AlgorithmExecutor
The algorithm verifies one stage which is given as verificationStage
in the constructor. For exmaple
verificationStage=3 works for the stage Start - i.e. verifies reports PUS(1,3) and PUS(1,4).
The algorithm requires at least 5 inputs, which must be defined in this exact order in the algorithm input list:
- sentApid - the APID of the sent command.
- sentSeqCount - the Sequence Count of the command sent, usually obtained from the command history.
- rcvdApid - the APID present in the PUS1 report.
- rcvdSeqCount - the Sequence Count in the PUS1 report.
- reportSubType - the PUS1 sub-type of the incoming PUS1 report.
In addition to these 5, other inputs may be used to get values in case of failure.
The algorithm checks the following conditions:
sentApid == rcvdApid
sentSeqCount == rcvdSeqCount
- The
reportSubType=verificationStage or reportSubType=verificationStage+1
If these conditions are met:
- If
reportSubType == verificationStage
, the verifier returns success. - If
reportSubType == verificationStage + 1
, the verifier returns failure, using the provided template to construct the failure message. The template can use the inputs of the algorithm for message formatting.
-
Field Summary
FieldsFields inherited from class org.yamcs.algorithms.AbstractAlgorithmExecutor
algorithmDef, execCtx, inputValues, log
-
Constructor Summary
ConstructorsConstructorDescriptionPus1Verifier
(Algorithm algorithmDef, AlgorithmExecutionContext execCtx, HashMap<String, Object> config) -
Method Summary
Modifier and TypeMethodDescriptionexecute
(long acqTime, long genTime, ProcessingData pdata) Runs the associated algorithm with the latest InputParameters.Methods inherited from class org.yamcs.algorithms.AbstractAlgorithmExecutor
getAlgorithm, getExecutionContext, getInputArgument, getInputParameter, getOutputParameter, update, updateInput, updateInputArgument
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.algorithms.AlgorithmExecutor
dispose, getInputList, getOutputList
-
Field Details
-
NO_RESULT
-
-
Constructor Details
-
Pus1Verifier
public Pus1Verifier(Algorithm algorithmDef, AlgorithmExecutionContext execCtx, HashMap<String, Object> config)
-
-
Method Details
-
execute
Description copied from interface:AlgorithmExecutor
Runs the associated algorithm with the latest InputParameters.Should throw an exception if there is an error within the algorithm.
The error message and error count will be remembered and available to external clients via the API.
The processing data parameter is passed if required to calibrate the output values. It shall not be updated by the executor as it is done in the
ActiveAlgorithm
- Returns:
- the output parameters, if any
-