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

Est dérivée de TCPTalks.

Fonctions membres publiques

 __init__ (self, ID, ip="192.168.12.1", port=_BEACON_PORT)
 
 reset_ressources (self)
 
 get_ressource (self, name)
 
 release_ressource (self, name)
 
 is_active (self)
 
 get_brother_pos (self)
 
 get_opponents_pos (self)
 
 get_side (self)
 
 get_final_orientation (self)
 

Fonctions membres protégées

 _refresh (self)
 
 _get_my_pos (self)
 
 _get_my_final_orientation (self)
 

Description détaillée

The Global sync client is used to interconnect robots or beacon using TCPTalks protocol

Args:
    TCPTalks (class): The TCPTalks client class

Documentation des constructeurs et destructeur

◆ __init__()

global_sync.ClientGS.__init__ ( self,
ID,
ip = "192.168.12.1",
port = _BEACON_PORT )
Initialize the client with its id and ip,port. The id is the robot or beacon id (ex: _BORNIBUS_ID)

Args:
    ID (int): Robot or beacon id
    ip (str, optional): The server ip. Defaults to "192.168.12.1".
    port (int, optional): The server port. Defaults to _BEACON_PORT.
Voici le graphe d'appel pour cette fonction :

Documentation des fonctions membres

◆ _get_my_final_orientation()

global_sync.ClientGS._get_my_final_orientation ( self)
protected
Used internally to return the wheatervane orientation, redifined by EY

Returns:
    None
Voici le graphe des appelants de cette fonction :

◆ _get_my_pos()

global_sync.ClientGS._get_my_pos ( self)
protected
Internal method to give my pos to my brother, by default, return my pos outise of the game area, it can be redefined by the Robot Client

Returns:
    tuple: my x, y, theta position
Voici le graphe des appelants de cette fonction :

◆ _refresh()

global_sync.ClientGS._refresh ( self)
protected
Refresh

Returns:
    Bool : true
Voici le graphe des appelants de cette fonction :

◆ get_brother_pos()

global_sync.ClientGS.get_brother_pos ( self)
Get the pos of our brother robot in order to avoid it

Returns:
    tuple: The brother x, y, theta position
Voici le graphe d'appel pour cette fonction :

◆ get_final_orientation()

global_sync.ClientGS.get_final_orientation ( self)
Get final wheathervane orientation

Returns:
    int: the orientation
Voici le graphe d'appel pour cette fonction :

◆ get_opponents_pos()

global_sync.ClientGS.get_opponents_pos ( self)
Get the opponent pos from the supervior beacon that can detect oppoenets whith the ArUco tags

Returns:
    list of tuple: The the all opponents [(x, y, theta), (x, y, theta)] position
Voici le graphe d'appel pour cette fonction :

◆ get_ressource()

global_sync.ClientGS.get_ressource ( self,
name )
Distributed mutex to lock resources on the server (ex: access to a shared action)

Args:
    name (string): The ressource name

Returns:
    Bool: Exist or not
Voici le graphe d'appel pour cette fonction :

◆ get_side()

global_sync.ClientGS.get_side ( self)
Get the side configured on the robot

Returns:
    int : Side color
Voici le graphe d'appel pour cette fonction :

◆ is_active()

global_sync.ClientGS.is_active ( self)
Check if the client and server is connected

Returns:
    bool : Connected or not
Voici le graphe d'appel pour cette fonction :

◆ release_ressource()

global_sync.ClientGS.release_ressource ( self,
name )
Distributed mutex to unlock resources on the server (ex: access to a shared action)

Args:
    name (string): The ressource name
Voici le graphe d'appel pour cette fonction :

◆ reset_ressources()

global_sync.ClientGS.reset_ressources ( self)
Reset all server ressources
Voici le graphe d'appel pour cette fonction :

La documentation de cette classe a été générée à partir du fichier suivant :