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
|
This page presents all available functions of the software control of the CPM "RITM" in Engee.
Methods RITM
.
#
EngeeDeviceManager.Targets.compile_model
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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)
#
EngeeDeviceManager.Targets.generate_executable_code
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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)
#
EngeeDeviceManager.Targets.start_model
— Function
Targets.start_model(ritm::Any, model::Model)
Runs the model on RITM.
Arguments
-
ritm::Any
: RITM target platform object. Defined with the serial commandsritm = Targets.RITM.Ritm()
andTargets.RITM.set_url(ritm, "http://192.168.56.3:8000/")
. -
model::Model
: object of type Model.
Examples
Targets.start_model(ritm, model)
#
EngeeDeviceManager.Targets.stop_model
— Method
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)
#
EngeeDeviceManager.Targets.upload_model
— Method
Targets.upload_model(ritm::Any, model::Model)
Uploads the model to RITM.
Arguments
-
ritm::Any
: RITM target platform object. Defined with the serial commandsritm = Targets.RITM.Ritm()
andTargets.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)
#
EngeeDeviceManager.Targets.RITM.set_url
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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/")
#
EngeeDeviceManager.Targets.RITM.RITM_API.getFile
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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="")
#
EngeeDeviceManager.Targets.RITM.RITM_API.getLog
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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)
#
EngeeDeviceManager.Targets.RITM.RITM_API.isConnected
— Method
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)
#
EngeeDeviceManager.Targets.RITM.RITM_API.listFiles
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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/")
#
EngeeDeviceManager.Targets.RITM.RITM_API.memInfo
— Function
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 commandsritm = Targets.RITM.Ritm()
andTargets.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")
#
EngeeDeviceManager.Targets.RITM.RITM_API.readFile
— Method
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 commandsritm = Targets.RITM.Ritm()
andTargets.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/")