use of org.openhab.binding.tinkerforge.internal.model.DigitalActorIO16 in project openhab1-addons by openhab.
the class MBrickletIO16Impl method initSubDevices.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void initSubDevices() {
ModelFactory factory = ModelFactory.eINSTANCE;
ArrayList<String> portList = new ArrayList<String>(2);
portList.add("a");
portList.add("b");
char[] a = { 'a', 'b' };
for (int j = 0; j < a.length; j++) {
char port = a[j];
for (int i = 0; i < 8; i++) {
DigitalSensor sensor = factory.createDigitalSensor();
sensor.setUid(getUid());
String genericDeviceId = port + String.valueOf(i);
String subId = "in" + genericDeviceId;
sensor.setSubId(subId);
sensor.setPin(i);
sensor.setPort(port);
sensor.setGenericDeviceId(genericDeviceId);
sensor.init();
sensor.setMbrick(this);
logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subId);
}
for (int i = 0; i < 8; i++) {
DigitalActorIO16 actor = factory.createDigitalActorIO16();
actor.setUid(getUid());
String genericDeviceId = port + String.valueOf(i);
String subId = "out" + genericDeviceId;
actor.setSubId(subId);
actor.setPin(i);
actor.setPort(port);
actor.setGenericDeviceId(genericDeviceId);
actor.init();
actor.setMbrick(this);
logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subId);
}
}
}
Aggregations