unrealcv
Public Member Functions | Public Attributes | List of all members
unrealcv.Client Class Reference
Inheritance diagram for unrealcv.Client:

Public Member Functions

def __init__ (self, endpoint, message_handler=None)
 
def worker (self)
 
def request (self, message, timeout=5)
 

Public Attributes

 response
 
 raw_message_regexp
 
 message_client
 
 message_handler
 
 message_id
 
 wait_response
 
 isconnected
 
 connect
 
 disconnect
 
 queue
 
 main_thread
 

Detailed Description

Client can be used to send request to a game and get response
Currently only one client is allowed at a time
More clients will be rejected

Member Function Documentation

§ request()

def unrealcv.Client.request (   self,
  message,
  timeout = 5 
)
Send a request to server and wait util get a response from server or timeout.

Parameters
---
cmd : string, command to control the game
More info can be seen from http://unrealcv.github.io/commands.html

Returns
---
response: plain text message from server

Examples
---
>>> client = Client('localhost', 9000)
>>> client.connect()
>>> response = client.request('vget /camera/0/view')

The documentation for this class was generated from the following file: