rofunc.devices.emg.src.delsystream#
1. Module Contents#
1.1. Classes#
This class implements an abstraction for sensors. It is not used in the current implementation |
1.2. Functions#
All commands sent to the Delsys controller must be escaped properly |
|
Convert raw byte data from socket connection to floating point numbers |
|
Generates filenames from an instance of a sensor class. NOT used in the current implementation |
|
This function opens, reads, and returns a settings dict from the Delsys JSON preference file |
|
Creates timestamped filenames for EMG and accelerometer data streams |
|
Converts filenames to actual file descriptors used for writing |
|
Closes file descriptors at the end of an experiment |
|
1.3. API#
- rofunc.devices.emg.src.delsystream.command_escaper(command)[source]#
All commands sent to the Delsys controller must be escaped properly
- rofunc.devices.emg.src.delsystream.bytes_to_raw_array(data, format_str)[source]#
Convert raw byte data from socket connection to floating point numbers
- rofunc.devices.emg.src.delsystream.filename_formatter(sensor_class)[source]#
Generates filenames from an instance of a sensor class. NOT used in the current implementation
- rofunc.devices.emg.src.delsystream.open_JSON_settings()[source]#
This function opens, reads, and returns a settings dict from the Delsys JSON preference file
- rofunc.devices.emg.src.delsystream.create_filnames(sensor_types)[source]#
Creates timestamped filenames for EMG and accelerometer data streams
- rofunc.devices.emg.src.delsystream.open_fds(filename_list)[source]#
Converts filenames to actual file descriptors used for writing
- rofunc.devices.emg.src.delsystream.close_fds(fd_list)[source]#
Closes file descriptors at the end of an experiment
- class rofunc.devices.emg.src.delsystream.Controller(address=None, run_duration=None, is_daemon=False)[source]#
Bases:
threading.Thread- start_str = b'START'#
- stop_str = b'STOP'#
- class rofunc.devices.emg.src.delsystream.DataStreamer(file_descriptor=None, address=None, byte_size=None, sensor_IDs=None, channel_labels=None, unpack_template=None, is_daemon=True)[source]#
Bases:
threading.Thread