Package org.yamcs.algorithms
Class AlgorithmUtils
- java.lang.Object
-
- org.yamcs.algorithms.AlgorithmUtils
-
public class AlgorithmUtils extends Object
Library of functions available from within Algorithm scripts using this naming scheme:The java method AlgorithmUtils.[method] is available in scripts as Yamcs.[method]
-
-
Constructor Summary
Constructors Constructor Description AlgorithmUtils(Processor processor)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated 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)voiderror(String msg)Deprecated.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
-
AlgorithmUtils
public AlgorithmUtils(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)
-
error
@Deprecated public void error(String msg)
Deprecated.
-
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
-
-