Holodeck Client¶
The client used for subscribing shared memory between python and c++.
Classes:
|
HolodeckClient for controlling a shared memory session. |
-
class
holodeck.holodeckclient.
HolodeckClient
(uuid='', should_timeout=False)¶ HolodeckClient for controlling a shared memory session.
- Parameters
uuid (
str
, optional) – A UUID to indicate which server this client is associated with. The same UUID should be passed to the world through a command line flag. Defaults to “”.should_timeout (
boolean
, optional) – If the client should time out after 5s waitingthe engine (for) –
Methods:
acquire
()Used to acquire control.
malloc
(key, shape, dtype)Allocates a block of shared memory, and returns a numpy array whose data corresponds with that block.
release
()Used to release control.
-
acquire
()¶ Used to acquire control. Will wait until the HolodeckServer has finished its work.
-
malloc
(key, shape, dtype)¶ Allocates a block of shared memory, and returns a numpy array whose data corresponds with that block.
- Parameters
key (
str
) – The key to identify the block.shape (
list
ofint
) – The shape of the numpy array to allocate.dtype (type) – The numpy data type (e.g. np.float32).
- Returns
The numpy array that is positioned on the shared memory.
- Return type
np.ndarray
-
release
()¶ Used to release control. Will allow the HolodeckServer to take a step.