Class AbstractLink

    • Constructor Detail

      • AbstractLink

        public AbstractLink()
    • Method Detail

      • 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
        config - - the configuration - cannot be null (but can be empty)
        Throws:
        ConfigurationException
      • getConfig

        public YConfiguration getConfig()
        Specified by:
        getConfig in interface Link
        Returns:
        the config (args) used when creating the link
      • getName

        public String getName()
        Description copied from interface: Link
        Return the name of the link
        Specified by:
        getName in interface Link
      • getLinkStatus

        public Link.Status getLinkStatus()
        Description copied from interface: Link
        Returns the current link status.
        Specified by:
        getLinkStatus in interface Link
      • getDetailedStatus

        public String getDetailedStatus()
        Specified by:
        getDetailedStatus in interface Link
        Returns:
        more detailed status information
      • getEventLoop

        protected static io.netty.channel.nio.NioEventLoopGroup getEventLoop()
      • enable

        public void enable()
        Sets the disabled to false such that getNextPacket does not ignore the received datagrams
        Specified by:
        enable in interface Link
      • disable

        public void disable()
        Description copied from interface: Link
        Disable any data I/O through this link. Any connection to a server is closed. Can be reenabled using the enable method. Note that this method can be called before starting the service if it's configured as such in the configuration file
        Specified by:
        disable in interface Link
      • isDisabled

        public boolean isDisabled()
        Specified by:
        isDisabled in interface Link
      • isRunningAndEnabled

        public boolean isRunningAndEnabled()
      • connectionStatus

        protected abstract Link.Status connectionStatus()
        In case the link should be connected (i.e. is running and enabled) this method is called to return the actual connection status
      • getCurrentTime

        protected long getCurrentTime()
      • getSystemParameters

        public List<ParameterValue> getSystemParameters()
        Description copied from interface: SystemParametersProducer
        return the next bunch of parameter values. The values must contain a reference to a Parameter (i.e. parameter definition) and that Parameter does not need to be coming from the XtceDB - the provider can just make it up on the fly.
        Specified by:
        getSystemParameters in interface SystemParametersProducer
      • collectSystemParameters

        protected void collectSystemParameters​(long time,
                                               List<ParameterValue> list)
        adds system parameters link status and data in/out to the list.

        The inheriting classes should call super.collectSystemParameters and then add their own parameters to the list

        Parameters:
        time -
        list -