Class AbstractDigitalAction

All Implemented Interfaces:
Comparable<NamedBean>, PropertyChangeProvider, Base, DigitalAction, DigitalActionBean, NamedBean
Direct Known Subclasses:
ActionAtomicBoolean, ActionAudio, ActionAudioIcon, ActionBlock, ActionClearSlots, ActionClock, ActionClockRate, ActionCreateBeansFromTable, ActionDispatcher, ActionEntryExit, ActionFindTableRowOrColumn, ActionLayoutTurnout, ActionLight, ActionLightIntensity, ActionListenOnBeans, ActionListenOnBeansLocalVariable, ActionListenOnBeansTable, ActionLocalVariable, ActionMemory, ActionOBlock, ActionPositionable, ActionPositionableByClass, ActionPower, ActionReporter, ActionRequestUpdateAllSensors, ActionRequestUpdateOfSensor, ActionRequestUpdateOfTurnout, ActionScript, ActionSensor, ActionSetReporter, ActionShutDownTask, ActionSignalHead, ActionSignalMast, ActionSound, ActionTable, ActionThrottle, ActionThrottleFunction, ActionTimer, ActionTurnout, ActionTurnoutLock, ActionUpdateSlots, ActionWarrant, Break, Continue, DigitalCallModule, DigitalFormula, DigitalMany, DoAnalogAction, DoStringAction, EnableLogix, EnableLogixNG, Error, ExecuteAction, ExecuteDelayed, ExecuteProgram, Exit, For, ForEach, ForEachWithDelay, IfThenElse, JsonDecode, LogData, Logix, LogLocalVariables, OperationsProStartAutomation, ProgramOnMain, Publish, Return, RunOnce, SendMergCbusEvent, Sequence, SetLocalVariables, SetSpeedZero, ShowDialog, ShutdownComputer, SimulateTurnoutFeedback, Subscribe, TableForEach, Timeout, TriggerRoute, WebBrowser, WebRequest, WindowManagement

public abstract class AbstractDigitalAction extends AbstractBase implements DigitalActionBean
The base class for LogixNG Actions
  • Constructor Details

  • Method Details

    • getParent

      public Base getParent()
      Get the parent.

      The following rules apply

      • LogixNGs has no parent. The method throws an UnsupportedOperationException if called.
      • Expressions and actions has the male socket that they are connected to as their parent.
      • Male sockets has the female socket that they are connected to as their parent.
      • The parent of a female sockets is the LogixNG, expression or action that has this female socket.
      • The parent of a male sockets is the same parent as the expression or action that it contains.
      Specified by:
      getParent in interface Base
      Returns:
      the parent of this object
    • setParent

      public void setParent(Base parent)
      Set the parent.

      The following rules apply

      • ExecutionGroups has no parent. The method throws an UnsupportedOperationException if called.
      • LogixNGs has the execution group as its parent.
      • Expressions and actions has the male socket that they are connected to as their parent.
      • Male sockets has the female socket that they are connected to as their parent.
      • The parent of a female sockets is the LogixNG, expression or action that has this female socket.
      • The parent of a male sockets is the same parent as the expression or action that it contains.
      Specified by:
      setParent in interface Base
      Parameters:
      parent - the new parent of this object
    • getPreferredSocketPrefix

    • getNewSocketName

    • getNewSocketName

      public String getNewSocketName(String[] names)
    • getBeanType

      public String getBeanType()
      Description copied from interface: NamedBean
      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.
      Specified by:
      getBeanType in interface NamedBean
      Returns:
      a string of the bean type, eg Turnout, Sensor etc
    • setState

      public void setState(int s) throws JmriException
      Description copied from interface: NamedBean
      Provide 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:
      setState in interface NamedBean
      Parameters:
      s - the state
      Throws:
      JmriException - general error when setting the state fails
    • getState

      public int getState()
      Description copied from interface: NamedBean
      Provide 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.

      Specified by:
      getState in interface NamedBean
      Returns:
      the state