|
rby1-sdk
|
Robot command stream handler for continuous command sending. More...
#include <robot.h>
Public Member Functions | |
| void | Cancel () |
| bool | IsDone () const |
| Check if the command stream is complete. | |
| RobotCommandFeedback | RequestFeedback (int timeout_ms=1000) |
| Request feedback from the current command stream. | |
| RobotCommandFeedback | SendCommand (const RobotCommandBuilder &builder, int timeout_ms=1000) |
| Send a command through the stream. | |
| void | Wait () |
| Wait for the command stream to complete. | |
| bool | WaitFor (int timeout_ms) |
| Wait for the command stream to complete with timeout. | |
Friends | |
| class | RobotImpl< T > |
Robot command stream handler for continuous command sending.
Provides a streaming interface for sending multiple commands to the robot in sequence while maintaining a persistent connection. This is more efficient than creating individual command handlers for each command.
| T | Robot model type |
| bool rb::RobotCommandStreamHandler< T >::IsDone | ( | ) | const |
Check if the command stream is complete.
| RobotCommandFeedback rb::RobotCommandStreamHandler< T >::RequestFeedback | ( | int | timeout_ms = 1000 | ) |
Request feedback from the current command stream.
Requests current controller state information from the ongoing command execution. The feedback includes control errors, target vs actual positions, and execution status.
| timeout_ms | Timeout for receiving controller feedback in milliseconds (default: 1000). |
| RobotCommandFeedback rb::RobotCommandStreamHandler< T >::SendCommand | ( | const RobotCommandBuilder & | builder, |
| int | timeout_ms = 1000 ) |
Send a command through the stream.
Sends a command via the established stream connection and waits for feedback. The command is executed asynchronously by the robot, and this method returns current controller state information (e.g., position error, control status).
| builder | Command builder containing the command to send. |
| timeout_ms | Timeout for receiving controller feedback in milliseconds (default: 1000). This is the time to wait for controller state information, not the command execution timeout. |
| void rb::RobotCommandStreamHandler< T >::Wait | ( | ) |
Wait for the command stream to complete.
This method blocks until the stream is closed or cancelled.
| bool rb::RobotCommandStreamHandler< T >::WaitFor | ( | int | timeout_ms | ) |
Wait for the command stream to complete with timeout.
| timeout_ms | Timeout in milliseconds. |