GT RoboCup SSL
Soccer software, robot firmware
NetworkRadio Class Reference

Interface for the radio over regular network interface. More...

Public Member Functions

 NetworkRadio (int server_port)
 
virtual bool isOpen () const override
 
virtual void send (Packet::RadioTx &packet) override
 
virtual void receive () override
 
virtual void switchTeam (bool) override
 
- Public Member Functions inherited from Radio
virtual void channel (int n)
 
int channel () const
 
bool hasReversePackets ()
 
const Packet::RadioRx popReversePacket ()
 
void clear ()
 

Protected Types

using RobotIpMap = boost::bimaps::bimap< boost::bimaps::multiset_of< int >, boost::bimaps::set_of< boost::asio::ip::udp::endpoint > >
 

Protected Member Functions

bool open ()
 
void receivePacket (const boost::system::error_code &error, std::size_t num_bytes)
 
void startReceive ()
 
void registerRobot (int robot, boost::asio::ip::udp::endpoint ip)
 

Protected Attributes

RobotIpMap _robot_ip_map
 
boost::asio::io_service _context
 
boost::asio::ip::udp::socket _socket
 
std::array< char, rtp::ReverseSize > _recv_buffer
 
boost::asio::ip::udp::endpoint _robot_endpoint
 
std::vector< std::array< uint8_t, rtp::HeaderSize+sizeof(rtp::RobotTxMessage)> > _send_buffers
 
- Protected Attributes inherited from Radio
std::deque< Packet::RadioRx > _reversePackets
 
std::mutex _reverse_packets_mutex
 
int _channel
 

Detailed Description

Interface for the radio over regular network interface.

TODO(Kyle): Clean this up by removing dual-radio support.

+ Inheritance diagram for NetworkRadio:
+ Collaboration diagram for NetworkRadio:

The documentation for this class was generated from the following files: