|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.micheldalal.x10.test.X10Test
Sample class to show how to use X10 communication stuff.
On Linux, tested with rxtx version 2.0-5.
This particular test program uses the Nevelex Arguments API for command-line argument processing.
| Nested Class Summary | |
(package private) class |
X10Test.HouseCodeArgumentCommand
Used to specify the house code. |
(package private) class |
X10Test.PortArgumentCommand
Command pattern class implementing the Port Argument. |
(package private) class |
X10Test.RunModeArgumentCommand
Command pattern class implementing the Run Mode Argument. |
(package private) class |
X10Test.UnitIDArgumentCommand
Used to specify the unit id. |
| Field Summary | |
static java.lang.String |
LINUX_DEFAULT_PORT
The default serial port. |
static java.lang.String |
WINDOWS_DEFAULT_PORT
|
| Constructor Summary | |
X10Test()
Constructor for this object just initializes into a house code of 'A', a unit id of 1 and the run mode is unset. |
|
| Method Summary | |
void |
checkArgumentState()
The method is called by the ArgumentProcessor after all the arguments have been processed by the application. |
void |
initArgumentState()
The method is called by the ArgumentProcessor before any the arguments have been processed by the application. |
static void |
main(java.lang.String[] args)
Start of the main program. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String LINUX_DEFAULT_PORT
public static final java.lang.String WINDOWS_DEFAULT_PORT
| Constructor Detail |
public X10Test()
| Method Detail |
public void initArgumentState()
throws java.lang.IllegalStateException
ArgumentCommands
with the ArgumentProcessor.
initArgumentState in interface com.nevelex.app.args.ArgumentConsumerjava.lang.IllegalStateException - thrown if the application is not in the desired state.X10Test.PortArgumentCommand,
ArgumentProcessor
public void checkArgumentState()
throws com.nevelex.app.args.MissingArgumentException
checkArgumentState in interface com.nevelex.app.args.ArgumentConsumercom.nevelex.app.args.MissingArgumentException - thrown if the argument list did not contain all the required arguments.public static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||