Namespace pyspacemouse::pyspacemouse
Namespace List > pyspacemouse > pyspacemouse
Classes
Type | Name |
---|---|
class | ButtonCallback |
class | ButtonState |
class | Config |
class | DeviceSpec |
class | DofCallback |
Public Attributes
Type | Name |
---|---|
AxisSpec = = namedtuple("AxisSpec", ["channel", "byte1", "byte2", "scale"]) |
|
ButtonSpec = = namedtuple("ButtonSpec", ["channel", "byte", "bit"]) |
|
SpaceNavigator = = namedtuple( | |
"SpaceNavigator", ["t", "x", "y", "z", "roll", "pitch", "yaw", "buttons"] | |
) |
|
list | button_callbacks_arr = = [ |
ButtonCallback([0], butt_0), | |
ButtonCallback([1], lambda state, buttons, pressed_buttons: print("Button 1")), | |
ButtonCallback([2, 3], butt_2_3), | |
] |
|
Union[None, DeviceSpec] | dev = = open(dof_callback=print_state, button_callback=print_buttons, button_callback_arr=button_callbacks_arr) |
dictionary | device_specs |
high_acc_clock = = timeit.default_timer |
|
Union[None, DeviceSpec] | state = = dev.read() |
supported_devices = = list(device_specs.keys()) |
Public Functions
Type | Name |
---|---|
def | butt_0 (state state, buttons buttons, pressed_buttons pressed_buttons) |
def | butt_2_3 (state state, buttons buttons, pressed_buttons pressed_buttons) |
List[ButtonCallback] | check_button_callback_arr (List button_callback_arr) |
def | check_config (callback callback=None, dof_callback dof_callback=None, dof_callback_arr dof_callback_arr=None, button_callback button_callback=None, button_callback_arr button_callback_arr=None) |
List[DofCallback] | check_dof_callback_arr (List dof_callback_arr) |
def | close () |
def | config_remove () |
def | config_set (Config config) |
def | config_set_sep (callback callback=None, dof_callback dof_callback=None, dof_callback_arr dof_callback_arr=None, button_callback button_callback=None, button_callback_arr button_callback_arr=None) |
def | list_all_hid_devices () |
def | list_available_devices () |
def | list_devices () |
Union[None, DeviceSpec] | open (Callable callback, None] callback=None, Callable dof_callback_arr, None] dof_callback=None, List dof_callback_arr=None, Callable set_nonblocking_loop, None] button_callback=None, List button_callback_arr=None, set_nonblocking_loop DeviceNumber=True, str device=None, str path=None, DeviceNumber=0) |
def | openCfg (Config config, bool set_nonblocking_loop=True, device device=None, DeviceNumber DeviceNumber=0) |
def | print_buttons (state state, buttons buttons) |
def | print_state (state state) |
def | read () |
def | silent_callback (state state) |
def | to_int16 (y1 y1, y2 y2) Simple HID code to read data from the 3dconnexion devices. |
Public Attributes Documentation
variable AxisSpec
pyspacemouse::pyspacemouse.AxisSpec;
variable ButtonSpec
pyspacemouse::pyspacemouse.ButtonSpec;
variable SpaceNavigator
pyspacemouse::pyspacemouse.SpaceNavigator;
variable button_callbacks_arr
list pyspacemouse::pyspacemouse.button_callbacks_arr;
variable dev
Union[None, DeviceSpec] pyspacemouse::pyspacemouse.dev;
variable device_specs
dictionary pyspacemouse::pyspacemouse.device_specs;
variable high_acc_clock
pyspacemouse::pyspacemouse.high_acc_clock;
variable state
Union[None, DeviceSpec] pyspacemouse::pyspacemouse.state;
variable supported_devices
pyspacemouse::pyspacemouse.supported_devices;
Public Functions Documentation
function butt_0
def pyspacemouse::pyspacemouse::butt_0 (
state state,
buttons buttons,
pressed_buttons pressed_buttons
)
function butt_2_3
def pyspacemouse::pyspacemouse::butt_2_3 (
state state,
buttons buttons,
pressed_buttons pressed_buttons
)
function check_button_callback_arr
List[ ButtonCallback ] pyspacemouse::pyspacemouse::check_button_callback_arr (
List button_callback_arr
)
function check_config
def pyspacemouse::pyspacemouse::check_config (
callback callback=None,
dof_callback dof_callback=None,
dof_callback_arr dof_callback_arr=None,
button_callback button_callback=None,
button_callback_arr button_callback_arr=None
)
function check_dof_callback_arr
List[ DofCallback ] pyspacemouse::pyspacemouse::check_dof_callback_arr (
List dof_callback_arr
)
function close
def pyspacemouse::pyspacemouse::close ()
function config_remove
def pyspacemouse::pyspacemouse::config_remove ()
function config_set
def pyspacemouse::pyspacemouse::config_set (
Config config
)
function config_set_sep
def pyspacemouse::pyspacemouse::config_set_sep (
callback callback=None,
dof_callback dof_callback=None,
dof_callback_arr dof_callback_arr=None,
button_callback button_callback=None,
button_callback_arr button_callback_arr=None
)
function list_all_hid_devices
def pyspacemouse::pyspacemouse::list_all_hid_devices ()
function list_available_devices
def pyspacemouse::pyspacemouse::list_available_devices ()
function list_devices
def pyspacemouse::pyspacemouse::list_devices ()
function open
Union[None, DeviceSpec ] pyspacemouse::pyspacemouse::open (
Callable callback,
None] callback=None,
Callable dof_callback_arr,
None] dof_callback=None,
List dof_callback_arr=None,
Callable set_nonblocking_loop,
None] button_callback=None,
List button_callback_arr=None,
set_nonblocking_loop DeviceNumber=True,
str device=None,
str path=None,
DeviceNumber=0
)
function openCfg
def pyspacemouse::pyspacemouse::openCfg (
Config config,
bool set_nonblocking_loop=True,
device device=None,
DeviceNumber DeviceNumber=0
)
function print_buttons
def pyspacemouse::pyspacemouse::print_buttons (
state state,
buttons buttons
)
function print_state
def pyspacemouse::pyspacemouse::print_state (
state state
)
function read
def pyspacemouse::pyspacemouse::read ()
function silent_callback
def pyspacemouse::pyspacemouse::silent_callback (
state state
)
function to_int16
def pyspacemouse::pyspacemouse::to_int16 (
y1 y1,
y2 y2
)
The documentation for this class was generated from the following file pyspacemouse/pyspacemouse.py