Class PythonExecutorTF<T>


public class PythonExecutorTF<T> extends JavaTransferExecutor<T>
Execution of TF in python is orchestrated by objects of this class: when there is a python TF, this transfer function implementation is executed: PythonExecutorTF delegates method execution to the python code through jep. That means that when python language for the TF is set in the configuration, this class is always loaded by the ASCE. Objects of this class then build the python object to which all the calls from ASCE are ultimately delegated.
  • Constructor Details

    • PythonExecutorTF

      public PythonExecutorTF(String cEleId, String cEleRunningId, long validityTimeFrame, Properties props, String pythonClassName) throws Exception
      Constructor. This constructor differs from the other TFs because it needs to know the name of the python class to load.
      Parameters:
      cEleId - : The id of the ASCE
      cEleRunningId - : the running ID of the ASCE
      validityTimeFrame - : The time frame (msec) to invalidate monitor points
      props - : The properties for the executor
      pythonClassName - : The name of the python class to which to delegate
      Throws:
      Exception
  • Method Details

    • eval

      public IasIOJ<T> eval(Map<String,IasIOJ<?>> compInputs, IasIOJ<T> actualOutput) throws Exception
      Run the TF by delegating to the python implementation in th eproper thread
      Specified by:
      eval in class JavaTransferExecutor<T>
      Parameters:
      compInputs - : the inputs to the ASCE
      actualOutput - : the actual output of the ASCE
      Returns:
      the new output
      Throws:
      Exception
    • initialize

      public void initialize(Set<org.eso.ias.asce.transfer.IasioInfo> inputsInfo, org.eso.ias.asce.transfer.IasioInfo outputInfo) throws Exception
      Description copied from class: JavaTransferExecutor
      Initialize the transfer function
      Specified by:
      initialize in class JavaTransferExecutor<T>
      Parameters:
      inputsInfo - The IDs and types of the inputs
      outputInfo - The Id and type of thr output
      Throws:
      Exception - in case of errors
    • shutdown

      public void shutdown() throws Exception
      Description copied from class: TransferExecutor
      Shuts down the BehaviorRunner when the IAS does not need it anymore. This life cycle method is called last, to clean up the resources. It is supposed to return quickly, even if not mandatory.
      Specified by:
      shutdown in class TransferExecutor
      Throws:
      Exception - In case of error shutting down