Package cern.dip

Interface DipPublication

  • All Known Implementing Classes:
    DipPublicationImp, DipPublicationImpBase, MockDipPublication

    public interface DipPublication
    Interface for DIP publications. DipPublication objects are created through the DipFactoryInterface. This object represent's data that is available to subscribers using the DIP protocol and may be used by a publisher to send both primitive data types and DipData objects. The publisher will update a publication according to that publishers criteria (this is usually expected to be when the difference between the last value sent and the current value is sufficiently large).

    All send methods take as arguments the value to be sent and the timestamp which will accompany the value.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getTopicName()
      Returns Name of the publication.
      void send​(boolean[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(boolean value, DipTimestamp timestamp)
      Sends publication data
      void send​(byte[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(byte value, DipTimestamp timestamp)
      Sends publication data
      void send​(double[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(double value, DipTimestamp timestamp)
      Sends publication data
      void send​(float[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(float value, DipTimestamp timestamp)
      Sends publication data
      void send​(int[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(int value, DipTimestamp timestamp)
      Sends publication data
      void send​(long[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(long value, DipTimestamp timestamp)
      Sends publication data
      void send​(short[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(short value, DipTimestamp timestamp)
      Sends publication data
      void send​(DipData value, DipTimestamp timestamp)
      Send complex data object.
      void send​(DipData value, DipTimestamp timestamp, int dipQuality, java.lang.String qualityReason)
      Send complex data object with quality information
      void send​(java.lang.String[] value, DipTimestamp timestamp)
      Sends publication data
      void send​(java.lang.String value, DipTimestamp timestamp)
      Sends publication data
      void setQualityBad()
      The quality of the last sent data is set to bad.
      void setQualityBad​(java.lang.String reason)
      As setQualityBad() but enables the user to pass a string to the clients explaining why there is a problem
      void setQualityUncertain()
      The quality of the last sent data is set to uncertain.
      void setQualityUncertain​(java.lang.String reason)
      As setQualityUncertain() but enables the user to pass a string to the clients explaining why there is a problem
    • Method Detail

      • getTopicName

        java.lang.String getTopicName()
        Returns Name of the publication.
      • send

        void send​(double value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(double[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(short value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(short[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(int value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(int[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(float value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(float[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(long value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(long[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(byte value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(byte[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(boolean value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(boolean[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(java.lang.String value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(java.lang.String[] value,
                  DipTimestamp timestamp)
           throws DipException
        Sends publication data
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        Throws:
        DipException
      • send

        void send​(DipData value,
                  DipTimestamp timestamp,
                  int dipQuality,
                  java.lang.String qualityReason)
           throws DipException
        Send complex data object with quality information
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        dipQuality - - the quality of the data
        qualityReason - - the reason for the data quality
        Throws:
        DipException
      • setQualityBad

        void setQualityBad()
                    throws DipException
        The quality of the last sent data is set to bad. If this causes a change to the previous quality then the data (value, quality and timestamp) will be sent to all clients. This quality is to be used when the data obtained from the source for the publication is not valid. So instead of introducing bad data into DIP (and thus overwriting the last good value), the quality is set to bad, so still making the last good value available to clients who can make use of it.
        Throws:
        DipException
      • setQualityBad

        void setQualityBad​(java.lang.String reason)
                    throws DipException
        As setQualityBad() but enables the user to pass a string to the clients explaining why there is a problem
        Throws:
        DipException
      • setQualityUncertain

        void setQualityUncertain()
                          throws DipException
        The quality of the last sent data is set to uncertain. If this causes a change to the previous quality then the data (value, quality and timestamp) will be sent to all clients. This quality is to be used when the data source for the publication is not reachable - thus we can not be certain if the value last sent is still valid.
        Throws:
        DipException
      • setQualityUncertain

        void setQualityUncertain​(java.lang.String reason)
                          throws DipException
        As setQualityUncertain() but enables the user to pass a string to the clients explaining why there is a problem
        Throws:
        DipException