Gets the current status of the SRP Engine Server.

Syntax

SRP_TcpClient(Object, "STATUS_SES")

Returns

Always returns 1.

Remarks

The STATUS_SES returns a JSON structure listing all requests currently in queue and the state of each engine. The JSON schema is as follows:

{
"requests": [ "run my_program", ... ],
"engines": [
  {
    "id": 1,
    "status": "processing",
    "request": "run my_program",
    "request-id": 123
  },
  {
    "id": 2,
    "status": "idle",
    "request": "",
    "request-id": 0
  },
  ...
]
}

Example

// Connect to a local SRP Engine Service, get its status, and then close 
TcpClientHandle = 0 
If SRP_TcpClient(TcpClientHandle, "CONNECT", "127.0.0.1", "7777") then 
   Status = SRP_TcpClient(TcpClientHandle, "STATUS_SES")  
   SRP_TcpClient(TcpClientHandle, "CLOSE_SES") 
end
  • No labels