|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractLight
jmri.implementation.AbstractVariableLight
jmri.jmrix.powerline.SerialLight
jmri.jmrix.powerline.SerialX10Light
public class SerialX10Light
Implementation of the Light class for X10-based subclasses.
Uses X10 dimming commands to set intensity unless the value is 0.0 or 1.0, in which case it uses on/off commands only.
Since the dim/bright step of the hardware is unknown then the Light object is first created, the first time the intensity (not state) is set to other than 0.0 or 1.0, the output is run to it's maximum dim or bright step so that we know the count is right.
Keeps track of the controller's "dim count", and if not certain forces it to zero to be sure.
| Field Summary | |
|---|---|
protected int |
lastOutputStep
Current output step 0 to maxDimStep. |
protected int |
maxDimStep
Largest X10 dim step number available. |
| Fields inherited from class jmri.jmrix.powerline.SerialLight |
|---|
devicecode, housecode, idhighbyte, idlowbyte, idmiddlebyte |
| Fields inherited from class jmri.implementation.AbstractVariableLight |
|---|
alarmSyncUpdate, internalClock, minuteChangeListener, mLastTransitionDate, mNextTransitionTs, mTransitionDuration, mTransitionTargetIntensity |
| Fields inherited from class jmri.implementation.AbstractLight |
|---|
lightControlList, mActive, mCurrentIntensity, mEnabled, mMaxIntensity, mMinIntensity, mState |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.Light |
|---|
FAST_CLOCK_CONTROL, INTERMEDIATE, NO_CONTROL, OFF, ON, SENSOR_CONTROL, TIMED_ON_CONTROL, TRANSITIONING, TRANSITIONINGHIGHER, TRANSITIONINGLOWER, TRANSITIONINGTOFULLOFF, TRANSITIONINGTOFULLON, TURNOUT_STATUS_CONTROL, TWO_SENSOR_CONTROL |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
SerialX10Light(String systemName,
SerialTrafficController tc)
Create a Light object, with only system name. |
|
SerialX10Light(String systemName,
SerialTrafficController tc,
String userName)
Create a Light object, with both system and user names. |
|
| Method Summary | |
|---|---|
protected int |
getNumberOfSteps()
Number of steps from dim to bright is maintained in specific SerialTrafficController implementation |
protected void |
initIntensity(double intensity)
Optionally, force control to a known "dim count". |
protected void |
sendIntensity(double intensity)
Send a Dim/Bright commands to the X10 hardware to reach a specific intensity. |
protected void |
sendOnOffCommand(int newState)
Send a On/Off Command to the hardware |
| Methods inherited from class jmri.jmrix.powerline.SerialLight |
|---|
initializeLight |
| Methods inherited from class jmri.implementation.AbstractVariableLight |
|---|
getTransitionTime, isIntensityVariable, isTransitionAvailable, isTransitioning, newInternalMinute, notifyTargetIntensityChange, setState, setTargetIntensity, setTransitionTime, startTransition |
| Methods inherited from class jmri.implementation.AbstractLight |
|---|
activateLight, addLightControl, clearLightControls, deactivateLight, doNewState, getCurrentIntensity, getEnabled, getLightControlList, getMaxIntensity, getMinIntensity, getState, getTargetIntensity, notifyStateChange, setEnabled, setMaxIntensity, setMinIntensity, updateIntensityHigh, updateIntensityIntermediate, updateIntensityLow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int lastOutputStep
-1 means unknown
protected int maxDimStep
Loaded from SerialTrafficController.getNumberOfIntensitySteps();
| Constructor Detail |
|---|
public SerialX10Light(String systemName,
SerialTrafficController tc)
'systemName' was previously validated in SerialLightManager
public SerialX10Light(String systemName,
SerialTrafficController tc,
String userName)
'systemName' was previously validated in SerialLightManager
| Method Detail |
|---|
protected void initIntensity(double intensity)
Invoked the first time intensity is set.
initIntensity in class SerialLightintensity - The next intensity value that will be setprotected void sendIntensity(double intensity)
This sends "Dim" commands.
sendIntensity in class AbstractVariableLightprotected int getNumberOfSteps()
getNumberOfSteps in class AbstractVariableLightprotected void sendOnOffCommand(int newState)
sendOnOffCommand in class SerialLight
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||