|
GKD.RoboCtrl
RoboMaster Linux 电控:异步 IO、设备驱动与机器人控制
|
UDP 通信端点。 更多...
#include <udp.h>


类 | |
| struct | info_type |
| UDP 初始化参数。 更多... | |
Public 成员函数 | |
| udp (info_type info) | |
| 构造并连接到指定远端。 | |
| void | start () |
| 启动 UDP 接收协程;重复调用不会重复启动。 | |
| awaitable< void > | send (byte_span data) |
| 异步发送一段字节数据。 | |
| awaitable< void > | task () |
| 接收循环任务。 | |
| std::string | desc () const |
| 返回 UDP 端点描述。 | |
Public 成员函数 继承自 roboctrl::io::bare_io_base | |
| void | on_data (callback_fn< byte_span > auto fn) |
| 注册字节级别的回调。 | |
| template<detail::typed_callback_fn Fn> requires (!std::same_as<std::remove_cvref_t<utils::function_arg_t<Fn>>,byte_span>) | |
| void | on_data (Fn &&fn) |
Public 成员函数 继承自 roboctrl::utils::immovable_base | |
| immovable_base (immovable_base &&)=delete | |
| immovable_base & | operator= (immovable_base &&)=delete |
Public 成员函数 继承自 roboctrl::utils::not_copyable_base | |
| not_copyable_base (const not_copyable_base &)=delete | |
| not_copyable_base & | operator= (const not_copyable_base &)=delete |
额外继承的成员函数 | |
Protected 成员函数 继承自 roboctrl::io::bare_io_base | |
| void | dispatch (byte_span bytes) |
| 分发收到的字节流。 | |
| udp::udp | ( | info_type | info | ) |
| roboctrl::awaitable< void > udp::send | ( | byte_span | data | ) |
| void udp::start | ( | ) |
| roboctrl::awaitable< void > udp::task | ( | ) |