Simple Socket Service
WARNING
This feature will be deprecated soon.
Lebai robots provide two TCP/Socket services for simple task execution and status push. The features provided by these services are relatively simple, and developers need to combine other services to implement more complex control.
Task Control
Port: 5171. Sending a data stream to this service can control task execution.
Run a Task
start_task|<scene_id>|<execute_count>
| Parameter | Type | Description |
|---|---|---|
scene_id | int | Scene ID. The corresponding scene ID can be viewed in the scene list. |
execute_count | int | Number of task executions. 0: loop execution. If not 0, e.g. 3 means execute 3 times. |
Request example
start_task|100008|0
Stop a Task
stop_task|<type>
| Parameter | Type | Description |
|---|---|---|
type | int | 0: stop the loop task, it stops after the current loop cycle ends (invalid in version 2.2). 1: stop immediately. |
Request example
stop_task|0
Pause a Task
pause_task
Resume a Task
resume_task
Robot Status Notification Interface
Port: 5170. This service pushes the task and robot running status once every second.
<task_status>|<robot_mode>
| Parameter | Type | Description |
|---|---|---|
task_status | int | 0: idle 1: running |
robot_mode | int | Robot status |
Push examples
| Example | Description |
|---|---|
0|5 | No task is running, the robot is idle |
1|6 | A task is running, the robot is paused |
