void Dosierer::cleanUpRelations() {
    if(itsStation != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsStation");
            itsStation = NULL;
        }
    if(itsVorrat != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsVorrat");
            itsVorrat = NULL;
        }
}
void Lichtschranke::cleanUpRelations() {
    if(itsLimetten != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsLimetten");
            itsLimetten = NULL;
        }
    if(itsStation != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsStation");
            itsStation = NULL;
        }
}
Ejemplo n.º 3
0
void Sensor::cleanUpRelations() {
    if(door != NULL)
        {
            NOTIFY_RELATION_CLEARED("door");
            door = NULL;
        }
}
void Hold::cleanUpRelations() {
    if(itsController != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsController");
            itsController = NULL;
        }
}
Ejemplo n.º 5
0
void Switch_C::cleanUpRelations() {
    if(itsLight != NULL)
        {
            NOTIFY_RELATION_CLEARED("itsLight");
            itsLight = NULL;
        }
}
void Hold::setItsController(Controller* p_Controller) {
    itsController = p_Controller;
    if(p_Controller != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsController", p_Controller, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsController");
        }
}
Ejemplo n.º 7
0
void Sensor::setDoor(GarageDoor_C* p_GarageDoor) {
    door = p_GarageDoor;
    if(p_GarageDoor != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("door", p_GarageDoor, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("door");
        }
}
void Lichtschranke::setItsStation(Station* p_Station) {
    itsStation = p_Station;
    if(p_Station != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsStation", p_Station, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsStation");
        }
}
void Lichtschranke::setItsLimetten(Limetten* p_Limetten) {
    itsLimetten = p_Limetten;
    if(p_Limetten != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsLimetten", p_Limetten, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsLimetten");
        }
}
Ejemplo n.º 10
0
void Switch_C::setItsLight(Light_C* p_Light) {
    itsLight = p_Light;
    if(p_Light != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsLight", p_Light, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsLight");
        }
}
void Dosierer::setItsVorrat(Vorrat* p_Vorrat) {
    itsVorrat = p_Vorrat;
    if(p_Vorrat != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsVorrat", p_Vorrat, false, true);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsVorrat");
        }
}
void Karussell::_addItsStation(Station* p_Station) {
    if(p_Station != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsStation", p_Station, false, false);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsStation");
        }
    for (int pos = 0; pos < 6; ++pos) {
    	if (!itsStation[pos]) {
    		itsStation[pos] = p_Station;
    		break;
    	}
    }
}
void Karussell::addItsWaage(Waage* p_Waage) {
    if(p_Waage != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsWaage", p_Waage, false, false);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsWaage");
        }
    for (int pos = 0; pos < 6; ++pos) {
    	if (!itsWaage[pos]) {
    		itsWaage[pos] = p_Waage;
    		break;
    	}
    }
}
void Karussell::addItsLed(Led* p_Led) {
    if(p_Led != NULL)
        {
            NOTIFY_RELATION_ITEM_ADDED("itsLed", p_Led, false, false);
        }
    else
        {
            NOTIFY_RELATION_CLEARED("itsLed");
        }
    for (int pos = 0; pos < 6; ++pos) {
    	if (!itsLed[pos]) {
    		itsLed[pos] = p_Led;
    		break;
    	}
    }
}
void Karussell::_clearItsStation() {
    NOTIFY_RELATION_CLEARED("itsStation");
    
}
void Karussell::clearItsWaage() {
    NOTIFY_RELATION_CLEARED("itsWaage");
    
}
void Karussell::clearItsLed() {
    NOTIFY_RELATION_CLEARED("itsLed");
    
}