CRINSA-team2024 2024
Documentation du Club Robot INSA Rennes 2024
Chargement...
Recherche...
Aucune correspondance
Référence de la classe global_sync.ServerGS

Est dérivée de TCPTalksServer.

Fonctions membres publiques

 run (self)
 
 get_pos (self, idx)
 
 get_opponents_pos (self)
 
 get_ressource (self, idx, name)
 
 release_ressource (self, idx, name)
 
 set_side (self, side)
 
 get_side (self)
 

Fonctions membres protégées

 _reset (self)
 
 _is_ok (self, idx)
 
 _get_final_orientation (self)
 

Description détaillée

The global sync server used to communicate between robots and beacon over TCPTalks

Args:
    TCPTalksServer (Class): The TCPTalks server

Documentation des fonctions membres

◆ _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
Voici le graphe d'appel pour cette fonction :

◆ _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
Voici le graphe d'appel pour cette fonction :

◆ _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
Voici le graphe d'appel pour cette fonction :

◆ 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
Voici le graphe d'appel pour cette fonction :

◆ 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
Voici le graphe d'appel pour cette fonction :

◆ 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 :