use of org.openhab.binding.tinkerforge.internal.types.HighLowValue in project openhab1-addons by openhab.
the class MBrickdImpl method setIsConnected.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setIsConnected(HighLowValue newIsConnected) {
HighLowValue oldIsConnected = isConnected;
isConnected = newIsConnected;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKD__IS_CONNECTED, oldIsConnected, isConnected));
}
use of org.openhab.binding.tinkerforge.internal.types.HighLowValue in project openhab1-addons by openhab.
the class MBrickletMotionDetectorImpl method fetchSensorValue.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void fetchSensorValue() {
HighLowValue value = HighLowValue.UNDEF;
try {
short motionDetected = tinkerforgeDevice.getMotionDetected();
if (motionDetected == 1) {
value = HighLowValue.HIGH;
} else {
value = HighLowValue.LOW;
}
setSensorValue(value);
} catch (TimeoutException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
} catch (NotConnectedException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_NOT_CONNECTION_EXCEPTION, e);
}
}
use of org.openhab.binding.tinkerforge.internal.types.HighLowValue in project openhab1-addons by openhab.
the class MStepperStatusLedImpl method setDigitalState.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setDigitalState(HighLowValue newDigitalState) {
HighLowValue oldDigitalState = digitalState;
digitalState = newDigitalState;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MSTEPPER_STATUS_LED__DIGITAL_STATE, oldDigitalState, digitalState));
}
}
Aggregations