16 #include <boost/asio.hpp> 24 #define BUFFER_SIZE 1024U 25 #define CLEAR_TERMINAL "\033[2J\033[H" 31 int main(
int argc,
char* argv[]) {
32 const std::string receiver_address =
"127.0.0.1";
33 const short receiver_port = 20011;
38 boost::asio::io_context io_context;
39 boost::asio::steady_timer my_timer(io_context);
43 bool received_new_msg = yellow_receiver.
receive(&team_yellow_cmd);
45 if (received_new_msg) {
49 my_timer.expires_after(std::chrono::milliseconds(1));
52 }
catch (std::exception& e) {
53 std::cerr <<
"Exception: " << e.what() <<
"\n";
Team control data receiver with UDP and protobuf.
Data structure to hold the command for a team.
int main(int argc, char *argv[])
Team control data receiver class with UDP and protobuf.
bool receive(TeamCommand *p_team_cmd)
Receive the command from a team.