Search in sources :

Example 1 with Electrode

use of org.openhab.binding.tinkerforge.internal.model.Electrode in project openhab1-addons by openhab.

the class MBrickletMultiTouchImpl method initSubDevices.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated NOT
     */
@Override
public void initSubDevices() {
    ModelFactory factory = ModelFactory.eINSTANCE;
    for (int i = 0; i < 12; i++) {
        Electrode electrode = factory.createElectrode();
        electrode.setUid(getUid());
        String subId = "electrode" + i;
        electrode.setSubId(subId);
        electrode.setPin(i);
        electrode.init();
        electrode.setMbrick(this);
        logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subId);
    }
    Proximity proximity = factory.createProximity();
    proximity.setUid(getUid());
    String subId = "proximity";
    proximity.setSubId(subId);
    proximity.setPin(12);
    proximity.init();
    proximity.setMbrick(this);
    logger.debug("{} addSubDevice {}", LoggerConstants.TFINIT, subId);
}
Also used : Electrode(org.openhab.binding.tinkerforge.internal.model.Electrode) Proximity(org.openhab.binding.tinkerforge.internal.model.Proximity) ModelFactory(org.openhab.binding.tinkerforge.internal.model.ModelFactory)

Aggregations

Electrode (org.openhab.binding.tinkerforge.internal.model.Electrode)1 ModelFactory (org.openhab.binding.tinkerforge.internal.model.ModelFactory)1 Proximity (org.openhab.binding.tinkerforge.internal.model.Proximity)1