主要内容

GET model_status

Query target computer status

Since R2026a

Description

curl -i -X GET http://username:password@address:port/model_status queries the target computer status. When successful the possible reported status states are:

  • LOADED — The real-time application is loaded on the target computer.

  • INITIALIZING — The real-time application is initializing I/O on the target computer.

  • RUNNING — The real-time application is running on the target computer.

  • DONE — The real-time application has stopped on the target computer.

  • MODEL_ERROR — An error has occurred in the real-time application on the target computer.

  • MODEL_DEFAULT — An error has occurred in the real-time application on the target computer.

example

curl -i -k -X GET https://username:password@address:port/model_status queries the target computer status by using HTTPS secure protocol. The additional -k option for the curl command directs the connection to accept a self-signed certificate. For information about creating certificate and key files and enabling HTTPS support, see setupTLSCertificate.

example

Examples

collapse all

Use the curl GET command to request target computer status. In this command, user slrt with password slrt is commanding the target computer at IP address 192.168.7.20 and port 8080 to return the status of a loaded model.

curl -i -X GET http://slrt:slrt@192.168.7.20:8080/model_status
HTTP/1.1 200 OK
Server: Boost.Beast/300
Content-Type: application/json
Set-Cookie: sessionId=7aad59e5a20ab98e54d426b76ddb05a5; Expires=Tue, 26-Aug-2025 15:43:45 GMT; Path=/model_status; HttpOnly
Content-Length: 148

{"application":"slrt_ex_osc","modelName":"slrt_ex_osc","state":"LOADED","stopTime":1,"logLevel":"info","pollingThreshold":0.0001,"fileLogMaxRuns":1}

The status of application slrt_ex_osc which was generated from model slrt_ex_osc is LOADED (application is loaded). Additional status information includes the application options: stop time, log level, polling threshold and file log max runs.

Input Arguments

collapse all

The name of the user with access to run the command on the target computer.

Example: slrt

The password of the user with access to run the command on the target computer.

Example: slrt

The IP address of the target computer.

Example: 172.20.146.111

The port number used by the target computer.

Example: 8080

Version History

Introduced in R2026a