The package structure has to take two kinds of variation into account:
- Multiple adapters, e.g. as shown on the compatibility page. Each of these has its own serial protocol, including its own message format.
- Multiple device families and types, starting with X10, but later including Insteon and perhaps others. Individual adapters might support one or several of these.
Our strategy is to use explicit interfaces for each device protocol, implemented by a polymorphic TrafficController for each adapter type.
For example, the primary
abstract class has an interface for sending
X10Sequence encapulates just the X10 commands, not
the particular message needed to send them.
X10Sequence is passed
to the specific SerialTrafficController implementation,
it's encapsulated in one or more
objects, queued and sent.
The setup is done in
SerialDriverAdapter, which keys off the
adapter name in option1.
Related DocumentationOther sources of documentation
Interface Summary Interface Description InsteonSequence.CommandRepresent a single Insteon command, which is either a "set address" or "do function" operation SerialInterfaceInterface to send/receive serial information SerialListenerListener interface to be notified about serial traffic X10Sequence.CommandRepresent a single X10 command, which is either a "set address" or "do function" operation
Class Summary Class Description Bundle InsteonSequenceRepresent a sequence of one or more Insteon commands (addresses and functions). InsteonSequence.AddressRepresent a single "set address" Insteon command InsteonSequence.ExtDataRepresent a single "Extended Data" Insteon command InsteonSequence.FunctionRepresent a single "do function" Insteon command SerialAddressUtility Class supporting parsing and testing of addresses. SerialConnectionTypeListReturns a list of valid Powerline Connection Types SerialLightImplementation of the Light Object for Powerline devices. SerialLightManagerImplement LightManager for Powerline serial systems. SerialMessageContains the data payload of a serial packet. SerialPortControllerAbstract base for classes representing a communications port. SerialReplyContains the data payload of a serial reply packet. SerialSensorExtend jmri.AbstractSensor for serial systems SerialSensorManagerManage the system-specific Sensor implementation. SerialSystemConnectionMemoLightweight class to denote that a system is active, and provide general information. SerialTrafficControllerConverts Stream-based I/O to/from messages. SerialTurnoutTurnout implementation for X10. SerialTurnoutManagerImplement turnout manager for Powerline systems. SerialX10LightImplementation of the Light class for X10-based subclasses. X10SequenceRepresent a sequence of one or more X10 commands (addresses and functions). X10Sequence.AddressRepresent a single "set address" X10 command X10Sequence.ExtDataRepresent a single "Extended Data" X10 command X10Sequence.FunctionRepresent a single "do function" X10 command