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 <miora.ralambotiana at rte-france.com>
  • Method Details

    • getId

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

      Get the type of the measurement (specify what it is measured, see DiscreteMeasurement.Type).
    • 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.
    • putProperty

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

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

      Get the type of measured discrete value (int, boolean or string, see DiscreteMeasurement.ValueType).
    • 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.
    • setValue

      DiscreteMeasurement setValue(String value)
      Set the discrete measured value and set the value type as STRING (see DiscreteMeasurement.ValueType). Can not be null if the measurement is valid.
    • setValue

      DiscreteMeasurement setValue(int value)
      Set the discrete measured value and set the value type as INT (see DiscreteMeasurement.ValueType).
    • setValue

      DiscreteMeasurement setValue(boolean value)
      Set the discrete measured value and set the value type as BOOLEAN (see DiscreteMeasurement.ValueType).
    • 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.