senders

## Class CommSender

- java.lang.Object
- - senders.Sender
  - - senders.CommSender

-     public class CommSender
      extends Sender

  Manages periodic sending of frames over a serial port via IQRF device.
  Author:
    David Hudec (dwdization@gmail.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class senders.Sender

      `Sender.SendingInterval`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `commPortName`
    `static java.lang.String` | `DEFAULT_COMM_PORT`
    `private IqrfDeviceModel` | `device`
    `private static java.util.logging.Logger` | `LOG`

    - ### Fields inherited from class senders.Sender

      `connected, scheduler`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommSender(java.lang.String commPortName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connect()` Creates an IQRF device model for the device on port specified in this sender.
    `protected java.lang.Runnable` | `getRunnable(PeriodicTelegramBase pt)` Creates a Runnable, which sends the given PeriodicTelegram to the IQRF device, using the IQRF device model saved in this sender and logs this operation's output.
    `void` | `shutdown()` Terminates the sending process and, if applicable, connected devices and channels.

    - ### Methods inherited from class senders.Sender

      `add, add, cancel, isConnected, reschedule`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### commPortName

          private java.lang.String commPortName

    - #### DEFAULT_COMM_PORT

          public static final java.lang.String DEFAULT_COMM_PORT

    - #### device

          private IqrfDeviceModel device

    - #### LOG

          private static final java.util.logging.Logger LOG

  - ### Constructor Detail

    - #### CommSender

          public CommSender(java.lang.String commPortName)

  - ### Method Detail

    - #### connect

          public void connect()
                       throws jssc.SerialPortException

      Creates an IQRF device model for the device on port specified in this sender.
      Overrides:
        `connect` in class `Sender`
      Throws:
        `jssc.SerialPortException` - in case of read/write error

    - #### getRunnable

          protected java.lang.Runnable getRunnable(PeriodicTelegramBase pt)

      Creates a Runnable, which sends the given PeriodicTelegram to the IQRF device, using the IQRF device model saved in this sender and logs this operation's output. If the Telegram's data is set to fluctuate, it is fluctuated. The result is also stored in the PeriodicTelegram's status.
      Specified by:
        `getRunnable` in class `Sender`
      Parameters:
        `pt` - PeriodicTelegram to be periodically sent
      Returns:
        Runnable for sending this telegram

    - #### shutdown

          public void shutdown()

      Description copied from class: `Sender`
      Terminates the sending process and, if applicable, connected devices and channels.
      Overrides:
        `shutdown` in class `Sender`