Package org.yamcs.algorithms
Class AlgorithmFunctions
- java.lang.Object
-
- org.yamcs.algorithms.AlgorithmFunctions
-
public class AlgorithmFunctions extends Object
Library of functions available from within Algorithm scripts using this naming scheme:The java method AlgorithmFunctions.[method] is available in scripts as Yamcs.[method]
-
-
Constructor Summary
Constructors Constructor Description AlgorithmFunctions(Processor processor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcalibrate(int raw, String parameter)Calibrate raw value according to the calibration rule of the given parametervoidcritical(String msg)voidcritical(String type, String msg)voidcritical(String source, String type, String msg)voiddistress(String msg)voiddistress(String type, String msg)voiddistress(String source, String type, String msg)voidinfo(String msg)voidinfo(String type, String msg)Stringinstance()longletohl(int value)Little endian to host longStringprocessorName()returns the processor name if the algorithm is running in a processor or null otherwisevoidsevere(String msg)voidsevere(String type, String msg)voidsevere(String source, String type, String msg)voidwarning(String msg)voidwarning(String type, String msg)voidwarning(String source, String type, String msg)voidwatch(String msg)voidwatch(String type, String msg)voidwatch(String source, String type, String msg)
-
-
-
Constructor Detail
-
AlgorithmFunctions
public AlgorithmFunctions(Processor processor)
-
-
Method Detail
-
calibrate
public Object calibrate(int raw, String parameter)
Calibrate raw value according to the calibration rule of the given parameter- Returns:
- a Float or String object
-
instance
public String instance()
-
info
public void info(String msg)
-
watch
public void watch(String msg)
-
warning
public void warning(String msg)
-
distress
public void distress(String msg)
-
critical
public void critical(String msg)
-
severe
public void severe(String msg)
-
processorName
public String processorName()
returns the processor name if the algorithm is running in a processor or null otherwise- Returns:
-
letohl
public long letohl(int value)
Little endian to host long
-
-