TraveSim Adapters
0.1
Protobuf adapters for TraveSim project
|
TeamsConfigurer class definition. More...
#include "teams_configurer.hpp"
Public Types | |
enum | TeamColor { YELLOW, BLUE } |
Team color enumeration type. More... | |
Public Member Functions | |
TeamsConfigurer (void) | |
Construct a new TeamsConfigurer object. More... | |
std::string | get_address (TeamColor color) |
Get the configured address of a team. More... | |
uint16_t | get_port (TeamColor color) |
Get the configured port of a team. More... | |
bool | get_specific_source (void) |
Get the specific_source config. More... | |
![]() | |
AdapterConfigurer (void) | |
Construct a new AdapterConfigurer object. More... | |
AdapterConfigurer (std::string config_namespace) | |
Construct a new AdapterConfigurer object. More... | |
bool | get_reset (void) |
Get the reset config. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &output, const TeamsConfigurer &teams_conf) |
Output stream operator overloading. More... | |
Additional Inherited Members | |
![]() | |
bool | reconfigured |
travesim_adapters::TeamsConfig | config |
boost::recursive_mutex | mutex |
TeamsConfigurer class definition.
Definition at line 28 of file teams_configurer.hpp.
Team color enumeration type.
Enumerator | |
---|---|
YELLOW | |
BLUE |
Definition at line 34 of file teams_configurer.hpp.
travesim::TeamsConfigurer::TeamsConfigurer | ( | void | ) |
Construct a new TeamsConfigurer object.
Definition at line 28 of file teams_configurer.cpp.
std::string travesim::TeamsConfigurer::get_address | ( | TeamColor | color | ) |
Get the configured address of a team.
color | Color of the team to get the address |
Definition at line 32 of file teams_configurer.cpp.
References travesim::check_valid_ip(), travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::config, travesim::get_error_msg(), INVALID_ADDRESS, MAX_UNICAST_ADDRESS, MIN_UNICAST_ADDRESS, travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::mutex, and travesim::VALID.
uint16_t travesim::TeamsConfigurer::get_port | ( | TeamColor | color | ) |
Get the configured port of a team.
color | Color of the team to get the port |
Definition at line 54 of file teams_configurer.cpp.
References travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::config, and travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::mutex.
bool travesim::TeamsConfigurer::get_specific_source | ( | void | ) |
Get the specific_source config.
Definition at line 64 of file teams_configurer.cpp.
References travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::config, and travesim::AdapterConfigurer< travesim_adapters::TeamsConfig >::mutex.
|
friend |
Output stream operator overloading.
Definition at line 69 of file teams_configurer.cpp.