【分享贴】 首都师范大学 - RefereeProtocol-C++的裁判系统通信协议封装库
RefereeProtocol 开源地址 Github 简介 裁判系统串口协议封装库。 基于裁判系统串口协议1.6.4实现了从0x001 0x20E 范围指令码的数据类型。 用途 提供符合裁判系统串口协议的字节流与数据的转换实现。 用法 cpp include <referee_protocol/referee_protocol.h include <iostream int main() { rp::GameResult result1{.winner = rp::GameResult::Winner::Blue}; rp::Frame<rp::GameResult result_frame1{result1}; auto bytes1 = result_frame1.ToBytes(); for (auto&& byte : bytes1) { std::cout << “ ” << std::hex << (int)byte; } std::cout << std::endl; rp::GameResult result2{}; rp::Frame
自瞄糕手