Thunderbots Project
Loading...
Searching...
No Matches
NetworkService Class Reference

Public Member Functions

 NetworkService (const RobotId &robot_id, const std::string &ip_address, unsigned short primitive_listener_port, unsigned short robot_status_sender_port, unsigned short full_system_to_robot_ip_notification_port, unsigned short robot_to_full_system_ip_notification_port, unsigned short robot_logs_port, const std::string &interface)
 
TbotsProto::Primitive poll (TbotsProto::RobotStatus &robot_status)
 

Constructor & Destructor Documentation

◆ NetworkService()

NetworkService ( const RobotId &  robot_id,
const std::string &  ip_address,
unsigned short  primitive_listener_port,
unsigned short  robot_status_sender_port,
unsigned short  full_system_to_robot_ip_notification_port,
unsigned short  robot_to_full_system_ip_notification_port,
unsigned short  robot_logs_port,
const std::string &  interface 
)

Service that communicates with our AI Opens all the required ports and maintains them until destroyed.

Parameters
robot_idThe robot id of the robot
ip_addressThe IP Address the service should connect to
primitive_listener_portThe port to listen for primitive protos
robot_status_sender_portThe port to send robot status
full_system_to_robot_ip_notification_portThe port to listen for full system IP discovery notification
robot_to_full_system_ip_notification_portThe port to send robot IP discovery notification
robot_logs_portThe port to send logs from
interfacethe interface to listen and send on

Member Function Documentation

◆ poll()

TbotsProto::Primitive poll ( TbotsProto::RobotStatus &  robot_status)

When the network service is polled, it sends the robot_status and returns a tuple of the most recent Primitive

Returns
a tuple of the stored primitive

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