The package structure has to take two kinds of variation into account:
Our strategy is to use explicit interfaces for each device protocol, implemented by a polymorphic TrafficController for each adapter type.
For example, the primary {@link jmri.jmrix.powerline.SerialTrafficController} abstract class has an interface for sending {@link jmri.jmrix.powerline.X10Sequence} objects. An {@link jmri.jmrix.powerline.X10Sequence} encapulates just the X10 commands, not the particular message needed to send them. When the {@link jmri.jmrix.powerline.X10Sequence} is passed to the specific SerialTrafficController implementation, e.g. {@link jmri.jmrix.powerline.cm11.SpecificTrafficController}, it's encapsulated in one or more {@link jmri.jmrix.powerline.cm11.SpecificMessage} objects, queued and sent.
The setup is done in {@link jmri.jmrix.powerline.serialdriver.SerialDriverAdapter}, which keys off the adapter name in option1.