Class TcpTmDataLink

java.lang.Object
com.google.common.util.concurrent.AbstractService
All Implemented Interfaces:
com.google.common.util.concurrent.Service, Runnable, SystemParametersProducer, Link, LinkActionProvider, TmPacketDataLink

public class TcpTmDataLink extends AbstractTmDataLink implements Runnable
  • Field Details

    • tmSocket

      protected Socket tmSocket
    • host

      protected String host
    • port

      protected int port
    • initialDelay

      protected long initialDelay
  • Constructor Details

    • TcpTmDataLink

      public TcpTmDataLink()
  • Method Details

    • getSpec

      public Spec getSpec()
      Description copied from interface: Link
      Returns the valid configuration of the input args of this link.
      Specified by:
      getSpec in interface Link
      Returns:
      the argument specification, or null if the args should not be validated.
    • init

      public void init(String instance, String name, YConfiguration config) throws ConfigurationException
      Description copied from interface: Link
      Called at startup to initialize the link.

      The config corresponds to the map that is under the link definition in yamcs.instance.yaml.

      Specified by:
      init in interface Link
      Overrides:
      init in class AbstractTmDataLink
      config - - the configuration - cannot be null (but can be empty)
      Throws:
      ConfigurationException
    • openSocket

      protected void openSocket() throws IOException
      Throws:
      IOException
    • doStart

      public void doStart()
      Specified by:
      doStart in class com.google.common.util.concurrent.AbstractService
    • doStop

      public void doStop()
      Specified by:
      doStop in class com.google.common.util.concurrent.AbstractService
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getNextPacket

      public TmPacket getNextPacket()
    • doDisable

      public void doDisable()
      Overrides:
      doDisable in class AbstractLink
    • doEnable

      public void doEnable()
      Overrides:
      doEnable in class AbstractLink
    • getDetailedStatus

      public String getDetailedStatus()
      Description copied from interface: Link
      Returns a short detail status (one-line)
      Specified by:
      getDetailedStatus in interface Link
      Overrides:
      getDetailedStatus in class AbstractLink
    • connectionStatus

      protected Link.Status connectionStatus()
      Description copied from class: AbstractLink
      In case the link should be connected (i.e. is running and enabled) this method is called to return the actual connection status
      Specified by:
      connectionStatus in class AbstractLink