Class SpecificInsteonLight
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractLight
jmri.implementation.AbstractVariableLight
jmri.jmrix.powerline.SerialLight
jmri.jmrix.powerline.insteon2412s.SpecificInsteonLight
- All Implemented Interfaces:
Comparable<NamedBean>,AnalogIO,PropertyChangeProvider,DigitalIO,Light,NamedBean,VariableLight
Implementation of the Light Object for Insteon receivers on Insteon 2412S
interfaces.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.AnalogIO
AnalogIO.AbsoluteOrRelativeNested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intCurrent output step 0 to maxDimStep.(package private) intLargest Insteon dim step number available.(package private) intValue for retransmission(package private) SerialTrafficControllerFields inherited from class jmri.jmrix.powerline.SerialLight
devicecode, housecode, idhighbyte, idlowbyte, idmiddlebyte, unitidFields inherited from class jmri.implementation.AbstractVariableLight
alarmSyncUpdate, internalClock, minuteChangeListener, mLastTransitionDate, mNextTransitionTs, mTransitionDuration, mTransitionTargetIntensityFields inherited from class jmri.implementation.AbstractLight
lightControlList, mActive, mCurrentIntensity, mEnabled, mMaxIntensity, mMinIntensity, mStateFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.Light
FAST_CLOCK_CONTROL, INTERMEDIATE, NO_CONTROL, PROPERTY_TARGET_INTENSITY, SENSOR_CONTROL, TIMED_ON_CONTROL, TRANSITIONING, TRANSITIONINGHIGHER, TRANSITIONINGLOWER, TRANSITIONINGTOFULLOFF, TRANSITIONINGTOFULLON, TURNOUT_STATUS_CONTROL, TWO_SENSOR_CONTROLFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.VariableLight
PROPERTY_CURRENT_INTENSITY, PROPERTY_MAX_INTENSITY, PROPERTY_MIN_INTENSITY -
Constructor Summary
ConstructorsConstructorDescriptionSpecificInsteonLight(String systemName, SerialTrafficController tc) Create a Light object, with only system name.SpecificInsteonLight(String systemName, SerialTrafficController tc, String userName) Create a Light object, with both system and user names. -
Method Summary
Modifier and TypeMethodDescriptionintprotected intNumber of steps from dim to bright is maintained in specific SerialTrafficController implementationprotected voidinitIntensity(double intensity) Invoked the first time intensity is set.protected voidsendIntensity(double intensity) Send a Dim/Bright command to the Insteon hardware to reach a specific intensity.protected voidsendOnOffCommand(int newState) Send a On/Off Command to the hardwarevoidsetMaxHops(int maxHops) Methods inherited from class jmri.jmrix.powerline.SerialLight
initializeLightMethods inherited from class jmri.implementation.AbstractVariableLight
describeState, getAbsoluteOrRelative, getCommandedAnalogValue, getCurrentIntensity, getMax, getMaxIntensity, getMin, getMinIntensity, getResolution, getState, getTargetIntensity, getTransitionTime, isTransitionAvailable, isTransitioning, newInternalMinute, notifyTargetIntensityChange, setCommandedAnalogValue, setMaxIntensity, setMinIntensity, setObservedAnalogValue, setState, setState, setTargetIntensity, setTransitionTime, startTransitionMethods inherited from class jmri.implementation.AbstractLight
activateLight, addLightControl, clearLightControls, deactivateLight, doNewState, getBeanType, getEnabled, getLightControlList, getState, getUsageReport, notifyStateChange, setEnabledMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.AnalogIO
getKnownAnalogValueMethods inherited from interface jmri.Light
activateLight, addLightControl, clearLightControls, deactivateLight, getCommandedState, getEnabled, getKnownState, getLightControlList, getState, setCommandedState, setEnabledMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.VariableLight
isConsistentState, isConsistentValue, requestUpdateFromLayout
-
Field Details
-
lastOutputStep
int lastOutputStepCurrent output step 0 to maxDimStep.-1 means unknown
-
maxDimStep
int maxDimStepLargest Insteon dim step number available. -
maxHops
int maxHopsValue for retransmission -
tc
-
-
Constructor Details
-
SpecificInsteonLight
Create a Light object, with only system name.'systemName' was previously validated in SerialLightManager
- Parameters:
systemName- text for systemName of lighttc- tc for connection
-
SpecificInsteonLight
Create a Light object, with both system and user names.'systemName' was previously validated in SerialLightManager
- Parameters:
systemName- text for systemName of lighttc- tc for connectionuserName- text for userName of light
-
-
Method Details
-
getMaxHops
-
setMaxHops
-
initIntensity
Invoked the first time intensity is set.- Overrides:
initIntensityin classSerialLight- Parameters:
intensity- The next intensity value that will be set
-
sendIntensity
Send a Dim/Bright command to the Insteon hardware to reach a specific intensity. Acts immediately, and changes no general state.This sends "Dim" commands.
- Specified by:
sendIntensityin classAbstractVariableLight- Parameters:
intensity- new intensity
-
getNumberOfSteps
Number of steps from dim to bright is maintained in specific SerialTrafficController implementation- Specified by:
getNumberOfStepsin classAbstractVariableLight- Returns:
- number of steps
-
sendOnOffCommand
Send a On/Off Command to the hardware- Overrides:
sendOnOffCommandin classSerialLight- Parameters:
newState- new state
-