Exemplo n.º 1
0
bool ServiceController::setState(acsdaemon::ServiceState istate) {
    bool stopped = state != acsdaemon::NOT_EXISTING && istate == acsdaemon::NOT_EXISTING;
    /* on state change... */
    if (state != istate) {
        fireAlarm(istate);
    }
    state = istate;
    return stopped;
}
Exemplo n.º 2
0
bool ACSServiceController::setState(acsdaemon::ServiceState istate) {
    bool stopped = state != acsdaemon::NOT_EXISTING && istate == acsdaemon::NOT_EXISTING;
    /* on state change... and anytime when alarm system is not initialized to force inicialization and sending current state */
    if (state != istate || !alarmSystemInitialized) {
        fireAlarm(istate);
    }
    state = istate;
    return stopped;
}
Exemplo n.º 3
0
void start()
{
	while(TRUE)
	{
		blinkLeds();
		if (fireAlarmState)
			fireAlarm();
	}
}