/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_SET_VOLTAGE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_MODE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_BEEP] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_MORSE_CODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::CALLBACK_BEEP_FINISHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_MORSE_CODE_FINISHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_BEEP_FINISHED] = 'callbackWrapperBeepFinished'; $this->callbackWrappers[self::CALLBACK_MORSE_CODE_FINISHED] = 'callbackWrapperMorseCodeFinished'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_SET_STATE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_STATE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MONOFLOP] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_MONOFLOP] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_MONOFLOP_DONE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_SELECTED_STATE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_MONOFLOP_DONE] = 'callbackWrapperMonoflopDone'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_WRITE_LINE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_CLEAR_DISPLAY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_BACKLIGHT_ON] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_BACKLIGHT_OFF] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_BACKLIGHT_ON] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CONFIG] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CONFIG] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_IS_BUTTON_PRESSED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_BUTTON_PRESSED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_BUTTON_RELEASED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_CUSTOM_CHARACTER] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CUSTOM_CHARACTER] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_BUTTON_PRESSED] = 'callbackWrapperButtonPressed'; $this->callbackWrappers[self::CALLBACK_BUTTON_RELEASED] = 'callbackWrapperButtonReleased'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_IS_PRESSED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_CALIBRATE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_SET_POSITION_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_POSITION_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_POSITION_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_POSITION_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_POSITION_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_PRESSED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_RELEASED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_POSITION] = 'callbackWrapperPosition'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE] = 'callbackWrapperAnalogValue'; $this->callbackWrappers[self::CALLBACK_POSITION_REACHED] = 'callbackWrapperPositionReached'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE_REACHED] = 'callbackWrapperAnalogValueReached'; $this->callbackWrappers[self::CALLBACK_PRESSED] = 'callbackWrapperPressed'; $this->callbackWrappers[self::CALLBACK_RELEASED] = 'callbackWrapperReleased'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 1); $this->responseExpected[self::FUNCTION_GET_ACCELERATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_MAGNETIC_FIELD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ANGULAR_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ALL_DATA] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ORIENTATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_QUATERNION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IMU_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_LEDS_ON] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_LEDS_OFF] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_ARE_LEDS_ON] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ACCELERATION_RANGE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_ACCELERATION_RANGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MAGNETOMETER_RANGE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_MAGNETOMETER_RANGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CONVERGENCE_SPEED] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CONVERGENCE_SPEED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CALIBRATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CALIBRATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ACCELERATION_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ACCELERATION_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MAGNETIC_FIELD_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_MAGNETIC_FIELD_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANGULAR_VELOCITY_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANGULAR_VELOCITY_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ALL_DATA_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ALL_DATA_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ORIENTATION_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ORIENTATION_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_QUATERNION_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_QUATERNION_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_ACCELERATION] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_MAGNETIC_FIELD] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANGULAR_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ALL_DATA] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ORIENTATION] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_QUATERNION] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_ORIENTATION_CALCULATION_ON] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_ORIENTATION_CALCULATION_OFF] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_ORIENTATION_CALCULATION_ON] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_PROTOCOL1_BRICKLET_NAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESET] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_ACCELERATION] = 'callbackWrapperAcceleration'; $this->callbackWrappers[self::CALLBACK_MAGNETIC_FIELD] = 'callbackWrapperMagneticField'; $this->callbackWrappers[self::CALLBACK_ANGULAR_VELOCITY] = 'callbackWrapperAngularVelocity'; $this->callbackWrappers[self::CALLBACK_ALL_DATA] = 'callbackWrapperAllData'; $this->callbackWrappers[self::CALLBACK_ORIENTATION] = 'callbackWrapperOrientation'; $this->callbackWrappers[self::CALLBACK_QUATERNION] = 'callbackWrapperQuaternion'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_TEMPERATURE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_TEMPERATURE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_TEMPERATURE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_TEMPERATURE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_TEMPERATURE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_I2C_MODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_I2C_MODE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_TEMPERATURE] = 'callbackWrapperTemperature'; $this->callbackWrappers[self::CALLBACK_TEMPERATURE_REACHED] = 'callbackWrapperTemperatureReached'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_POWER] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CONFIGURATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CONFIGURATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CALIBRATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CALIBRATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_POWER_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_POWER_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_POWER_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_POWER_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_POWER] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_CURRENT_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_VOLTAGE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_POWER_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_CURRENT] = 'callbackWrapperCurrent'; $this->callbackWrappers[self::CALLBACK_VOLTAGE] = 'callbackWrapperVoltage'; $this->callbackWrappers[self::CALLBACK_POWER] = 'callbackWrapperPower'; $this->callbackWrappers[self::CALLBACK_CURRENT_REACHED] = 'callbackWrapperCurrentReached'; $this->callbackWrappers[self::CALLBACK_VOLTAGE_REACHED] = 'callbackWrapperVoltageReached'; $this->callbackWrappers[self::CALLBACK_POWER_REACHED] = 'callbackWrapperPowerReached'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_CALIBRATE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_OVER_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_CURRENT_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_OVER_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_CURRENT] = 'callbackWrapperCurrent'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE] = 'callbackWrapperAnalogValue'; $this->callbackWrappers[self::CALLBACK_CURRENT_REACHED] = 'callbackWrapperCurrentReached'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE_REACHED] = 'callbackWrapperAnalogValueReached'; $this->callbackWrappers[self::CALLBACK_OVER_CURRENT] = 'callbackWrapperOverCurrent'; }
function __construct($startChannel) { parent::__construct($startChannel); }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 1); $this->responseExpected[self::FUNCTION_SET_PORT] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PORT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_PORT_CONFIGURATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PORT_CONFIGURATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_PORT_INTERRUPT] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_PORT_INTERRUPT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_INTERRUPT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_PORT_MONOFLOP] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PORT_MONOFLOP] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_MONOFLOP_DONE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_SELECTED_VALUES] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_EDGE_COUNT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_EDGE_COUNT_CONFIG] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_EDGE_COUNT_CONFIG] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_INTERRUPT] = 'callbackWrapperInterrupt'; $this->callbackWrappers[self::CALLBACK_MONOFLOP_DONE] = 'callbackWrapperMonoflopDone'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 2); $this->responseExpected[self::FUNCTION_GET_STACK_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_EXTENSION_TYPE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_EXTENSION_TYPE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_IS_CHIBI_PRESENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CHIBI_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIBI_ADDRESS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CHIBI_MASTER_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIBI_MASTER_ADDRESS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CHIBI_SLAVE_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIBI_SLAVE_ADDRESS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIBI_SIGNAL_STRENGTH] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIBI_ERROR_LOG] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CHIBI_FREQUENCY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIBI_FREQUENCY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CHIBI_CHANNEL] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIBI_CHANNEL] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_IS_RS485_PRESENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_RS485_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_RS485_ADDRESS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_RS485_SLAVE_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_RS485_SLAVE_ADDRESS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_RS485_ERROR_LOG] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_RS485_CONFIGURATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_RS485_CONFIGURATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_IS_WIFI_PRESENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_WIFI_CONFIGURATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_CONFIGURATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_WIFI_ENCRYPTION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_ENCRYPTION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_WIFI_STATUS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_REFRESH_WIFI_STATUS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_SET_WIFI_CERTIFICATE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_CERTIFICATE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_WIFI_POWER_MODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_POWER_MODE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_WIFI_BUFFER_INFO] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_WIFI_REGULATORY_DOMAIN] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_REGULATORY_DOMAIN] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_USB_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_LONG_WIFI_KEY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_LONG_WIFI_KEY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_WIFI_HOSTNAME] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_WIFI_HOSTNAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STACK_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_CURRENT_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STACK_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_USB_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_USB_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STACK_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_CURRENT_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STACK_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_USB_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_USB_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_STACK_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_STACK_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_USB_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_STACK_CURRENT_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_STACK_VOLTAGE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_USB_VOLTAGE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_IS_ETHERNET_PRESENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ETHERNET_CONFIGURATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_ETHERNET_CONFIGURATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ETHERNET_STATUS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ETHERNET_HOSTNAME] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_SET_ETHERNET_MAC_ADDRESS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PROTOCOL1_BRICKLET_NAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESET] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_STACK_CURRENT] = 'callbackWrapperStackCurrent'; $this->callbackWrappers[self::CALLBACK_STACK_VOLTAGE] = 'callbackWrapperStackVoltage'; $this->callbackWrappers[self::CALLBACK_USB_VOLTAGE] = 'callbackWrapperUSBVoltage'; $this->callbackWrappers[self::CALLBACK_STACK_CURRENT_REACHED] = 'callbackWrapperStackCurrentReached'; $this->callbackWrappers[self::CALLBACK_STACK_VOLTAGE_REACHED] = 'callbackWrapperStackVoltageReached'; $this->callbackWrappers[self::CALLBACK_USB_VOLTAGE_REACHED] = 'callbackWrapperUSBVoltageReached'; }
public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_AUTHENTICATION_NONCE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_AUTHENTICATE] = self::RESPONSE_EXPECTED_TRUE; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_COORDINATES] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_STATUS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ALTITUDE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_MOTION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_DATE_TIME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESTART] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_SET_COORDINATES_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_COORDINATES_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STATUS_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_STATUS_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ALTITUDE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DATE_TIME_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DATE_TIME_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MOTION_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_MOTION_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_COORDINATES] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_STATUS] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ALTITUDE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_MOTION] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_DATE_TIME] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_COORDINATES] = 'callbackWrapperCoordinates'; $this->callbackWrappers[self::CALLBACK_STATUS] = 'callbackWrapperStatus'; $this->callbackWrappers[self::CALLBACK_ALTITUDE] = 'callbackWrapperAltitude'; $this->callbackWrappers[self::CALLBACK_MOTION] = 'callbackWrapperMotion'; $this->callbackWrappers[self::CALLBACK_DATE_TIME] = 'callbackWrapperDateTime'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_GET_DISTANCE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_SAMPLING_POINT] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_SAMPLING_POINT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DISTANCE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DISTANCE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DISTANCE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DISTANCE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_DISTANCE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_DISTANCE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_DISTANCE] = 'callbackWrapperDistance'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE] = 'callbackWrapperAnalogValue'; $this->callbackWrappers[self::CALLBACK_DISTANCE_REACHED] = 'callbackWrapperDistanceReached'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE_REACHED] = 'callbackWrapperAnalogValueReached'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 2); $this->responseExpected[self::FUNCTION_GET_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ANALOG_VALUE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_VOLTAGE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ANALOG_VALUE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_RANGE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_RANGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_AVERAGING] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_AVERAGING] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_VOLTAGE] = 'callbackWrapperVoltage'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE] = 'callbackWrapperAnalogValue'; $this->callbackWrappers[self::CALLBACK_VOLTAGE_REACHED] = 'callbackWrapperVoltageReached'; $this->callbackWrappers[self::CALLBACK_ANALOG_VALUE_REACHED] = 'callbackWrapperAnalogValueReached'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_SET_VELOCITY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ACCELERATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_ACCELERATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_PWM_FREQUENCY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PWM_FREQUENCY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_FULL_BRAKE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_STACK_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_EXTERNAL_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CONSUMPTION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_ENABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_DISABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_ENABLED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DRIVE_MODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_DRIVE_MODE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_CURRENT_VELOCITY_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_VELOCITY_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_UNDER_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_EMERGENCY_SHUTDOWN] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_VELOCITY_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_CURRENT_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_PROTOCOL1_BRICKLET_NAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESET] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_UNDER_VOLTAGE] = 'callbackWrapperUnderVoltage'; $this->callbackWrappers[self::CALLBACK_EMERGENCY_SHUTDOWN] = 'callbackWrapperEmergencyShutdown'; $this->callbackWrappers[self::CALLBACK_VELOCITY_REACHED] = 'callbackWrapperVelocityReached'; $this->callbackWrappers[self::CALLBACK_CURRENT_VELOCITY] = 'callbackWrapperCurrentVelocity'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 1); $this->responseExpected[self::FUNCTION_GET_AIR_PRESSURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ALTITUDE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_AIR_PRESSURE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_AIR_PRESSURE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ALTITUDE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ALTITUDE_CALLBACK_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_AIR_PRESSURE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_AIR_PRESSURE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ALTITUDE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ALTITUDE_CALLBACK_THRESHOLD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_REFERENCE_AIR_PRESSURE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_AIR_PRESSURE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ALTITUDE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_AIR_PRESSURE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_ALTITUDE_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_REFERENCE_AIR_PRESSURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_AVERAGING] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_AVERAGING] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_AIR_PRESSURE] = 'callbackWrapperAirPressure'; $this->callbackWrappers[self::CALLBACK_ALTITUDE] = 'callbackWrapperAltitude'; $this->callbackWrappers[self::CALLBACK_AIR_PRESSURE_REACHED] = 'callbackWrapperAirPressureReached'; $this->callbackWrappers[self::CALLBACK_ALTITUDE_REACHED] = 'callbackWrapperAltitudeReached'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_SET_MAX_VELOCITY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_MAX_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_SPEED_RAMPING] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_SPEED_RAMPING] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_FULL_BRAKE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_SET_CURRENT_POSITION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_CURRENT_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_TARGET_POSITION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_TARGET_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STEPS] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_STEPS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_REMAINING_STEPS] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_STEP_MODE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_STEP_MODE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_DRIVE_FORWARD] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_DRIVE_BACKWARD] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_STOP] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_STACK_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_EXTERNAL_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_CONSUMPTION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MOTOR_CURRENT] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_MOTOR_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_ENABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_DISABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_ENABLED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DECAY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_DECAY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_UNDER_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_POSITION_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_SET_SYNC_RECT] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_SYNC_RECT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_TIME_BASE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_TIME_BASE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_ALL_DATA] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ALL_DATA_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_ALL_DATA_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_ALL_DATA] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_NEW_STATE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_PROTOCOL1_BRICKLET_NAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESET] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_UNDER_VOLTAGE] = 'callbackWrapperUnderVoltage'; $this->callbackWrappers[self::CALLBACK_POSITION_REACHED] = 'callbackWrapperPositionReached'; $this->callbackWrappers[self::CALLBACK_ALL_DATA] = 'callbackWrapperAllData'; $this->callbackWrappers[self::CALLBACK_NEW_STATE] = 'callbackWrapperNewState'; }
/** * Constructor * * @param string $token * Identificador de push do dispositivo para recebimento de notificações * @param int $type * Tipo do dispositivo * @param string $reason * Motivo da falha */ public function __construct($token, $type, $reason) { parent::__construct($token, $type, null); $this->reason = $reason; }
public function __construct($channel) { parent::__construct($channel); }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 1); $this->responseExpected[self::FUNCTION_GET_VALUE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_GROUP] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_GROUP] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_AVAILABLE_FOR_GROUP] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_DEBOUNCE_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_INTERRUPT] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_INTERRUPT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_INTERRUPT] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_GET_EDGE_COUNT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_EDGE_COUNT_CONFIG] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_EDGE_COUNT_CONFIG] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_INTERRUPT] = 'callbackWrapperInterrupt'; }
/** * Creates an object with the unique device ID $uid. This object can * then be added to the IP connection. * * @param string $uid */ public function __construct($uid, $ipcon) { parent::__construct($uid, $ipcon); $this->apiVersion = array(2, 0, 0); $this->responseExpected[self::FUNCTION_ENABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_DISABLE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_IS_ENABLED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_POSITION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_POSITION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_VELOCITY] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CURRENT_VELOCITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_ACCELERATION] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_ACCELERATION] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_OUTPUT_VOLTAGE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_OUTPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_PULSE_WIDTH] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PULSE_WIDTH] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_DEGREE] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_DEGREE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_PERIOD] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_PERIOD] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_SERVO_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_OVERALL_CURRENT] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_STACK_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_EXTERNAL_INPUT_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_SET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_GET_MINIMUM_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::CALLBACK_UNDER_VOLTAGE] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_POSITION_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::CALLBACK_VELOCITY_REACHED] = self::RESPONSE_EXPECTED_ALWAYS_FALSE; $this->responseExpected[self::FUNCTION_ENABLE_POSITION_REACHED_CALLBACK] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_DISABLE_POSITION_REACHED_CALLBACK] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_IS_POSITION_REACHED_CALLBACK_ENABLED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_ENABLE_VELOCITY_REACHED_CALLBACK] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_DISABLE_VELOCITY_REACHED_CALLBACK] = self::RESPONSE_EXPECTED_TRUE; $this->responseExpected[self::FUNCTION_IS_VELOCITY_REACHED_CALLBACK_ENABLED] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_PROTOCOL1_BRICKLET_NAME] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_GET_CHIP_TEMPERATURE] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->responseExpected[self::FUNCTION_RESET] = self::RESPONSE_EXPECTED_FALSE; $this->responseExpected[self::FUNCTION_GET_IDENTITY] = self::RESPONSE_EXPECTED_ALWAYS_TRUE; $this->callbackWrappers[self::CALLBACK_UNDER_VOLTAGE] = 'callbackWrapperUnderVoltage'; $this->callbackWrappers[self::CALLBACK_POSITION_REACHED] = 'callbackWrapperPositionReached'; $this->callbackWrappers[self::CALLBACK_VELOCITY_REACHED] = 'callbackWrapperVelocityReached'; }