Interface DiscreteMeasurement


  • public interface DiscreteMeasurement
    A measurement with a discrete value (string, boolean or int) such as: tap position, switch position 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).
      • getTapChanger

        DiscreteMeasurement.TapChanger getTapChanger()
        Get the tap changer the measurement is applied on if necessary (see DiscreteMeasurement.TapChanger). Must be null if the measurement is not applied to a tap changer. Throw an exception if the extended equipment is not a transformer. Must be not null if the measurement is not applied to a tap changer, else throw an exception.
      • 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.
      • removeProperty

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

        String getValueAsString()
        Get value as String if the type of measured discrete value is STRING (see DiscreteMeasurement.ValueType). Else throw an exception.
      • getValueAsInt

        int getValueAsInt()
        Get value as int if the type of measured discrete value is INT (see DiscreteMeasurement.ValueType). Else throw an exception.
      • getValueAsBoolean

        boolean getValueAsBoolean()
        Get value as boolean if the type of measured discrete value is BOOLEAN (see DiscreteMeasurement.ValueType). Else throw an exception.
      • isValid

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

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

        void remove()
        Remove the measurement from the equipment.