Class SerialDCCppPacketizer

All Implemented Interfaces:
DCCppInterface
Direct Known Subclasses:
DCCppEthernetPacketizer

public class SerialDCCppPacketizer
extends DCCppPacketizer
This is an extension of the DCCppPacketizer to handle the device specific requirements of the DCC++.

In particular, SerialDCCppPacketizer adds functions to add and remove the "<" and ">" bytes that appear around any message read in. Note that the bracket-adding could be pushed up to DCCppPacketizer, as it is a protocol thing, not an interface implementation thing. We'll come back to that later. What is however interface specific is the background refresh of functions. DCC++ sends the DCC commands exactly once. A background thread will repeat the last seen function commands to compensate for any momentary power loss or to recover from power off / power on events. It only makes sense to do this on the actual serial interface as it will be transparent for the network clients.