A lightweight client inerface for Rogue. This can be used in
scripts or as an interface to Rogue in matlab. For a more
powerfull, tree access capable client. Please see the
VirtualClient class.
To use in Matlab first you need the zmq package in your python installation:
> pip install zmq
> pip install matlab
You then need to set the appropriate flags in Matlab to load the zmq module:
>> py.sys.setdlopenflags(int32(bitor(2, 8)));
>> c = py.SimpleClient.SimpleClient(“localhost”,9099);
>> c.get(“dummyTree.Time”)
- Parameters:
addr (str, default: 'localhost') – host address
port (int, default: 9099) – host port
cb (Callable[[str, Any], None] | None, default: None) – call back function for variable updates, in the form func(path,value)
-
get(path)[source]
Get a variable value, initating a read
- Parameters:
path (str) – Path of the variable to return a value for
- Returns:
Variable value in native form
- Return type:
Any
-
getDisp(path)[source]
Get a variable value, in string form, initating a read
- Parameters:
path (str) – Path of the variable to return a value for
- Returns:
Variable value in string form
- Return type:
str
-
value(path)[source]
Get a variable value, without initating a read
- Parameters:
path (str) – Path of the variable to return a value for
- Returns:
Variable value
- Return type:
Any
-
valueDisp(path)[source]
Get a variable value, in string form, without initating a read
- Parameters:
path (str) – Path of the variable to return a value for
- Returns:
Variable value in string form
- Return type:
str
-
set(path, value)[source]
Set a variable value, using its native type
- Parameters:
-
- Return type:
Any
-
setDisp(path, value)[source]
Set a variable value, using a string representation
- Parameters:
-
- Return type:
Any
-
exec(path, arg=None)[source]
Call a command, with the optional arg
- Parameters:
path (str) – Path of the variable to set
arg (Any, default: None) – Command argument, in native or string form
- Returns:
Return value of the underlying command
- Return type:
Any