AR namespace
Subpackages
AR.source.Server module
Start an http server on localhost:5002
- AR.source.Server.GetList() str
- Reads incoming data from Unity and call ogLabelReader to process it. Returns a list of the names of the children of an object if the request was to get them - Returns:
- a serialised JSON containing the requested data 
- Return type:
- str 
 
- AR.source.Server.GetTest() str
- Allows to test the connexion - Returns:
- the message “connected to the OGrEE-CONVERTER” 
- Return type:
- str 
 
- AR.source.Server.ReadPicture() str
- Reads incoming data from Unity and call ogLabelReader to process it. Returns a json containing tenant,site,building,room and rack if the request was to read a label - Returns:
- a serialised JSON containing the requested data 
- Return type:
- str 
 
AR.source.ogLabelReader module
Can be run independently with args to read a label in a photo
- AR.source.ogLabelReader.ObjectList()
- Not yet implemented- Get all children of an object in a database (ie all sites of a tenant, all racks of a room,…) 
- AR.source.ogLabelReader.RackSearch(img: ndarray, customerAndSite: str, deviceType: str) str
- Read the config file, then call the correct Converter to get necessary data from the image - Parameters:
- img (numpy.ndarray) – a numpy array containing an image in bytes 
- customerAndSite (str) – the name of the customer/tenant and the site where the rack is in the format {customer}.{site} 
- deviceType (str) – either “rack” or “mdi” 
 
- Returns:
- a serialised dictionnary of serialised OgreeMessage’s instances 
- Return type:
- str 
 
AR.source.ODBC module
ODBC module for dcTrack
- AR.source.ODBC.GetPosition(rackName: str | None = None, rackID: str | None = None) list
- Get the position of a rack in its room - Parameters:
- rackName (str, optional) – name of the rack, used if rackID is None, defaults to None 
- rackID (str, optional) – ID of the rack, used if not None, defaults to None 
 
- Raises:
- Exception – If rackName and rackID are None 
- Returns:
- A list containing the MinY, MinX and Frontfaces lines of the rack 
- Return type:
- list 
 
- AR.source.ODBC.GetRoomOrientation(roomName: str | None = None, roomID: str | None = None) list
- Get the orientation of a room - Parameters:
- roomName (str, optional) – name of the room, used if roomID is None, defaults to None 
- roomID (str, optional) – ID of the room, used if not None, defaults to None 
 
- Raises:
- Exception – If roomName and roomID are None 
- Returns:
- A list containing the OrientationNorthSouth and OrientationEastWest lines of the room 
- Return type:
- list 
 
- AR.source.ODBC.Init(server: str, uid: str, pwd: str, database: str = 'raritan', driver: str = '{PostgreSQL ANSI}', port: str = '2235')
- Initialise the ODBC connection - Parameters:
- server (str) – server address 
- uid (str) – user ODBC login 
- pwd (str) – user ODBC password 
- database (str, optional) – database name, defaults to “raritan” 
- driver (str, optional) – driver name, defaults to “{PostgreSQL ANSI}” 
- port (str, optional) – port number, defaults to “2235”