Interface Measurement


  • public interface Measurement
    A measurement with a continuous numeric value (double) such as: angle, voltage, active power and so on. Can have properties in addition of explicit fields to add precisions about the measurement if necessary.
    Author:
    Miora Ralambotiana
    • Method Detail

      • getId

        String getId()
        Get ID of the measurement if it exists. It is optional (can be null).
      • getPropertyNames

        Set<String> getPropertyNames()
        Get all the property names with values applied to this measurement.
      • getProperty

        String getProperty​(String name)
        Return property value associated to the given property name if it exists, else return null.
      • putProperty

        Measurement putProperty​(String name,
                                String property)
        Put a given property value associated with a given property name.
      • removeProperty

        Measurement removeProperty​(String name)
        Remove the property value associated with the given property name if it exists. Else, do nothing.
      • setValue

        Measurement setValue​(double value)
        Set measurement value. Can not be NaN if the measurement is valid.
      • getValue

        double getValue()
        Get measurement value.
      • setStandardDeviation

        Measurement setStandardDeviation​(double standardDeviation)
        Set the standard deviation.
      • getStandardDeviation

        double getStandardDeviation()
        Get the standard deviation. Return NaN if unspecified.
      • isValid

        boolean isValid()
        Get validity status of the measurement. If it is true (i.e. the measurement is valid), the measured value can not be NaN.
      • setValid

        Measurement setValid​(boolean valid)
        Set validity status of the measurement. If it is true (i.e. the measurement is valid), the measured value can not be NaN.
      • remove

        void remove()
        Remove the measurement from the equipment.