OTBQuattrocentoLight(BaseDevice)¶
- Quattrocento Light class for real-time interface to Quattrocento using OT Biolab Light. 
- Quattrocento class for direct real-time interface to Quattrocento without using OT Biolab Light. 
Developer: Dominik I. Braun Contact: dome.braun@fau.de Last Update: 2023-06-05
- class biosignal_device_interface.devices.otb.otb_quattrocento_light.OTBQuattrocentoLight(self, parent: PySide6.QtCore.QObject | None = None)[source]¶
- Bases: - BaseDevice- QuattrocentoLight device class derived from BaseDevice class. The QuattrocentoLight is using a TCP/IP protocol to communicate with the device. - This class directly interfaces with the OT Biolab Light software from OT Bioelettronica. The configured settings of the device have to match the settings from the OT Biolab Light software! - Initialize self. See help(type(self)) for accurate signature. - Parameters:
- parent (Union[QMainWindow, QWidget]) 
 - _connect_to_device()[source]¶
- Function to attempt a connection to the devices. - Returns:
- Success of the connection attempt. 
- Return type:
 
 - _disconnect_from_device()[source]¶
- Closes the connection to the device. - self.interface closes and is set to None. Device state is_connected is set to False. Signal connected_signal emits False. - Returns:
- Success of the disconnection attempt. 
- Return type:
 
 - _make_request()[source]¶
- Requests a connection or checks if someone connected to the server. After connection is successful, the Signal connected_signal emits True and sets the current state is_connected to True. - Returns:
- Returns True if request was successfully. False if not. 
- Return type:
 
 - _process_data(input)[source]¶
- Decodes the transmitted bytes and convert them to respective output format (e.g., mV). - Emits the processed data through the Signal data_available_signal which can be connected to a function using: {self.device}.data_available_signal.connect(your_custom_function). - This works perfectly fine outside of this class. - Your custom function your_custom_function needs to have a parameter “data” which is of type np.ndarray. - In case that the current configuration of the device was requested, the configuration is provided through the Signal configuration_available_signal that emits the current parameters in a dictionary. - Parameters:
- input (bytearray) – Bytearray of the transmitted raw data. 
- Return type:
- None 
 
 - _read_data()[source]¶
- This function is called when bytes are ready to be read in the buffer. After reading the bytes from the buffer, _process_data is called to decode and process the raw data. - Return type:
- None 
 
 - _start_streaming()[source]¶
- Sends the command to start the streaming to the device. - if successful:
- Device state is_streaming is set to True. Signal streaming_signal emits True. 
 - Return type:
- None 
 
 - _stop_streaming()[source]¶
- Sends the command to stop the streaing to the device - if successful:
- Device state is_streaming is set to False. Signal streaming_signal emits False. 
 - Return type:
- None 
 
 - configure_device(params)[source]¶
- Sends a configuration byte sequence based on selected params to the device. An overview of possible configurations can be seen in biosignal_device_interface/constants/{device}.py. - E.g., enums/sessantaquattro.py - Parameters:
- params (Dict[str, Union[Enum, Dict[str, Enum]]]) – - Dictionary that holds the configuration settings to which the device should be configured to. - The first one should be the attributes (configuration mode) name, and the second its respective value. Orient yourself on the enums of the device to choose the correct configuration settings. 
- Return type:
- None