}
MBrickletIO16 bricklet = getMbrick();
if (bricklet == null) {
logger.error("{} No bricklet found for DigitalSensor: {} ", LoggerConstants.TFINIT, subId);
} else {
BrickletIO16 brickletIO16 = bricklet.getTinkerforgeDevice();
try {
logger.debug("{} setting InterruptListener for DigitalSensor: {} ", LoggerConstants.TFINIT,
subId);
interruptListener = new InterruptListener();
brickletIO16.addInterruptListener(interruptListener);
brickletIO16.setPortConfiguration(getPort(), (short) mask, BrickletIO16.DIRECTION_IN,
isPullUpResistorEnabled());
fetchSensorValue();
} catch (TimeoutException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
} catch (NotConnectedException e) {