Engee documentation

Software control of RITM

To operate the software control functions of the RITM CPM in Engee, install the hardware support package by executing the following commands in command line img 41 1 2:

engee.package.install("Engee-Device-Manager")
using Main.EngeeDeviceManager

This page presents all available functions of the software control of the CPM "RITM" in Engee.

Methods RITM.

Targets.compile_model(ritm::Any, model::Model, is_ext_mode::Bool)

Assembling the model on RITM.

Arguments

  • ritm::Any: object of the target RITM platform. Defined with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • model::Model: object of type Model.

  • is_ext_mode::Bool: flag indicating the mode of model execution. true - the model is executed in interactive mode. false - the model is executed in the independent mode.

Examples

model = Engee.engee.gcm()
Targets.upload_model(ritm, model)
Targets.generate_executable_code(ritm, model, false)
Targets.compile_model(ritm, model)
Targets.generate_executable_code(ritm::Any, model::Model, is_ext_mode::Bool)

Generates C-binding on RITM.

Arguments

  • ritm::Any: RITM target platform object. Defined with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • model::Model: object of type Model.

  • is_ext_mode::Bool: flag indicating the mode of model execution. true - the model is executed in interactive mode. false - the model is executed in the independent mode.

Examples

model = Engee.engee.gcm()
Targets.upload_model(ritm, model)
Targets.generate_executable_code(ritm, model, false)
Targets.start_model(ritm::Any, model::Model)

Runs the model on RITM.

Arguments

  • ritm::Any: RITM target platform object. Defined with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • model::Model: object of type Model.

Examples

Targets.start_model(ritm, model)
Targets.stop_model(ritm::Any)

Stops the model at RITM.

Arguments

ritm::Any: RITM target platform object. Defined with the consecutive commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

Examples

Targets.stop_model(ritm)
Targets.upload_model(ritm::Any, model::Model)

Uploads the model to RITM.

Arguments

  • ritm::Any: RITM target platform object. Defined with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • model::Model: object of type Model.

Examples

model = Engee.engee.gcm()
Targets.upload_model(ritm, model)
Targets.RITM.set_url(ritm:Any, url::String)

Sets the address of the RITM machine.

Arguments

  • ritm::Any: RITM target platform object. Set with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • url::String: RITM machine address.

Examples

ritm = Targets.RITM.Ritm()
Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/")
RITM_API.getFile(ritm::Any, file_name::String; from=/mydir::String, to=::String)

Gets the specified file file_name from the directory /home/ritm/build/model_name/build/, where model_name is the model name in Engee.

Arguments

  • ritm::Any: RITM target platform object. Specified using the sequential commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • file_name::String: name of the file of interest.

  • from=/mydir::String: path to the directory with the file of interest (default /home/ritm/build/model_name/build/).

  • to=::String: path to the directory in Engee to save the file (defaults to the current directory).

Examples

RITM_API.getFile(ritm, "install_manifest.txt"; from="/home/ritm/build/newmodel_1/build/", to="")
RITM_API.getLog(ritm::Any, num::Int64)

Returns the specified number of model execution log lines on the RITM.

Arguments

  • ritm::Any: RITM target platform object. Specified with the consecutive commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • num::Int64: number of output lines from the logs.

Examples

RITM_API.getLog(ritm, 10)
RITM_API.isConnected(ritm::Any)

Checks the availability of RITM.

Arguments

ritm::Any: RITM target platform object. Defined with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

Examples

RITM_API.isConnected(ritm)
RITM_API.listFiles(ritm::Any, path::String)

Outputs a list of files in the specified directory.

Arguments

  • ritm::Any: RITM target platform object. Specified with the consecutive commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • path::String: path to the directory of interest.

Examples

RITM_API.listFiles(ritm, "/home/ritm/")
RITM_API.memInfo(ritm::Any, model::String)

Displays information about the memory consumed by the model.

Arguments

  • ritm::Any: RITM target platform object. Specified with the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • model::String: model name. If "" is left blank, it will return the result of system profiling as [total, used, free]. If you specify the model name, it will return the number of bytes of memory consumed by the model.

Examples

RITM_API.memInfo(ritm, "newmodel_1")
RITM_API.readFile(ritm::Any, file_name::String; path=/mydir::String)

Outputs the contents of the specified file file_name from the directory /home/ritm/build/model_name/build/, where model_name is the model name in Engee.

Arguments

  • ritm::Any: RITM target platform object. Specified using the serial commands ritm = Targets.RITM.Ritm() and Targets.RITM.set_url(ritm, "http://192.168.56.3:8000/").

  • file_name::String: name of the file of interest.

  • path=/mydir::String: path to the directory with the file of interest (by default /home/ritm/build/model_name/build/).

Examples

RITM_API.readFile(ritm, "install_manifest.txt"; path="/home/ritm/build/newmodel_1/build/")