Class DebuggerMaleDigitalActionSocket
- java.lang.Object
-
- jmri.jmrit.logixng.implementation.AbstractMaleSocket
-
- jmri.jmrit.logixng.tools.debugger.AbstractDebuggerMaleSocket
-
- jmri.jmrit.logixng.tools.debugger.DebuggerMaleDigitalActionSocket
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>,PropertyChangeProvider,Base,Debugable,DigitalAction,DigitalActionBean,MaleDigitalActionSocket,MaleSocket,NamedBean
public class DebuggerMaleDigitalActionSocket extends AbstractDebuggerMaleSocket implements MaleDigitalActionSocket
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Base
Base.PrintTreeSettings, Base.RunnableWithBase, Base.RunnableWithBaseThrowException
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.Debugable
Debugable.DebugConfig
-
Nested classes/interfaces inherited from interface jmri.jmrit.logixng.MaleSocket
MaleSocket.ErrorHandlingType
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.logixng.implementation.AbstractMaleSocket
_localVariables
-
Fields inherited from interface jmri.jmrit.logixng.Base
PRINT_LINE_NUMBERS_FORMAT, PROPERTY_CHILD_COUNT, PROPERTY_CHILD_REORDER, PROPERTY_LAST_RESULT_CHANGED, PROPERTY_SOCKET_CONNECTED, PROPERTY_SOCKET_DISCONNECTED, SEPARATOR, SOCKET_CONNECTED, SOCKET_DISCONNECTED
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description DebuggerMaleDigitalActionSocket(BaseManager<MaleDigitalActionSocket> manager, MaleDigitalActionSocket maleSocket)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareSystemNameSuffix(java.lang.String suffix1, java.lang.String suffix2, NamedBean n2)Compare the suffix of this NamedBean's name with the suffix of the argument NamedBean's name for theNamedBean.compareTo(jmri.NamedBean)operation.java.lang.StringdescribeState(int state)Provide human-readable, localized version of state value.voidexecute()Execute this DigitalActionBean.java.lang.StringgetAfterInfo()Get information about this action/expression after it is executed or evaluated.java.lang.StringgetBeanType()For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.java.lang.StringgetBeforeInfo()Get information about this action/expression before it is executed or evaluated.java.lang.ObjectgetProperty(java.lang.String key)Retrieve the value associated with a key.java.util.Set<java.lang.String>getPropertyKeys()Retrieve the complete current set of keys.intgetState()Provide generic access to internal state.voidremoveProperty(java.lang.String key)Remove the key/value pair against the NamedBean.voidsetProperty(java.lang.String key, java.lang.Object value)Attach a key/value pair to the NamedBean, which can be retrieved later.voidsetState(int s)Provide generic access to internal state.-
Methods inherited from class jmri.jmrit.logixng.tools.debugger.AbstractDebuggerMaleSocket
after, before, createDebugConfig, disposeMe, getBreakpointAfter, getBreakpointBefore, getComment, getDebugConfig, getLogAfter, getLogBefore, isDebuggerActive, isEnabled, isLogAllAfter, isLogAllBefore, registerListenersForThisClass, setBreakpointAfter, setBreakpointBefore, setComment, setDebugConfig, setEnabled, setEnabledFlag, setLogAfter, setLogBefore, setParent, setStepInto, unregisterListenersForThisClass
-
Methods inherited from class jmri.jmrit.logixng.implementation.AbstractMaleSocket
addLocalVariable, addLocalVariable, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, clearLocalVariables, deepCopyChildren, dispose, executeErrorHandlingModule, getCatchAbortExecution, getCategory, getChild, getChildCount, getConditionalNG, getDeepCopy, getErrorHandlingModuleSocket, getErrorHandlingType, getListen, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLocalVariables, getLogixNG, getLongDescription, getManager, getNumPropertyChangeListeners, getObject, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getRoot, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, handleError, handleError, handleError, hasChild, isActive, isErrorHandlingModuleEnabled, isLocked, isSystem, printLocalVariable, printTree, printTree, printTree, printTreeRow, registerListeners, removePropertyChangeListener, removePropertyChangeListener, setCatchAbortExecution, setErrorHandlingType, setListen, setLocked, setParentForAllChildren, setSystem, setUserName, toString, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.Base
addPropertyChangeListener, addPropertyChangeListener, deepCopyChildren, dispose, doSocketOperation, existsInTree, forEntireTree, forEntireTreeWithException, getCategory, getChild, getChildCount, getComment, getConditionalNG, getDeepCopy, getListenerRef, getListenerRefs, getListenerRefsIncludingChildren, getLogixNG, getLongDescription, getLongDescription, getModule, getNumPropertyChangeListeners, getParent, getPropertyChangeListenersByReference, getRoot, getShortDescription, getShortDescription, getSystemName, getUsageDetail, getUsageTree, getUserName, hasChild, isActive, isSocketOperationAllowed, printTree, printTree, printTree, printTree, printTree, registerListeners, setComment, setParent, setParentForAllChildren, setUserName, unregisterListeners, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.jmrit.logixng.Debugable
createDebugConfig, getDebugConfig, setDebugConfig
-
Methods inherited from interface jmri.jmrit.logixng.MaleSocket
addLocalVariable, addLocalVariable, clearLocalVariables, find, getCatchAbortExecution, getErrorHandlingType, getListen, getLocalVariables, getManager, getObject, handleError, handleError, handleError, isEnabled, isLocked, isSupportingLocalVariables, isSystem, setCatchAbortExecution, setEnabled, setEnabledFlag, setErrorHandlingType, setListen, setLocked, setSystem, setup
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareTo, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getPropertyChangeListenersByReference, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, setComment, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
DebuggerMaleDigitalActionSocket
public DebuggerMaleDigitalActionSocket(BaseManager<MaleDigitalActionSocket> manager, MaleDigitalActionSocket maleSocket)
-
-
Method Detail
-
getBeforeInfo
public java.lang.String getBeforeInfo()
Get information about this action/expression before it is executed or evaluated.- Specified by:
getBeforeInfoin classAbstractDebuggerMaleSocket- Returns:
- an information string
-
getAfterInfo
public java.lang.String getAfterInfo()
Get information about this action/expression after it is executed or evaluated.- Specified by:
getAfterInfoin classAbstractDebuggerMaleSocket- Returns:
- an information string
-
execute
public void execute() throws JmriException
Description copied from interface:MaleDigitalActionSocketExecute this DigitalActionBean.This method must ensure that the value is not a Double.NaN, negative infinity or positive infinity. If that is the case, it must throw an IllegalArgumentException before checking if an error has occured.
- Specified by:
executein interfaceDigitalAction- Specified by:
executein interfaceMaleDigitalActionSocket- Throws:
JmriException- when an exception occurs
-
setState
public void setState(int s) throws JmriException
Description copied from interface:NamedBeanProvide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.
- Specified by:
setStatein interfaceNamedBean- Parameters:
s- the state- Throws:
JmriException- general error when setting the state fails
-
getState
public int getState()
Description copied from interface:NamedBeanProvide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. getCommandedState in Turnout). This is provided to make scripts easier to read.
-
describeState
public java.lang.String describeState(int state)
Description copied from interface:NamedBeanProvide human-readable, localized version of state value.This method is intended for use when presenting to a human operator.
- Specified by:
describeStatein interfaceNamedBean- Parameters:
state- the state to describe- Returns:
- the state in localized form
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)
Description copied from interface:NamedBeanAttach a key/value pair to the NamedBean, which can be retrieved later. These are not bound properties as yet, and don't throw events on modification. Key must not be null.The key is constrained to String to make these behave like normal Java Beans.
- Specified by:
setPropertyin interfaceNamedBean- Parameters:
key- the property to setvalue- the value of the property
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Description copied from interface:NamedBeanRetrieve the value associated with a key. If no value has been set for that key, returns null.- Specified by:
getPropertyin interfaceNamedBean- Parameters:
key- the property to get- Returns:
- The value of the property or null.
-
removeProperty
public void removeProperty(java.lang.String key)
Description copied from interface:NamedBeanRemove the key/value pair against the NamedBean.- Specified by:
removePropertyin interfaceNamedBean- Parameters:
key- the property to remove
-
getPropertyKeys
public java.util.Set<java.lang.String> getPropertyKeys()
Description copied from interface:NamedBeanRetrieve the complete current set of keys.- Specified by:
getPropertyKeysin interfaceNamedBean- Returns:
- empty set if none
-
getBeanType
public java.lang.String getBeanType()
Description copied from interface:NamedBeanFor instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Specified by:
getBeanTypein interfaceNamedBean- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
compareSystemNameSuffix
public int compareSystemNameSuffix(java.lang.String suffix1, java.lang.String suffix2, NamedBean n2)
Description copied from interface:NamedBeanCompare the suffix of this NamedBean's name with the suffix of the argument NamedBean's name for theNamedBean.compareTo(jmri.NamedBean)operation. This is intended to be a system-specific comparison that understands the various formats, etc.- Specified by:
compareSystemNameSuffixin interfaceNamedBean- Parameters:
suffix1- The suffix for the 1st bean in the comparisonsuffix2- The suffix for the 2nd bean in the comparisonn2- The other (second) NamedBean in the comparison- Returns:
- -1,0,+1 for ordering if the names are well-formed; may not provide proper ordering if the names are not well-formed.
-
-