Client

The class Client is implemented in file client.py and has this methods:

class wrpclient.client.Client

Represents client that can establish connection with the WRP server and ask for the list of available cameras

connect(ip_address, port=8754, timeout=10)

Connect client to the server with given IP address and port. ValueError exception is raised when client is already connected.

Params

  • ip_address: str, IP address of the WRP server
  • port: int, port of the WRP server
  • timeout: int, time in seconds that is given to the server to response until TimeoutError exception is raised

Return

None

connect_async(ip_address, port)

Asynchronously connect client to the server with given IP address and port. ValueError exception is raised when client is already connected.

Params

  • ip_address: str, IP address of the WRP server
  • port: int, port of the WRP server

Return

None

disconnect(timeout=10)

Disconnect client from the server. ValueError exception is raised when client is not connected.

Params

  • timeout: int, time in seconds that is given to the server to response until TimeoutError exception is raised

Return

None

disconnect_async()

Asynchronously disconnect client from the server. ValueError exception is raised when client is not connected.

Params

None

Return

None

get_camera(serial_number, timeout=10)

Get camera with the given serial number. First client must be connected to the server. If he is not in the connected state, ValueError exception is raised. If there is no camera with the given serial number available, ValueError exception is also raised.

Params

  • timeout: int, time in seconds that is given to the server to response until TimeoutError exception is raised

Return

instance of Camera

get_camera_async(serial_number)

Get camera with the given serial number. First client must be connected to the server. If he is not in the connected state, ValueError exception is raised. If there is no camera with the given serial number available, ValueError exception is also raised.

Params

None

Return

instance of Camera

get_cameras(timeout=10)

Get list of all cameras connected to the server. First client must be connected to the server. If he is not in the connected state, ValueError exception is raised.

Params

  • timeout: int, time in seconds that is given to the server to response until TimeoutError exception is raised

Return

list of instances of Camera

get_cameras_async()

Asynchronously get list of all cameras connected to the server. First client must be connected to the server. If he is not in the connected state, ValueError exception is raised.

Params

None

Return

list of instances of Camera

is_connected()

Determine whether client is connected to the WRP server.

Params

None

Return

bool