Class AbstractTmDataLink

    • Field Detail

      • updateSimulationTime

        protected boolean updateSimulationTime
    • Constructor Detail

      • AbstractTmDataLink

        public AbstractTmDataLink()
    • Method Detail

      • init

        public void init​(String instance,
                         String name,
                         YConfiguration config)
        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 AbstractLink
        config - - the configuration - cannot be null (but can be empty)
      • collectSystemParameters

        protected void collectSystemParameters​(long time,
                                               List<ParameterValue> list)
        Description copied from class: AbstractLink
        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

        Overrides:
        collectSystemParameters in class AbstractLink
      • getDataInCount

        public long getDataInCount()
        Specified by:
        getDataInCount in interface Link
      • getDataOutCount

        public long getDataOutCount()
        Specified by:
        getDataOutCount in interface Link
      • processPacket

        protected void processPacket​(TmPacket tmpkt)
        Sends the packet downstream for processing.

        Starting in Yamcs 5.2, if the updateSimulationTime option is set on the link configuration,

        • the timeService is expected to be SimulationTimeService
        • at initialization, the time0 is set to 0
        • upon each packet received, the generationTime (as set by the pre-processor) is used to update the simulation elapsed time

        Should be called by all sub-classes (instead of directly calling TmSink.processPacket(TmPacket)

        Parameters:
        tmpkt -
      • updateStats

        protected void updateStats​(int packetSize)
        called when a new packet is received to update the statistics
        Parameters:
        packetSize -
      • resetCounters

        public void resetCounters()
        Specified by:
        resetCounters in interface Link