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]

  • Field Details

  • Constructor Details

  • Method Details

    • 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()
    • processorTimeMillis

      public long processorTimeMillis()
    • processorTime

      public Instant processorTime()
    • trace

      public void trace(String msg)
      Print a trace message in the Yamcs log. If tracing is enabled on the algorithm, it is also added to the trace log.
    • debug

      public void debug(String msg)
      Print a debug message in the Yamcs log. If tracing is enabled on the algorithm, it is also added to the trace log.
    • log

      public void log(String msg)
      Print a message in the Yamcs log. If tracing is enabled on the algorithm, it is also added to the trace log.
    • warn

      public void warn(String msg)
      Print a warning message in the Yamcs log. If tracing is enabled on the algorithm, it is also added to the trace log.
    • error

      public void error(String msg)
      Print an error message in the Yamcs log. If tracing is enabled on the algorithm, it is also added to the trace log.
    • info

      @Deprecated public void info(String msg)
      Deprecated.
    • info

      @Deprecated public void info(String type, String msg)
      Deprecated.
    • info

      @Deprecated public void info(String source, String type, String msg)
      Deprecated.
    • watch

      @Deprecated public void watch(String msg)
      Deprecated.
    • watch

      @Deprecated public void watch(String type, String msg)
      Deprecated.
    • watch

      @Deprecated public void watch(String source, String type, String msg)
      Deprecated.
    • warning

      @Deprecated public void warning(String msg)
      Deprecated.
    • warning

      @Deprecated public void warning(String type, String msg)
      Deprecated.
    • warning

      @Deprecated public void warning(String source, String type, String msg)
      Deprecated.
    • distress

      @Deprecated public void distress(String msg)
      Deprecated.
    • distress

      @Deprecated public void distress(String type, String msg)
      Deprecated.
    • distress

      @Deprecated public void distress(String source, String type, String msg)
      Deprecated.
    • critical

      @Deprecated public void critical(String msg)
      Deprecated.
    • critical

      @Deprecated public void critical(String type, String msg)
      Deprecated.
    • critical

      @Deprecated public void critical(String source, String type, String msg)
      Deprecated.
    • severe

      @Deprecated public void severe(String msg)
      Deprecated.
    • severe

      @Deprecated public void severe(String type, String msg)
      Deprecated.
    • severe

      @Deprecated public void severe(String source, String type, String msg)
      Deprecated.
    • processorName

      public String processorName()
      returns the processor name if the algorithm is running in a processor or null otherwise
    • letohl

      public long letohl(int value)
      Little endian to host