def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletMultiTouch.FUNCTION_GET_TOUCH_STATE ] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletMultiTouch.FUNCTION_RECALIBRATE] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletMultiTouch.FUNCTION_SET_ELECTRODE_CONFIG ] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletMultiTouch.FUNCTION_GET_ELECTRODE_CONFIG ] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletMultiTouch.CALLBACK_TOUCH_STATE ] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletMultiTouch.FUNCTION_SET_ELECTRODE_SENSITIVITY ] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletMultiTouch.FUNCTION_GET_ELECTRODE_SENSITIVITY ] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletMultiTouch.FUNCTION_GET_IDENTITY ] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletMultiTouch.CALLBACK_TOUCH_STATE] = "H"
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletRotaryPoti.FUNCTION_GET_POSITION] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_ANALOG_VALUE] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_SET_POSITION_CALLBACK_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_POSITION_CALLBACK_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_SET_POSITION_CALLBACK_THRESHOLD] = BrickletRotaryPoti.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_POSITION_CALLBACK_THRESHOLD] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletRotaryPoti.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryPoti.FUNCTION_GET_IDENTITY] = BrickletRotaryPoti.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRotaryPoti.CALLBACK_POSITION] = 'h' self.callback_formats[BrickletRotaryPoti.CALLBACK_ANALOG_VALUE] = 'H' self.callback_formats[BrickletRotaryPoti.CALLBACK_POSITION_REACHED] = 'h' self.callback_formats[BrickletRotaryPoti.CALLBACK_ANALOG_VALUE_REACHED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickHAT.FUNCTION_SET_SLEEP_MODE] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_GET_SLEEP_MODE] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_SET_BRICKLET_POWER] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_GET_BRICKLET_POWER] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_GET_VOLTAGES] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_SET_BOOTLOADER_MODE] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_GET_BOOTLOADER_MODE] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_WRITE_FIRMWARE] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_SET_STATUS_LED_CONFIG] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_GET_STATUS_LED_CONFIG] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_GET_CHIP_TEMPERATURE] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_RESET] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_WRITE_UID] = BrickHAT.RESPONSE_EXPECTED_FALSE self.response_expected[BrickHAT.FUNCTION_READ_UID] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickHAT.FUNCTION_GET_IDENTITY] = BrickHAT.RESPONSE_EXPECTED_ALWAYS_TRUE
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletHeartRate.FUNCTION_GET_HEART_RATE] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHeartRate.FUNCTION_SET_HEART_RATE_CALLBACK_PERIOD] = BrickletHeartRate.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHeartRate.FUNCTION_GET_HEART_RATE_CALLBACK_PERIOD] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHeartRate.FUNCTION_SET_HEART_RATE_CALLBACK_THRESHOLD] = BrickletHeartRate.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHeartRate.FUNCTION_GET_HEART_RATE_CALLBACK_THRESHOLD] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHeartRate.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletHeartRate.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHeartRate.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHeartRate.CALLBACK_HEART_RATE] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletHeartRate.CALLBACK_HEART_RATE_REACHED] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletHeartRate.CALLBACK_BEAT_STATE_CHANGED] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletHeartRate.FUNCTION_ENABLE_BEAT_STATE_CHANGED_CALLBACK] = BrickletHeartRate.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHeartRate.FUNCTION_DISABLE_BEAT_STATE_CHANGED_CALLBACK] = BrickletHeartRate.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHeartRate.FUNCTION_IS_BEAT_STATE_CHANGED_CALLBACK_ENABLED] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHeartRate.FUNCTION_GET_IDENTITY] = BrickletHeartRate.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletHeartRate.CALLBACK_HEART_RATE] = 'H' self.callback_formats[BrickletHeartRate.CALLBACK_HEART_RATE_REACHED] = 'H' self.callback_formats[BrickletHeartRate.CALLBACK_BEAT_STATE_CHANGED] = 'B'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletTemperatureIR.FUNCTION_GET_AMBIENT_TEMPERATURE] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_OBJECT_TEMPERATURE] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_EMISSIVITY] = BrickletTemperatureIR.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_EMISSIVITY] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_AMBIENT_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_OBJECT_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_OBJECT_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_AMBIENT_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperatureIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_OBJECT_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperatureIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_OBJECT_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperatureIR.CALLBACK_AMBIENT_TEMPERATURE] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletTemperatureIR.CALLBACK_OBJECT_TEMPERATURE] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletTemperatureIR.CALLBACK_AMBIENT_TEMPERATURE_REACHED] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletTemperatureIR.CALLBACK_OBJECT_TEMPERATURE_REACHED] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletTemperatureIR.FUNCTION_GET_IDENTITY] = BrickletTemperatureIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletTemperatureIR.CALLBACK_AMBIENT_TEMPERATURE] = 'h' self.callback_formats[BrickletTemperatureIR.CALLBACK_OBJECT_TEMPERATURE] = 'h' self.callback_formats[BrickletTemperatureIR.CALLBACK_AMBIENT_TEMPERATURE_REACHED] = 'h' self.callback_formats[BrickletTemperatureIR.CALLBACK_OBJECT_TEMPERATURE_REACHED] = 'h'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletPressure.FUNCTION_GET_PRESSURE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_ANALOG_VALUE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_PRESSURE_CALLBACK_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_PRESSURE_CALLBACK_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_PRESSURE_CALLBACK_THRESHOLD] = BrickletPressure.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_PRESSURE_CALLBACK_THRESHOLD] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletPressure.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletPressure.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_SENSOR_TYPE] = BrickletPressure.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPressure.FUNCTION_GET_SENSOR_TYPE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.FUNCTION_SET_MOVING_AVERAGE] = BrickletPressure.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPressure.FUNCTION_GET_MOVING_AVERAGE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPressure.CALLBACK_PRESSURE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletPressure.CALLBACK_ANALOG_VALUE] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletPressure.CALLBACK_PRESSURE_REACHED] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletPressure.CALLBACK_ANALOG_VALUE_REACHED] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletPressure.FUNCTION_GET_IDENTITY] = BrickletPressure.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletPressure.CALLBACK_PRESSURE] = 'i' self.callback_formats[BrickletPressure.CALLBACK_ANALOG_VALUE] = 'i' self.callback_formats[BrickletPressure.CALLBACK_PRESSURE_REACHED] = 'i' self.callback_formats[BrickletPressure.CALLBACK_ANALOG_VALUE_REACHED] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletPiezoSpeaker.FUNCTION_BEEP] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeaker.FUNCTION_MORSE_CODE] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletPiezoSpeaker.FUNCTION_CALIBRATE ] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletPiezoSpeaker.CALLBACK_BEEP_FINISHED ] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletPiezoSpeaker.CALLBACK_MORSE_CODE_FINISHED ] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletPiezoSpeaker.FUNCTION_GET_IDENTITY ] = BrickletPiezoSpeaker.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletPiezoSpeaker.CALLBACK_BEEP_FINISHED] = "" self.callback_formats[BrickletPiezoSpeaker.CALLBACK_MORSE_CODE_FINISHED] = ""
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletOLED128x64V2.FUNCTION_WRITE_PIXELS_LOW_LEVEL] = BrickletOLED128x64V2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_READ_PIXELS_LOW_LEVEL] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_CLEAR_DISPLAY] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_SET_DISPLAY_CONFIGURATION] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_DISPLAY_CONFIGURATION] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_WRITE_LINE] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_DRAW_BUFFERED_FRAME] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_WRITE_FIRMWARE] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_RESET] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_WRITE_UID] = BrickletOLED128x64V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletOLED128x64V2.FUNCTION_READ_UID] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletOLED128x64V2.FUNCTION_GET_IDENTITY] = BrickletOLED128x64V2.RESPONSE_EXPECTED_ALWAYS_TRUE
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_GPIO_CONFIG] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_GPIO_INPUT] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_ADC_CHANNEL_CONFIG] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_ADC_CHANNEL_CONFIG] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_ADC_CHANNEL_VALUE] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_ADC_VALUES] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_ADC_VALUES_CALLBACK_CONFIGURATION] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_ADC_VALUES_CALLBACK_CONFIGURATION] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_COUNT] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_COUNT_CALLBACK_CONFIGURATION] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_COUNT_CALLBACK_CONFIGURATION] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_BOOTLOADER_MODE] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_BOOTLOADER_MODE] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_WRITE_FIRMWARE] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_RESET] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_WRITE_UID] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletXMC1400Breakout.FUNCTION_READ_UID] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletXMC1400Breakout.FUNCTION_GET_IDENTITY] = BrickletXMC1400Breakout.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletXMC1400Breakout.CALLBACK_ADC_VALUES] = '8H' self.callback_formats[BrickletXMC1400Breakout.CALLBACK_COUNT] = 'I'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletRotaryEncoder.FUNCTION_GET_COUNT] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_SET_COUNT_CALLBACK_PERIOD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_GET_COUNT_CALLBACK_PERIOD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_SET_COUNT_CALLBACK_THRESHOLD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_GET_COUNT_CALLBACK_THRESHOLD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRotaryEncoder.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryEncoder.CALLBACK_COUNT] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRotaryEncoder.CALLBACK_COUNT_REACHED] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRotaryEncoder.FUNCTION_IS_PRESSED] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRotaryEncoder.CALLBACK_PRESSED] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRotaryEncoder.CALLBACK_RELEASED] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRotaryEncoder.FUNCTION_GET_IDENTITY] = BrickletRotaryEncoder.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRotaryEncoder.CALLBACK_COUNT] = 'i' self.callback_formats[BrickletRotaryEncoder.CALLBACK_COUNT_REACHED] = 'i' self.callback_formats[BrickletRotaryEncoder.CALLBACK_PRESSED] = '' self.callback_formats[BrickletRotaryEncoder.CALLBACK_RELEASED] = ''
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_ACCELERATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_ACCELERATION_CALLBACK_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_ACCELERATION_CALLBACK_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_INFO_LED_CONFIG] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_INFO_LED_CONFIG] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_CONTINUOUS_ACCELERATION_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_CONTINUOUS_ACCELERATION_CONFIGURATION] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_WRITE_FIRMWARE] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_RESET] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_WRITE_UID] = BrickletAccelerometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometerV2.FUNCTION_READ_UID] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometerV2.FUNCTION_GET_IDENTITY] = BrickletAccelerometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletAccelerometerV2.CALLBACK_ACCELERATION] = 'i i i' self.callback_formats[BrickletAccelerometerV2.CALLBACK_CONTINUOUS_ACCELERATION_16_BIT] = '30h' self.callback_formats[BrickletAccelerometerV2.CALLBACK_CONTINUOUS_ACCELERATION_8_BIT] = '60b'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_SET_BEEP] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_BEEP] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_SET_ALARM] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_ALARM] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_UPDATE_VOLUME] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_UPDATE_FREQUENCY] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_WRITE_FIRMWARE] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_RESET] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_WRITE_UID] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_READ_UID] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletPiezoSpeakerV2.FUNCTION_GET_IDENTITY] = BrickletPiezoSpeakerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletPiezoSpeakerV2.CALLBACK_BEEP_FINISHED] = '' self.callback_formats[BrickletPiezoSpeakerV2.CALLBACK_ALARM_FINISHED] = ''
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 2) self.response_expected[BrickletAnalogIn.FUNCTION_GET_VOLTAGE] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_ANALOG_VALUE] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.CALLBACK_VOLTAGE] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAnalogIn.CALLBACK_ANALOG_VALUE] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAnalogIn.CALLBACK_VOLTAGE_REACHED] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAnalogIn.CALLBACK_ANALOG_VALUE_REACHED] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAnalogIn.FUNCTION_SET_RANGE] = BrickletAnalogIn.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAnalogIn.FUNCTION_GET_RANGE] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_SET_AVERAGING] = BrickletAnalogIn.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAnalogIn.FUNCTION_GET_AVERAGING] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAnalogIn.FUNCTION_GET_IDENTITY] = BrickletAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletAnalogIn.CALLBACK_VOLTAGE] = 'H' self.callback_formats[BrickletAnalogIn.CALLBACK_ANALOG_VALUE] = 'H' self.callback_formats[BrickletAnalogIn.CALLBACK_VOLTAGE_REACHED] = 'H' self.callback_formats[BrickletAnalogIn.CALLBACK_ANALOG_VALUE_REACHED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletLCD16x2.FUNCTION_WRITE_LINE] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_CLEAR_DISPLAY] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_BACKLIGHT_ON] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_BACKLIGHT_OFF] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_IS_BACKLIGHT_ON] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLCD16x2.FUNCTION_SET_CONFIG] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_GET_CONFIG] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLCD16x2.FUNCTION_IS_BUTTON_PRESSED] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLCD16x2.CALLBACK_BUTTON_PRESSED] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLCD16x2.CALLBACK_BUTTON_RELEASED] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_SET_CUSTOM_CHARACTER] = BrickletLCD16x2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLCD16x2.FUNCTION_GET_CUSTOM_CHARACTER] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLCD16x2.FUNCTION_GET_IDENTITY] = BrickletLCD16x2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLCD16x2.CALLBACK_BUTTON_PRESSED] = 'B' self.callback_formats[BrickletLCD16x2.CALLBACK_BUTTON_RELEASED] = 'B'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletLoadCellV2.FUNCTION_GET_WEIGHT] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_WEIGHT_CALLBACK_CONFIGURATION] = BrickletLoadCellV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_WEIGHT_CALLBACK_CONFIGURATION] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_MOVING_AVERAGE] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_MOVING_AVERAGE] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_INFO_LED_CONFIG] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_INFO_LED_CONFIG] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_CALIBRATE] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_TARE] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_CONFIGURATION] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_CONFIGURATION] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_WRITE_FIRMWARE] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_RESET] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_WRITE_UID] = BrickletLoadCellV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCellV2.FUNCTION_READ_UID] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCellV2.FUNCTION_GET_IDENTITY] = BrickletLoadCellV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLoadCellV2.CALLBACK_WEIGHT] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_DATE_TIME] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_DATE_TIME] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_TIMESTAMP] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_OFFSET] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_OFFSET] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_DATE_TIME_CALLBACK_CONFIGURATION] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_DATE_TIME_CALLBACK_CONFIGURATION] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_ALARM] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_ALARM] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_WRITE_FIRMWARE] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_RESET] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_WRITE_UID] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRealTimeClockV2.FUNCTION_READ_UID] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRealTimeClockV2.FUNCTION_GET_IDENTITY] = BrickletRealTimeClockV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRealTimeClockV2.CALLBACK_DATE_TIME] = 'H B B B B B B B q' self.callback_formats[BrickletRealTimeClockV2.CALLBACK_ALARM] = 'H B B B B B B B q'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletGasDetector.FUNCTION_GET_VALUE] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_SET_VALUE_CALLBACK_PERIOD] = BrickletGasDetector.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletGasDetector.FUNCTION_GET_VALUE_CALLBACK_PERIOD] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_SET_VALUE_CALLBACK_THRESHOLD] = BrickletGasDetector.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletGasDetector.FUNCTION_GET_VALUE_CALLBACK_THRESHOLD] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletGasDetector.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletGasDetector.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_SET_MOVING_AVERAGE] = BrickletGasDetector.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletGasDetector.FUNCTION_GET_MOVING_AVERAGE] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_SET_DETECTOR_TYPE] = BrickletGasDetector.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletGasDetector.FUNCTION_GET_DETECTOR_TYPE] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.FUNCTION_HEATER_ON] = BrickletGasDetector.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletGasDetector.FUNCTION_HEATER_OFF] = BrickletGasDetector.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletGasDetector.FUNCTION_IS_HEATER_ON] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletGasDetector.CALLBACK_VALUE] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletGasDetector.CALLBACK_VALUE_REACHED] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletGasDetector.FUNCTION_GET_IDENTITY] = BrickletGasDetector.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletGasDetector.CALLBACK_VALUE] = 'H' self.callback_formats[BrickletGasDetector.CALLBACK_VALUE_REACHED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 3) self.response_expected[BrickletLEDStrip.FUNCTION_SET_RGB_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_RGB_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_SET_FRAME_DURATION] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_FRAME_DURATION] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_GET_SUPPLY_VOLTAGE] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_SET_CLOCK_FREQUENCY] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_CLOCK_FREQUENCY] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_SET_CHIP_TYPE] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_CHIP_TYPE] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_SET_RGBW_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_RGBW_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_SET_CHANNEL_MAPPING] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStrip.FUNCTION_GET_CHANNEL_MAPPING] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_ENABLE_FRAME_RENDERED_CALLBACK] = BrickletLEDStrip.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_DISABLE_FRAME_RENDERED_CALLBACK] = BrickletLEDStrip.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_IS_FRAME_RENDERED_CALLBACK_ENABLED] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStrip.FUNCTION_GET_IDENTITY] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLEDStrip.CALLBACK_FRAME_RENDERED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_VOLTAGE] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_SET_SAMPLE_RATE] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_SAMPLE_RATE] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_SET_CALIBRATION] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_CALIBRATION] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_ADC_VALUES] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogIn.CALLBACK_VOLTAGE] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletIndustrialDualAnalogIn.CALLBACK_VOLTAGE_REACHED] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletIndustrialDualAnalogIn.FUNCTION_GET_IDENTITY] = BrickletIndustrialDualAnalogIn.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIndustrialDualAnalogIn.CALLBACK_VOLTAGE] = 'B i' self.callback_formats[BrickletIndustrialDualAnalogIn.CALLBACK_VOLTAGE_REACHED] = 'B i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletUVLight.FUNCTION_GET_UV_LIGHT] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight.FUNCTION_SET_UV_LIGHT_CALLBACK_PERIOD ] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight.FUNCTION_GET_UV_LIGHT_CALLBACK_PERIOD ] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight.FUNCTION_SET_UV_LIGHT_CALLBACK_THRESHOLD ] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight.FUNCTION_GET_UV_LIGHT_CALLBACK_THRESHOLD ] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletUVLight.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight.FUNCTION_GET_DEBOUNCE_PERIOD ] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletUVLight.CALLBACK_UV_LIGHT] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletUVLight.CALLBACK_UV_LIGHT_REACHED ] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletUVLight.FUNCTION_GET_IDENTITY] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletUVLight.CALLBACK_UV_LIGHT] = "I" self.callback_formats[BrickletUVLight.CALLBACK_UV_LIGHT_REACHED] = "I"
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletColor.FUNCTION_GET_COLOR] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_COLOR_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletColor.FUNCTION_GET_COLOR_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_COLOR_CALLBACK_THRESHOLD] = BrickletColor.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletColor.FUNCTION_GET_COLOR_CALLBACK_THRESHOLD] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletColor.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletColor.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_LIGHT_ON] = BrickletColor.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletColor.FUNCTION_LIGHT_OFF] = BrickletColor.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletColor.FUNCTION_IS_LIGHT_ON] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_CONFIG] = BrickletColor.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletColor.FUNCTION_GET_CONFIG] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_GET_ILLUMINANCE] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_GET_COLOR_TEMPERATURE] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_ILLUMINANCE_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletColor.FUNCTION_GET_ILLUMINANCE_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_SET_COLOR_TEMPERATURE_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletColor.FUNCTION_GET_COLOR_TEMPERATURE_CALLBACK_PERIOD] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletColor.FUNCTION_GET_IDENTITY] = BrickletColor.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletColor.CALLBACK_COLOR] = 'H H H H' self.callback_formats[BrickletColor.CALLBACK_COLOR_REACHED] = 'H H H H' self.callback_formats[BrickletColor.CALLBACK_ILLUMINANCE] = 'I' self.callback_formats[BrickletColor.CALLBACK_COLOR_TEMPERATURE] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletAccelerometer.FUNCTION_GET_ACCELERATION] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_SET_ACCELERATION_CALLBACK_PERIOD] = BrickletAccelerometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_GET_ACCELERATION_CALLBACK_PERIOD] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_SET_ACCELERATION_CALLBACK_THRESHOLD] = BrickletAccelerometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_GET_ACCELERATION_CALLBACK_THRESHOLD] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletAccelerometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_GET_TEMPERATURE] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_SET_CONFIGURATION] = BrickletAccelerometer.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometer.FUNCTION_GET_CONFIGURATION] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.FUNCTION_LED_ON] = BrickletAccelerometer.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometer.FUNCTION_LED_OFF] = BrickletAccelerometer.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletAccelerometer.FUNCTION_IS_LED_ON] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletAccelerometer.CALLBACK_ACCELERATION] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAccelerometer.CALLBACK_ACCELERATION_REACHED] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletAccelerometer.FUNCTION_GET_IDENTITY] = BrickletAccelerometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletAccelerometer.CALLBACK_ACCELERATION] = 'h h h' self.callback_formats[BrickletAccelerometer.CALLBACK_ACCELERATION_REACHED] = 'h h h'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 1) self.response_expected[BrickletDistanceIR.FUNCTION_GET_DISTANCE] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_ANALOG_VALUE] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_SAMPLING_POINT] = BrickletDistanceIR.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDistanceIR.FUNCTION_GET_SAMPLING_POINT] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_DISTANCE_CALLBACK_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_DISTANCE_CALLBACK_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_DISTANCE_CALLBACK_THRESHOLD] = BrickletDistanceIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_DISTANCE_CALLBACK_THRESHOLD] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletDistanceIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDistanceIR.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDistanceIR.CALLBACK_DISTANCE] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletDistanceIR.CALLBACK_ANALOG_VALUE] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletDistanceIR.CALLBACK_DISTANCE_REACHED] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletDistanceIR.CALLBACK_ANALOG_VALUE_REACHED] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletDistanceIR.FUNCTION_GET_IDENTITY] = BrickletDistanceIR.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletDistanceIR.CALLBACK_DISTANCE] = 'H' self.callback_formats[BrickletDistanceIR.CALLBACK_ANALOG_VALUE] = 'H' self.callback_formats[BrickletDistanceIR.CALLBACK_DISTANCE_REACHED] = 'H' self.callback_formats[BrickletDistanceIR.CALLBACK_ANALOG_VALUE_REACHED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_VALUE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_VALUE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_MONOFLOP] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_MONOFLOP] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_SELECTED_VALUE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_CHANNEL_LED_CONFIG] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_CHANNEL_LED_CONFIG] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_WRITE_FIRMWARE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_RESET] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_WRITE_UID] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_READ_UID] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelayV2.FUNCTION_GET_IDENTITY] = BrickletIndustrialQuadRelayV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIndustrialQuadRelayV2.CALLBACK_MONOFLOP_DONE] = 'B !'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 1) self.response_expected[BrickletIO16.FUNCTION_SET_PORT] = BrickletIO16.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16.FUNCTION_GET_PORT] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.FUNCTION_SET_PORT_CONFIGURATION] = BrickletIO16.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16.FUNCTION_GET_PORT_CONFIGURATION] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletIO16.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIO16.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.FUNCTION_SET_PORT_INTERRUPT] = BrickletIO16.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIO16.FUNCTION_GET_PORT_INTERRUPT] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.CALLBACK_INTERRUPT] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletIO16.FUNCTION_SET_PORT_MONOFLOP] = BrickletIO16.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16.FUNCTION_GET_PORT_MONOFLOP] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.CALLBACK_MONOFLOP_DONE] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletIO16.FUNCTION_SET_SELECTED_VALUES] = BrickletIO16.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16.FUNCTION_GET_EDGE_COUNT] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.FUNCTION_SET_EDGE_COUNT_CONFIG] = BrickletIO16.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16.FUNCTION_GET_EDGE_COUNT_CONFIG] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16.FUNCTION_GET_IDENTITY] = BrickletIO16.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIO16.CALLBACK_INTERRUPT] = 'c B B' self.callback_formats[BrickletIO16.CALLBACK_MONOFLOP_DONE] = 'c B B'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletBarometer.FUNCTION_GET_AIR_PRESSURE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_ALTITUDE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_AIR_PRESSURE_CALLBACK_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_AIR_PRESSURE_CALLBACK_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_ALTITUDE_CALLBACK_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_AIR_PRESSURE_CALLBACK_THRESHOLD] = BrickletBarometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_AIR_PRESSURE_CALLBACK_THRESHOLD] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_ALTITUDE_CALLBACK_THRESHOLD] = BrickletBarometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_ALTITUDE_CALLBACK_THRESHOLD] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_SET_REFERENCE_AIR_PRESSURE] = BrickletBarometer.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometer.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.CALLBACK_AIR_PRESSURE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletBarometer.CALLBACK_ALTITUDE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletBarometer.CALLBACK_AIR_PRESSURE_REACHED] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletBarometer.CALLBACK_ALTITUDE_REACHED] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletBarometer.FUNCTION_GET_REFERENCE_AIR_PRESSURE] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometer.FUNCTION_GET_IDENTITY] = BrickletBarometer.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletBarometer.CALLBACK_AIR_PRESSURE] = 'i' self.callback_formats[BrickletBarometer.CALLBACK_ALTITUDE] = 'i' self.callback_formats[BrickletBarometer.CALLBACK_AIR_PRESSURE_REACHED] = 'i' self.callback_formats[BrickletBarometer.CALLBACK_ALTITUDE_REACHED] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletThermocouple.FUNCTION_GET_TEMPERATURE] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.FUNCTION_SET_TEMPERATURE_CALLBACK_PERIOD] = BrickletThermocouple.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletThermocouple.FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.FUNCTION_SET_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletThermocouple.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletThermocouple.FUNCTION_GET_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletThermocouple.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletThermocouple.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.CALLBACK_TEMPERATURE] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletThermocouple.CALLBACK_TEMPERATURE_REACHED] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletThermocouple.FUNCTION_SET_CONFIGURATION] = BrickletThermocouple.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletThermocouple.FUNCTION_GET_CONFIGURATION] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.FUNCTION_GET_ERROR_STATE] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletThermocouple.CALLBACK_ERROR_STATE] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletThermocouple.FUNCTION_GET_IDENTITY] = BrickletThermocouple.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletThermocouple.CALLBACK_TEMPERATURE] = 'i' self.callback_formats[BrickletThermocouple.CALLBACK_TEMPERATURE_REACHED] = 'i' self.callback_formats[BrickletThermocouple.CALLBACK_ERROR_STATE] = '? ?'
def __init__(self, uid): Device.__init__(self, uid) self.binding_version = [1, 0, 0] self.callbacks_format[Stepper.CALLBACK_UNDER_VOLTAGE] = 'H' self.callbacks_format[Stepper.CALLBACK_POSITION_REACHED] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletLoadCell.FUNCTION_GET_WEIGHT] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_SET_WEIGHT_CALLBACK_PERIOD] = BrickletLoadCell.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLoadCell.FUNCTION_GET_WEIGHT_CALLBACK_PERIOD] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_SET_WEIGHT_CALLBACK_THRESHOLD] = BrickletLoadCell.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLoadCell.FUNCTION_GET_WEIGHT_CALLBACK_THRESHOLD] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletLoadCell.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLoadCell.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_SET_MOVING_AVERAGE] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_GET_MOVING_AVERAGE] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_LED_ON] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_LED_OFF] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_IS_LED_ON] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.FUNCTION_CALIBRATE] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_TARE] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_SET_CONFIGURATION] = BrickletLoadCell.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLoadCell.FUNCTION_GET_CONFIGURATION] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLoadCell.CALLBACK_WEIGHT] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLoadCell.CALLBACK_WEIGHT_REACHED] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLoadCell.FUNCTION_GET_IDENTITY] = BrickletLoadCell.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLoadCell.CALLBACK_WEIGHT] = 'i' self.callback_formats[BrickletLoadCell.CALLBACK_WEIGHT_REACHED] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_RED] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_RED] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_GREEN] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_GREEN] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_BLUE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_BLUE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_FRAME_DURATION] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_FRAME_DURATION] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_DRAW_FRAME] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_SUPPLY_VOLTAGE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_BOOTLOADER_MODE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_BOOTLOADER_MODE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_WRITE_FIRMWARE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_RESET] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_WRITE_UID] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_READ_UID] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRGBLEDMatrix.FUNCTION_GET_IDENTITY] = BrickletRGBLEDMatrix.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRGBLEDMatrix.CALLBACK_FRAME_STARTED] = 'I'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletBarometerV2.FUNCTION_GET_AIR_PRESSURE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_AIR_PRESSURE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_AIR_PRESSURE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_ALTITUDE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_ALTITUDE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_ALTITUDE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_TEMPERATURE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_REFERENCE_AIR_PRESSURE] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_GET_REFERENCE_AIR_PRESSURE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_CALIBRATION] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_GET_CALIBRATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_SENSOR_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_GET_SENSOR_CONFIGURATION] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_WRITE_FIRMWARE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_RESET] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_WRITE_UID] = BrickletBarometerV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletBarometerV2.FUNCTION_READ_UID] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletBarometerV2.FUNCTION_GET_IDENTITY] = BrickletBarometerV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletBarometerV2.CALLBACK_AIR_PRESSURE] = 'i' self.callback_formats[BrickletBarometerV2.CALLBACK_ALTITUDE] = 'i' self.callback_formats[BrickletBarometerV2.CALLBACK_TEMPERATURE] = 'i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletDMX.DEVICE_IDENTIFIER, BrickletDMX.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletDMX.FUNCTION_SET_DMX_MODE] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_GET_DMX_MODE] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_WRITE_FRAME_LOW_LEVEL] = BrickletDMX.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDMX.FUNCTION_READ_FRAME_LOW_LEVEL] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_FRAME_DURATION] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_GET_FRAME_DURATION] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_FRAME_ERROR_COUNT] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_COMMUNICATION_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_GET_COMMUNICATION_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_ERROR_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_GET_ERROR_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_FRAME_CALLBACK_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_FRAME_CALLBACK_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_BOOTLOADER_MODE] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_BOOTLOADER_MODE] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_WRITE_FIRMWARE] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_RESET] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_WRITE_UID] = BrickletDMX.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletDMX.FUNCTION_READ_UID] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletDMX.FUNCTION_GET_IDENTITY] = BrickletDMX.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletDMX.CALLBACK_FRAME_STARTED] = (8, '') self.callback_formats[BrickletDMX.CALLBACK_FRAME_AVAILABLE] = (12, 'I') self.callback_formats[BrickletDMX.CALLBACK_FRAME_LOW_LEVEL] = (72, 'H H 56B I') self.callback_formats[BrickletDMX.CALLBACK_FRAME_ERROR_COUNT] = (16, 'I I') self.high_level_callbacks[BrickletDMX.CALLBACK_FRAME] = [('stream_length', 'stream_chunk_offset', 'stream_chunk_data', None), {'fixed_length': None, 'single_chunk': False}, None] ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_VALUE] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_SET_GROUP] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_GROUP] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_AVAILABLE_FOR_GROUP] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_SET_INTERRUPT] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_INTERRUPT] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialDigitalIn4. CALLBACK_INTERRUPT] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletIndustrialDigitalIn4. FUNCTION_GET_IDENTITY] = BrickletIndustrialDigitalIn4.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[ BrickletIndustrialDigitalIn4.CALLBACK_INTERRUPT] = 'H H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletRS485.FUNCTION_WRITE] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_READ] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_ENABLE_READ_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRS485.FUNCTION_DISABLE_READ_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRS485.FUNCTION_IS_READ_CALLBACK_ENABLED] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_CONFIGURATION] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_CONFIGURATION] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_COMMUNICATION_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_COMMUNICATION_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_ERROR_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_ERROR_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_BUFFER_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_BUFFER_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_GET_BUFFER_STATUS] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_ENABLE_ERROR_COUNT_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRS485.FUNCTION_DISABLE_ERROR_COUNT_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletRS485.FUNCTION_IS_ERROR_COUNT_CALLBACK_ENABLED] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_GET_ERROR_COUNT] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.CALLBACK_READ_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRS485.CALLBACK_ERROR_COUNT_CALLBACK] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_BOOTLOADER_MODE] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_GET_BOOTLOADER_MODE] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_WRITE_FIRMWARE] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRS485.FUNCTION_RESET] = BrickletRS485.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRS485.FUNCTION_GET_IDENTITY] = BrickletRS485.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRS485.CALLBACK_READ_CALLBACK] = '60c B' self.callback_formats[BrickletRS485.CALLBACK_ERROR_COUNT_CALLBACK] = 'I I'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletMultiTouch.DEVICE_IDENTIFIER, BrickletMultiTouch.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletMultiTouch.FUNCTION_GET_TOUCH_STATE] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletMultiTouch.FUNCTION_RECALIBRATE] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletMultiTouch.FUNCTION_SET_ELECTRODE_CONFIG] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletMultiTouch.FUNCTION_GET_ELECTRODE_CONFIG] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletMultiTouch.FUNCTION_SET_ELECTRODE_SENSITIVITY] = BrickletMultiTouch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletMultiTouch.FUNCTION_GET_ELECTRODE_SENSITIVITY] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletMultiTouch.FUNCTION_GET_IDENTITY] = BrickletMultiTouch.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletMultiTouch.CALLBACK_TOUCH_STATE] = (10, 'H') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletCO2.FUNCTION_GET_CO2_CONCENTRATION] = BrickletCO2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletCO2.FUNCTION_SET_CO2_CONCENTRATION_CALLBACK_PERIOD] = BrickletCO2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletCO2.FUNCTION_GET_CO2_CONCENTRATION_CALLBACK_PERIOD] = BrickletCO2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletCO2.FUNCTION_SET_CO2_CONCENTRATION_CALLBACK_THRESHOLD] = BrickletCO2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletCO2.FUNCTION_GET_CO2_CONCENTRATION_CALLBACK_THRESHOLD] = BrickletCO2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletCO2.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletCO2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletCO2.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletCO2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletCO2.FUNCTION_GET_IDENTITY] = BrickletCO2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletCO2.CALLBACK_CO2_CONCENTRATION] = 'H' self.callback_formats[BrickletCO2.CALLBACK_CO2_CONCENTRATION_REACHED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletNFCRFID.FUNCTION_REQUEST_TAG_ID] = BrickletNFCRFID.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletNFCRFID.FUNCTION_GET_TAG_ID] = BrickletNFCRFID.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletNFCRFID.FUNCTION_GET_STATE] = BrickletNFCRFID.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletNFCRFID.FUNCTION_AUTHENTICATE_MIFARE_CLASSIC_PAGE] = BrickletNFCRFID.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletNFCRFID.FUNCTION_WRITE_PAGE] = BrickletNFCRFID.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletNFCRFID.FUNCTION_REQUEST_PAGE] = BrickletNFCRFID.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletNFCRFID.FUNCTION_GET_PAGE] = BrickletNFCRFID.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletNFCRFID.CALLBACK_STATE_CHANGED] = BrickletNFCRFID.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletNFCRFID.FUNCTION_GET_IDENTITY] = BrickletNFCRFID.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletNFCRFID.CALLBACK_STATE_CHANGED] = 'B ?'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletEVSE.DEVICE_IDENTIFIER, BrickletEVSE.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 2) self.response_expected[BrickletEVSE.FUNCTION_GET_STATE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_HARDWARE_CONFIGURATION] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_LOW_LEVEL_STATE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_MAX_CHARGING_CURRENT] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_MAX_CHARGING_CURRENT] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_CALIBRATE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_START_CHARGING] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_STOP_CHARGING] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_SET_CHARGING_AUTOSTART] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_CHARGING_AUTOSTART] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_MANAGED] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_MANAGED] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_SET_MANAGED_CURRENT] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_USER_CALIBRATION] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_USER_CALIBRATION] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_DATA_STORAGE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_DATA_STORAGE] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_BOOTLOADER_MODE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_BOOTLOADER_MODE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_WRITE_FIRMWARE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_RESET] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_WRITE_UID] = BrickletEVSE.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletEVSE.FUNCTION_READ_UID] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletEVSE.FUNCTION_GET_IDENTITY] = BrickletEVSE.RESPONSE_EXPECTED_ALWAYS_TRUE ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletIO16V2.DEVICE_IDENTIFIER, BrickletIO16V2.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletIO16V2.FUNCTION_SET_VALUE] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_GET_VALUE] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_SELECTED_VALUE] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_SET_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_GET_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_INPUT_VALUE_CALLBACK_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_INPUT_VALUE_CALLBACK_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_ALL_INPUT_VALUE_CALLBACK_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_ALL_INPUT_VALUE_CALLBACK_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_MONOFLOP] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_GET_MONOFLOP] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_EDGE_COUNT] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_EDGE_COUNT_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_GET_EDGE_COUNT_CONFIGURATION] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_WRITE_FIRMWARE] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_RESET] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_WRITE_UID] = BrickletIO16V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIO16V2.FUNCTION_READ_UID] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIO16V2.FUNCTION_GET_IDENTITY] = BrickletIO16V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIO16V2.CALLBACK_INPUT_VALUE] = (11, 'B ! !') self.callback_formats[BrickletIO16V2.CALLBACK_ALL_INPUT_VALUE] = (12, '16! 16!') self.callback_formats[BrickletIO16V2.CALLBACK_MONOFLOP_DONE] = (10, 'B !') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletIndustrialDualAnalogInV2.DEVICE_IDENTIFIER, BrickletIndustrialDualAnalogInV2.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 1) self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_VOLTAGE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_VOLTAGE_CALLBACK_CONFIGURATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_VOLTAGE_CALLBACK_CONFIGURATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_SAMPLE_RATE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_SAMPLE_RATE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_CALIBRATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_CALIBRATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_ADC_VALUES] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_CHANNEL_LED_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_CHANNEL_LED_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_CHANNEL_LED_STATUS_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_CHANNEL_LED_STATUS_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_ALL_VOLTAGES] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_ALL_VOLTAGES_CALLBACK_CONFIGURATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_ALL_VOLTAGES_CALLBACK_CONFIGURATION] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_WRITE_FIRMWARE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_RESET] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_WRITE_UID] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_READ_UID] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDualAnalogInV2.FUNCTION_GET_IDENTITY] = BrickletIndustrialDualAnalogInV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIndustrialDualAnalogInV2.CALLBACK_VOLTAGE] = (13, 'B i') self.callback_formats[BrickletIndustrialDualAnalogInV2.CALLBACK_ALL_VOLTAGES] = (16, '2i') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletHallEffect. FUNCTION_GET_VALUE] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_GET_EDGE_COUNT] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_SET_EDGE_COUNT_CONFIG] = BrickletHallEffect.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletHallEffect. FUNCTION_GET_EDGE_COUNT_CONFIG] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_SET_EDGE_INTERRUPT] = BrickletHallEffect.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_GET_EDGE_INTERRUPT] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_SET_EDGE_COUNT_CALLBACK_PERIOD] = BrickletHallEffect.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_GET_EDGE_COUNT_CALLBACK_PERIOD] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_EDGE_INTERRUPT] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletHallEffect. FUNCTION_GET_IDENTITY] = BrickletHallEffect.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletHallEffect.CALLBACK_EDGE_COUNT] = 'I !'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletRGBLED.DEVICE_IDENTIFIER, BrickletRGBLED.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[ BrickletRGBLED. FUNCTION_SET_RGB_VALUE] = BrickletRGBLED.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletRGBLED. FUNCTION_GET_RGB_VALUE] = BrickletRGBLED.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletRGBLED. FUNCTION_GET_IDENTITY] = BrickletRGBLED.RESPONSE_EXPECTED_ALWAYS_TRUE ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_WRITE_FIRMWARE] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_RESET] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_WRITE_UID] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_READ_UID] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletSegmentDisplay4x7V2.FUNCTION_GET_IDENTITY] = BrickletSegmentDisplay4x7V2.RESPONSE_EXPECTED_ALWAYS_TRUE
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletAnalogOutV2. FUNCTION_SET_OUTPUT_VOLTAGE] = BrickletAnalogOutV2.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletAnalogOutV2. FUNCTION_GET_OUTPUT_VOLTAGE] = BrickletAnalogOutV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletAnalogOutV2. FUNCTION_GET_INPUT_VOLTAGE] = BrickletAnalogOutV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletAnalogOutV2. FUNCTION_GET_IDENTITY] = BrickletAnalogOutV2.RESPONSE_EXPECTED_ALWAYS_TRUE
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_SET_VALUE] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_GET_VALUE] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_SET_MONOFLOP] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_GET_MONOFLOP] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_SET_GROUP] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_GET_GROUP] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_GET_AVAILABLE_FOR_GROUP] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialQuadRelay.CALLBACK_MONOFLOP_DONE] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_SET_SELECTED_VALUES] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialQuadRelay.FUNCTION_GET_IDENTITY] = BrickletIndustrialQuadRelay.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIndustrialQuadRelay.CALLBACK_MONOFLOP_DONE] = 'H H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletRemoteSwitchV2.DEVICE_IDENTIFIER, BrickletRemoteSwitchV2.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_SWITCHING_STATE] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SET_REPEATS] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_REPEATS] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SWITCH_SOCKET_A] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SWITCH_SOCKET_B] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_DIM_SOCKET_B] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SWITCH_SOCKET_C] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SET_REMOTE_CONFIGURATION] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_REMOTE_CONFIGURATION] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_REMOTE_STATUS_A] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_REMOTE_STATUS_B] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_REMOTE_STATUS_C] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_WRITE_FIRMWARE] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_RESET] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_WRITE_UID] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_READ_UID] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitchV2.FUNCTION_GET_IDENTITY] = BrickletRemoteSwitchV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRemoteSwitchV2.CALLBACK_SWITCHING_DONE] = (8, '') self.callback_formats[BrickletRemoteSwitchV2.CALLBACK_REMOTE_STATUS_A] = (13, 'B B B H') self.callback_formats[BrickletRemoteSwitchV2.CALLBACK_REMOTE_STATUS_B] = (17, 'I B B B H') self.callback_formats[BrickletRemoteSwitchV2.CALLBACK_REMOTE_STATUS_C] = (13, 'c B B H') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletUVLight.DEVICE_IDENTIFIER, BrickletUVLight.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[ BrickletUVLight. FUNCTION_GET_UV_LIGHT] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight. FUNCTION_SET_UV_LIGHT_CALLBACK_PERIOD] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight. FUNCTION_GET_UV_LIGHT_CALLBACK_PERIOD] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight. FUNCTION_SET_UV_LIGHT_CALLBACK_THRESHOLD] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight. FUNCTION_GET_UV_LIGHT_CALLBACK_THRESHOLD] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight. FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletUVLight.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletUVLight. FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletUVLight. FUNCTION_GET_IDENTITY] = BrickletUVLight.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletUVLight.CALLBACK_UV_LIGHT] = (12, 'I') self.callback_formats[BrickletUVLight.CALLBACK_UV_LIGHT_REACHED] = ( 12, 'I') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletVoltageCurrent.DEVICE_IDENTIFIER, BrickletVoltageCurrent.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_CURRENT] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_VOLTAGE] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_POWER] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_CONFIGURATION] = BrickletVoltageCurrent.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_CONFIGURATION] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_CALIBRATION] = BrickletVoltageCurrent.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_CALIBRATION] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_CURRENT_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_CURRENT_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_POWER_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_POWER_CALLBACK_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_POWER_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_POWER_CALLBACK_THRESHOLD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletVoltageCurrent.FUNCTION_GET_IDENTITY] = BrickletVoltageCurrent.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletVoltageCurrent.CALLBACK_CURRENT] = (12, 'i') self.callback_formats[BrickletVoltageCurrent.CALLBACK_VOLTAGE] = (12, 'i') self.callback_formats[BrickletVoltageCurrent.CALLBACK_POWER] = (12, 'i') self.callback_formats[BrickletVoltageCurrent.CALLBACK_CURRENT_REACHED] = (12, 'i') self.callback_formats[BrickletVoltageCurrent.CALLBACK_VOLTAGE_REACHED] = (12, 'i') self.callback_formats[BrickletVoltageCurrent.CALLBACK_POWER_REACHED] = (12, 'i') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 1) self.response_expected[BrickletTemperature.FUNCTION_GET_TEMPERATURE] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperature.FUNCTION_SET_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperature.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperature.FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperature.FUNCTION_SET_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperature.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperature.FUNCTION_GET_TEMPERATURE_CALLBACK_THRESHOLD] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperature.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletTemperature.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletTemperature.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperature.FUNCTION_SET_I2C_MODE] = BrickletTemperature.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletTemperature.FUNCTION_GET_I2C_MODE] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletTemperature.FUNCTION_GET_IDENTITY] = BrickletTemperature.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletTemperature.CALLBACK_TEMPERATURE] = 'h' self.callback_formats[BrickletTemperature.CALLBACK_TEMPERATURE_REACHED] = 'h'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletPiezoBuzzer. FUNCTION_BEEP] = BrickletPiezoBuzzer.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletPiezoBuzzer. FUNCTION_MORSE_CODE] = BrickletPiezoBuzzer.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletPiezoBuzzer. FUNCTION_GET_IDENTITY] = BrickletPiezoBuzzer.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletPiezoBuzzer.CALLBACK_BEEP_FINISHED] = '' self.callback_formats[ BrickletPiezoBuzzer.CALLBACK_MORSE_CODE_FINISHED] = ''
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_CURRENT] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_SET_CURRENT_CALLBACK_PERIOD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_CURRENT_CALLBACK_PERIOD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_SET_SAMPLE_RATE] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_SAMPLE_RATE] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletIndustrialDual020mA.FUNCTION_GET_IDENTITY] = BrickletIndustrialDual020mA.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletIndustrialDual020mA.CALLBACK_CURRENT] = 'B i' self.callback_formats[BrickletIndustrialDual020mA.CALLBACK_CURRENT_REACHED] = 'B i'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_ENABLE] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_DISABLE] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_IS_ENABLED] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_SET_VOLTAGE] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_GET_VOLTAGE] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_SET_CURRENT] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_GET_CURRENT] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_SET_CONFIGURATION] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_GET_CONFIGURATION] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletIndustrialAnalogOut. FUNCTION_GET_IDENTITY] = BrickletIndustrialAnalogOut.RESPONSE_EXPECTED_ALWAYS_TRUE
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletLaserRangeFinder.DEVICE_IDENTIFIER, BrickletLaserRangeFinder.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 1) self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DISTANCE_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_VELOCITY_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DISTANCE_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_VELOCITY_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_MOVING_AVERAGE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_MOVING_AVERAGE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_MODE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_MODE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_ENABLE_LASER] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_DISABLE_LASER] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_IS_LASER_ENABLED] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_SENSOR_HARDWARE_VERSION] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_CONFIGURATION] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_CONFIGURATION] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_IDENTITY] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLaserRangeFinder.CALLBACK_DISTANCE] = (10, 'H') self.callback_formats[BrickletLaserRangeFinder.CALLBACK_VELOCITY] = (10, 'h') self.callback_formats[BrickletLaserRangeFinder.CALLBACK_DISTANCE_REACHED] = (10, 'H') self.callback_formats[BrickletLaserRangeFinder.CALLBACK_VELOCITY_REACHED] = (10, 'h') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletRemoteSwitch.DEVICE_IDENTIFIER, BrickletRemoteSwitch.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 1) self.response_expected[BrickletRemoteSwitch.FUNCTION_SWITCH_SOCKET] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_GET_SWITCHING_STATE] = BrickletRemoteSwitch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitch.FUNCTION_SET_REPEATS] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_GET_REPEATS] = BrickletRemoteSwitch.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletRemoteSwitch.FUNCTION_SWITCH_SOCKET_A] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_SWITCH_SOCKET_B] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_DIM_SOCKET_B] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_SWITCH_SOCKET_C] = BrickletRemoteSwitch.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletRemoteSwitch.FUNCTION_GET_IDENTITY] = BrickletRemoteSwitch.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRemoteSwitch.CALLBACK_SWITCHING_DONE] = (8, '') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 2) self.response_expected[ BrickletRS232. FUNCTION_WRITE] = BrickletRS232.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletRS232. FUNCTION_READ] = BrickletRS232.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletRS232. FUNCTION_ENABLE_READ_CALLBACK] = BrickletRS232.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletRS232. FUNCTION_DISABLE_READ_CALLBACK] = BrickletRS232.RESPONSE_EXPECTED_TRUE self.response_expected[ BrickletRS232. FUNCTION_IS_READ_CALLBACK_ENABLED] = BrickletRS232.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletRS232. FUNCTION_SET_CONFIGURATION] = BrickletRS232.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletRS232. FUNCTION_GET_CONFIGURATION] = BrickletRS232.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletRS232. FUNCTION_SET_BREAK_CONDITION] = BrickletRS232.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletRS232. FUNCTION_GET_IDENTITY] = BrickletRS232.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletRS232.CALLBACK_READ] = '60c B' self.callback_formats[BrickletRS232.CALLBACK_ERROR] = 'B'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 1) self.response_expected[ BrickletLEDStrip. FUNCTION_SET_RGB_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletLEDStrip. FUNCTION_GET_RGB_VALUES] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletLEDStrip. FUNCTION_SET_FRAME_DURATION] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletLEDStrip. FUNCTION_GET_FRAME_DURATION] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletLEDStrip. FUNCTION_GET_SUPPLY_VOLTAGE] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletLEDStrip. CALLBACK_FRAME_RENDERED] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[ BrickletLEDStrip. FUNCTION_SET_CLOCK_FREQUENCY] = BrickletLEDStrip.RESPONSE_EXPECTED_FALSE self.response_expected[ BrickletLEDStrip. FUNCTION_GET_CLOCK_FREQUENCY] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ BrickletLEDStrip. FUNCTION_GET_IDENTITY] = BrickletLEDStrip.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLEDStrip.CALLBACK_FRAME_RENDERED] = 'H'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletLEDStripV2.DEVICE_IDENTIFIER, BrickletLEDStripV2.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[BrickletLEDStripV2.FUNCTION_SET_LED_VALUES_LOW_LEVEL] = BrickletLEDStripV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_LED_VALUES_LOW_LEVEL] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_FRAME_DURATION] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_FRAME_DURATION] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_SUPPLY_VOLTAGE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_CLOCK_FREQUENCY] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_CLOCK_FREQUENCY] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_CHIP_TYPE] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_CHIP_TYPE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_CHANNEL_MAPPING] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_CHANNEL_MAPPING] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_FRAME_STARTED_CALLBACK_CONFIGURATION] = BrickletLEDStripV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_FRAME_STARTED_CALLBACK_CONFIGURATION] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_WRITE_FIRMWARE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_RESET] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_WRITE_UID] = BrickletLEDStripV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLEDStripV2.FUNCTION_READ_UID] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLEDStripV2.FUNCTION_GET_IDENTITY] = BrickletLEDStripV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLEDStripV2.CALLBACK_FRAME_STARTED] = (10, 'H') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon) self.api_version = (2, 0, 0) self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DISTANCE_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_VELOCITY_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY_CALLBACK_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DISTANCE_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DISTANCE_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_VELOCITY_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_VELOCITY_CALLBACK_THRESHOLD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_DEBOUNCE_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_DEBOUNCE_PERIOD] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_MOVING_AVERAGE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_MOVING_AVERAGE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_SET_MODE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_MODE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.FUNCTION_ENABLE_LASER] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_DISABLE_LASER] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_IS_LASER_ENABLED] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletLaserRangeFinder.CALLBACK_DISTANCE] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLaserRangeFinder.CALLBACK_VELOCITY] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLaserRangeFinder.CALLBACK_DISTANCE_REACHED] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLaserRangeFinder.CALLBACK_VELOCITY_REACHED] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_FALSE self.response_expected[BrickletLaserRangeFinder.FUNCTION_GET_IDENTITY] = BrickletLaserRangeFinder.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletLaserRangeFinder.CALLBACK_DISTANCE] = 'H' self.callback_formats[BrickletLaserRangeFinder.CALLBACK_VELOCITY] = 'h' self.callback_formats[BrickletLaserRangeFinder.CALLBACK_DISTANCE_REACHED] = 'H' self.callback_formats[BrickletLaserRangeFinder.CALLBACK_VELOCITY_REACHED] = 'h'
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, BrickletHumidityV2.DEVICE_IDENTIFIER, BrickletHumidityV2.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 2) self.response_expected[BrickletHumidityV2.FUNCTION_GET_HUMIDITY] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_HUMIDITY_CALLBACK_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_HUMIDITY_CALLBACK_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_TEMPERATURE] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_TEMPERATURE_CALLBACK_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_TEMPERATURE_CALLBACK_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_HEATER_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_GET_HEATER_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_MOVING_AVERAGE_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_GET_MOVING_AVERAGE_CONFIGURATION] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_SAMPLES_PER_SECOND] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_GET_SAMPLES_PER_SECOND] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_SPITFP_ERROR_COUNT] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_BOOTLOADER_MODE] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_BOOTLOADER_MODE] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_WRITE_FIRMWARE_POINTER] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_WRITE_FIRMWARE] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_SET_STATUS_LED_CONFIG] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_GET_STATUS_LED_CONFIG] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_CHIP_TEMPERATURE] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_RESET] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_WRITE_UID] = BrickletHumidityV2.RESPONSE_EXPECTED_FALSE self.response_expected[BrickletHumidityV2.FUNCTION_READ_UID] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[BrickletHumidityV2.FUNCTION_GET_IDENTITY] = BrickletHumidityV2.RESPONSE_EXPECTED_ALWAYS_TRUE self.callback_formats[BrickletHumidityV2.CALLBACK_HUMIDITY] = (10, 'H') self.callback_formats[BrickletHumidityV2.CALLBACK_TEMPERATURE] = (10, 'h') ipcon.add_device(self)
def __init__(self, uid, ipcon): """ Creates an object with the unique device ID *uid* and adds it to the IP Connection *ipcon*. """ Device.__init__(self, uid, ipcon, TNGDI8.DEVICE_IDENTIFIER, TNGDI8.DEVICE_DISPLAY_NAME) self.api_version = (2, 0, 0) self.response_expected[ TNGDI8.FUNCTION_GET_VALUES] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8. FUNCTION_GET_SELECTED_VALUE] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8. FUNCTION_GET_TIMESTAMP] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8. FUNCTION_COPY_FIRMWARE] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8. FUNCTION_SET_WRITE_FIRMWARE_POINTER] = TNGDI8.RESPONSE_EXPECTED_FALSE self.response_expected[ TNGDI8. FUNCTION_WRITE_FIRMWARE] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8.FUNCTION_RESET] = TNGDI8.RESPONSE_EXPECTED_FALSE self.response_expected[ TNGDI8.FUNCTION_WRITE_UID] = TNGDI8.RESPONSE_EXPECTED_FALSE self.response_expected[ TNGDI8.FUNCTION_READ_UID] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE self.response_expected[ TNGDI8. FUNCTION_GET_IDENTITY] = TNGDI8.RESPONSE_EXPECTED_ALWAYS_TRUE ipcon.add_device(self)