7.9 Task Execution Section
7.9 Task Execution Section
Section titled “7.9 Task Execution Section”7.9.1 Overview
Section titled “7.9.1 Overview”AimMaster provides a guided task feature, allowing users to create guided tasks on AimMaster and use programmatic interfaces for invocation and other operations.
Note that task creation, editing, deletion, and other operations still need to be performed through the AimMaster software. The programmatic interface only provides basic functions such as starting, pausing, and canceling tasks.
7.9.2 Single Task Information RPC Interface
Section titled “7.9.2 Single Task Information RPC Interface”| Interface Name | pb:/aimdk.protocol.TaskEngineService/GetTask |
|---|---|
| Function Summary | Retrieve execution information for a single task |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:57881/rpc/aimdk.protocol.TaskEngineService/GetTask |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/task_engine/get_task.sh |
| Notes |
7.9.3 All Tasks Information RPC Interface
Section titled “7.9.3 All Tasks Information RPC Interface”| Interface Name | pb:/aimdk.protocol.TaskEngineService/GetAllTasks |
|---|---|
| Function Summary | Retrieve execution information for all tasks |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:57881/rpc/aimdk.protocol.TaskEngineService/GetAllTasks |
| Input Parameters | |
| Output Parameters | The fields are the same as the single task information interface, but it includes information and execution status for all tasks. |
| Example Script | examples/task_engine/get_all_tasks.sh |
| Notes |
7.9.4 Task Execution RPC Interface
Section titled “7.9.4 Task Execution RPC Interface”The task execution interface requires the use of two interfaces: first, call SetCurrentTask to set the current task, then call LaunchTask to start the task.
Before calling LaunchTask to start a task, you must switch the SM (System State Management) module to the Auto functional group. This is achieved by executing the following synchronous interface:
curl -i -H 'content-type:application/json' -X POST 'http://192.168.100.110:51056/rpc/aimdk.protocol.SystemService/MigrateSystemStateSync' -d '{"state": "Auto"}'If this step is not performed, the call may return the result res: ReturnType_FAIL_UNKNOWN.
| Interface Name | pb:/aimdk.protocol.TaskEngineService/SetCurrentTask |
|---|---|
| Function Summary | Set the current task |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:57881/rpc/aimdk.protocol.TaskEngineService/SetCurrentTask |
| Input Parameters | |
| Output Parameters |
|
| Example Script | examples/task_engine/set_current_task.sh |
| Notes | Cannot be called when a task is currently executing |
| Interface Name | pb:/aimdk.protocol.TaskEngineService/LaunchTask |
|---|---|
| Function Summary | Start task execution |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:57881/rpc/aimdk.protocol.TaskEngineService/LaunchTask |
| Input Parameters | |
| Output Parameters |
|
| Example Script | examples/task_engine/launch_task.sh |
| Notes |
|
7.9.5 Task Control RPC Interface
Section titled “7.9.5 Task Control RPC Interface”| Interface Name | pb:/aimdk.protocol.TaskEngineService/CtrlTaskState |
|---|---|
| Function Summary | Control task pause, resume, stop, etc. |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:57881/rpc/aimdk.protocol.TaskEngineService/CtrlTaskState |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/task_engine/ctrl_task_state.sh |
| Notes |