SecurityLightController
Interface LightControllerCommandInterface

All Known Implementing Classes:
LightControllerStateMachine

public interface LightControllerCommandInterface

This interface defines the light controller interface. Included are the signals that can be sent into the controller (based on the detection of changes in the system) as well as the methods which can be invoked.

Author:
schilling

Field Summary
static int ALARM_CLEARED
          This signal indicates that someone has cleared the active alarm.
static int LAMP_TIMER_EXPIRED
          This signal indicates that a timer has expired.
static int LIGHT_SENSOR_DARKENED
          This signal indicates that the light sensor has been darkened, indicating diminished ambient light and the approach of nightfall.
static int LIGHT_SENSOR_LIGHTENED
          This signal indicates that the light sensor has been lit up, indicating the sun is up and daylight is here.
static int MANUAL_SWITCH_OFF
          This signal indicates that a manual override switch has been placed into the off position.
static int MANUAL_SWITCH_ON
          This signal indicates that a manual override switch has been placed into the on position.
static int MOTION_DETECTED
          This signal indicates that motion has been detected in the area.
static int SECURITY_ALARM_TRIPPED
          This signal indicates that an intrusion has been detected.
 
Method Summary
 void signalAction(int signal)
          This method provides a mechanism for a signal to be received by the light controller.
 void subscribe(LightControllerStateMachineObserverInterface obs)
          This method will allow an external observer to subscribe to state machine, receiving updates when states change.
 void unsubscribe(LightControllerStateMachineObserverInterface obs)
          This method will allow an external observer to unsubscribe to state machine, receiving updates when states change.
 

Field Detail

LIGHT_SENSOR_DARKENED

static final int LIGHT_SENSOR_DARKENED
This signal indicates that the light sensor has been darkened, indicating diminished ambient light and the approach of nightfall.

See Also:
Constant Field Values

LIGHT_SENSOR_LIGHTENED

static final int LIGHT_SENSOR_LIGHTENED
This signal indicates that the light sensor has been lit up, indicating the sun is up and daylight is here.

See Also:
Constant Field Values

MANUAL_SWITCH_ON

static final int MANUAL_SWITCH_ON
This signal indicates that a manual override switch has been placed into the on position.

See Also:
Constant Field Values

MANUAL_SWITCH_OFF

static final int MANUAL_SWITCH_OFF
This signal indicates that a manual override switch has been placed into the off position.

See Also:
Constant Field Values

MOTION_DETECTED

static final int MOTION_DETECTED
This signal indicates that motion has been detected in the area. Typically, this indicates that a motion sensor has gone off.

See Also:
Constant Field Values

SECURITY_ALARM_TRIPPED

static final int SECURITY_ALARM_TRIPPED
This signal indicates that an intrusion has been detected. Perhaps a window has been opened or some other detection of intrusion has occurred.

See Also:
Constant Field Values

ALARM_CLEARED

static final int ALARM_CLEARED
This signal indicates that someone has cleared the active alarm. This is typically done by resetting the alarm.

See Also:
Constant Field Values

LAMP_TIMER_EXPIRED

static final int LAMP_TIMER_EXPIRED
This signal indicates that a timer has expired.

See Also:
Constant Field Values
Method Detail

signalAction

void signalAction(int signal)
This method provides a mechanism for a signal to be received by the light controller. The signal will be one of the defined values provided previously.

Parameters:
signal - This is the signal that is being received. It can be one of LIGHT_SENSOR_DARKENED, LIGHT_SENSOR_LIGHTENED, MANUAL_SWITCH_ON, MANUAL_SWITCH_OFF, MOTION_DETECTED, SECURITY_ALARM_TRIPPED, ALARM_CLEARED, or LAMP_TIMER_EXPIRED. \

subscribe

void subscribe(LightControllerStateMachineObserverInterface obs)
This method will allow an external observer to subscribe to state machine, receiving updates when states change.

Parameters:
obs - This is the observer interface that is to be subscribed.

unsubscribe

void unsubscribe(LightControllerStateMachineObserverInterface obs)
This method will allow an external observer to unsubscribe to state machine, receiving updates when states change.

Parameters:
obs - This is the observer interface that is to be unsubscribed.