當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Device::__construct方法代碼示例

本文整理匯總了PHP中Device::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Device::__construct方法的具體用法?PHP Device::__construct怎麽用?PHP Device::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Device的用法示例。


在下文中一共展示了Device::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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;
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:16,代碼來源:BrickletAnalogOut.php

示例2: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:18,代碼來源:BrickletPiezoBuzzer.php

示例3: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:19,代碼來源:BrickletDualRelay.php

示例4: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:26,代碼來源:BrickletLCD16x2.php

示例5: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:38,代碼來源:BrickletJoystick.php

示例6: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:60,代碼來源:BrickIMU.php

示例7: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:25,代碼來源:BrickletTemperature.php

示例8: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:45,代碼來源:BrickletVoltageCurrent.php

示例9: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:36,代碼來源:BrickletCurrent12.php

示例10:

 function __construct($startChannel)
 {
     parent::__construct($startChannel);
 }
開發者ID:TuxCoder,項目名稱:dmx_http,代碼行數:4,代碼來源:Spot.php

示例11: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:30,代碼來源:BrickletIO16.php

示例12: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:91,代碼來源:BrickMaster.php

示例13: __construct

 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;
 }
開發者ID:noxer,項目名稱:generators,代碼行數:7,代碼來源:IPConnection.php

示例14: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:38,代碼來源:BrickletGPS.php

示例15: __construct

 /**
  * 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';
 }
開發者ID:nemiah,項目名稱:fheME,代碼行數:34,代碼來源:BrickletDistanceIR.php


注:本文中的Device::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。