Est dérivée de TCPTalksServer.
The global sync server used to communicate between robots and beacon over TCPTalks
Args:
TCPTalksServer (Class): The TCPTalks server
◆ _get_final_orientation()
global_sync.ServerGS._get_final_orientation |
( |
| self | ) |
|
|
protected |
Return the final orientation come from the eyeClient
Returns:
int: The final wheathervane orientation
◆ _is_ok()
global_sync.ServerGS._is_ok |
( |
| self, |
|
|
| idx ) |
|
protected |
Check if the client is joinable
Args:
idx (int): Client id
Returns:
bool: Yes or no
◆ _reset()
global_sync.ServerGS._reset |
( |
| self | ) |
|
|
protected |
Called when a ressources reset is requested by a client
◆ get_opponents_pos()
global_sync.ServerGS.get_opponents_pos |
( |
| self | ) |
|
Return the position of the opponents, by default outisde of the playing area, it is redified inised supervisor server
Returns:
[type]: [description]
◆ get_pos()
global_sync.ServerGS.get_pos |
( |
| self, |
|
|
| idx ) |
Return the pos of the requested robot, return outise of playing area if the robot doesn't exist
Args:
idx (int): the Robto id
Returns:
tuple : The position of the robot
◆ get_ressource()
global_sync.ServerGS.get_ressource |
( |
| self, |
|
|
| idx, |
|
|
| name ) |
Lock a shared mutex with the other robot
Args:
idx (int): The robot id
name (string): The ressource name
Raises:
RuntimeError: execution error
Returns:
bool: True or false
◆ get_side()
global_sync.ServerGS.get_side |
( |
| self | ) |
|
Get the side configured on robot
Returns:
int: Color side
◆ release_ressource()
global_sync.ServerGS.release_ressource |
( |
| self, |
|
|
| idx, |
|
|
| name ) |
Unlock a shared mutex with the other robot
Args:
idx (int): The robot id
name (string): The ressource name
Raises:
RuntimeError: execution error
◆ run()
global_sync.ServerGS.run |
( |
| self | ) |
|
The server main loop to handle client connection
◆ set_side()
global_sync.ServerGS.set_side |
( |
| self, |
|
|
| side ) |
Set the side from the robot configuration
Args:
side (int): The color side
La documentation de cette classe a été générée à partir du fichier suivant :
- C:/Users/boris/Desktop/robotique/team2024/raspberrypi/beacons/global_sync.py