|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.DefaultLogix
public class DefaultLogix
Class providing the basic logic of the Logix interface.
| Field Summary |
|---|
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
mSystemName, mUserName |
| Fields inherited from interface jmri.Logix |
|---|
LISTENER_TYPE_CONDITIONAL, LISTENER_TYPE_FASTCLOCK, LISTENER_TYPE_LIGHT, LISTENER_TYPE_MEMORY, LISTENER_TYPE_OBLOCK, LISTENER_TYPE_SENSOR, LISTENER_TYPE_SIGNALHEAD, LISTENER_TYPE_SIGNALMAST, LISTENER_TYPE_TURNOUT, LISTENER_TYPE_WARRANT |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
DefaultLogix(String systemName)
|
|
DefaultLogix(String systemName,
String userName)
|
|
| Method Summary | |
|---|---|
void |
activateLogix()
Activate the Logix, starts Logix processing by connecting all inputs that are included the Conditionals in this Logix. |
boolean |
addConditional(String systemName,
int order)
Add a Conditional to this Logix Returns true if Conditional was successfully added, returns false if the maximum number of conditionals has been exceeded. |
void |
calculateConditionals()
Calculate all Conditionals, triggering action if the user specified conditions are met, and the Logix is enabled. |
void |
deActivateLogix()
Deactivate the Logix. |
String[] |
deleteConditional(String systemName)
Delete a Conditional and remove it from this Logix Note: Since each Logix must have at least one Conditional to do anything, the user is warned in Logix Table Action when the last Conditional is deleted. |
String |
getConditionalByNumberOrder(int order)
Returns the system name of the conditional that will calculate in the specified order. |
boolean |
getEnabled()
Get enabled status |
int |
getNumConditionals()
Get number of Conditionals for this Logix |
int |
getState()
Not needed for Logixs - included to complete implementation of the NamedBean interface. |
void |
setEnabled(boolean state)
Set enabled status. |
void |
setState(int state)
Not needed for Logixs - included to complete implementation of the NamedBean interface. |
void |
swapConditional(int nextInOrder,
int row)
Move 'row' to 'nextInOrder' and shift all between 'row' and 'nextInOrder' up one position ( row > nextInOrder ) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLogix(String systemName,
String userName)
public DefaultLogix(String systemName)
| Method Detail |
|---|
public int getNumConditionals()
getNumConditionals in interface Logix
public void swapConditional(int nextInOrder,
int row)
swapConditional in interface Logixpublic String getConditionalByNumberOrder(int order)
getConditionalByNumberOrder in interface Logixorder - - order in which the Conditional calculates.
public boolean addConditional(String systemName,
int order)
addConditional in interface LogixsystemName - The Conditional system nameorder - - the order this conditional should calculate in
if order is negative, the conditional is added
at the end of current group of conditionalspublic void setEnabled(boolean state)
setEnabled in interface Logixpublic boolean getEnabled()
getEnabled in interface Logixpublic String[] deleteConditional(String systemName)
Note: Since each Logix must have at least one Conditional to do anything, the user is warned in Logix Table Action when the last Conditional is deleted.
Returns true if Conditional was successfully deleted, otherwise returns false.
deleteConditional in interface LogixsystemName - The Conditional system namepublic void calculateConditionals()
calculateConditionals in interface Logixpublic void activateLogix()
A Logix must be activated before it will calculate any of its Conditionals.
activateLogix in interface Logixpublic void deActivateLogix()
A Logix must be deactivated before it's Conditionals are changed.
deActivateLogix in interface Logixpublic int getState()
getState in interface NamedBeanpublic void setState(int state)
setState in interface NamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||