senders

## Class UdpSender

- java.lang.Object
- - senders.Sender
  - - senders.UdpSender

-     public class UdpSender
      extends Sender

  Manages periodic sending of frames over UDP.
  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
    --- | ---
    `static java.lang.String` | `DEFAULT_DST_IP`
    `static int` | `DEFAULT_DST_PORT`
    `static Sender.SendingInterval` | `DEFAULT_INTERVAL_SECONDS`
    `static java.lang.String` | `DEFAULT_SRC_IP`
    `static int` | `DEFAULT_SRC_PORT`
    `private java.lang.String` | `dstIP`
    `private int` | `dstPort`
    `private static java.util.logging.Logger` | `LOG`
    `private java.util.concurrent.ScheduledExecutorService` | `scheduler`
    `private java.lang.String` | `srcIP`
    `private int` | `srcPort`

    - ### Fields inherited from class senders.Sender

      `connected`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UdpSender(java.lang.String srcIP, java.lang.String dstIP, int srcPort, int dstPort)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Runnable` | `getRunnable(PeriodicTelegramBase pt)` Creates a Runnable, which sends the given PeriodicTelegram to the UDP socket saved in this sender, from the UDP socket saved in this sender, and logs this operation's output.

    - ### Methods inherited from class senders.Sender

      `add, add, cancel, connect, isConnected, reschedule, shutdown`

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

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

- - ### Field Detail

    - #### DEFAULT_DST_IP

          public static final java.lang.String DEFAULT_DST_IP

      See Also:
        Constant Field Values

    - #### DEFAULT_DST_PORT

          public static final int DEFAULT_DST_PORT

      See Also:
        Constant Field Values

    - #### DEFAULT_INTERVAL_SECONDS

          public static final Sender.SendingInterval DEFAULT_INTERVAL_SECONDS

    - #### DEFAULT_SRC_IP

          public static final java.lang.String DEFAULT_SRC_IP

      See Also:
        Constant Field Values

    - #### DEFAULT_SRC_PORT

          public static final int DEFAULT_SRC_PORT

      See Also:
        Constant Field Values

    - #### dstIP

          private java.lang.String dstIP

    - #### dstPort

          private int dstPort

    - #### LOG

          private static final java.util.logging.Logger LOG

    - #### scheduler

          private final java.util.concurrent.ScheduledExecutorService scheduler

    - #### srcIP

          private java.lang.String srcIP

    - #### srcPort

          private int srcPort

  - ### Constructor Detail

    - #### UdpSender

          public UdpSender(java.lang.String srcIP,
                           java.lang.String dstIP,
                           int srcPort,
                           int dstPort)

  - ### Method Detail

    - #### getRunnable

          protected java.lang.Runnable getRunnable(PeriodicTelegramBase pt)

      Creates a Runnable, which sends the given PeriodicTelegram to the UDP socket saved in this sender, from the UDP socket 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