description: >
    Implement to provide sensor readings.  Objects implementing Sensor.Value
    must be instantiated in the correct hierarchy within the sensors
    namespace.  The following sensor hierarchies are recognized:
      airflow
      altitude
      current
      energy
      fan_tach
      humidity
      power
      pressure
      temperature
      utilization
      voltage

    Any service implementing Sensor.Value on one or more objects must implement
    org.freedesktop.DBus.ObjectManager on /xyz/openbmc_project/sensors.

    All Sensor.Value properties are read-only.

properties:
    - name: Value
      type: double
      description: >
          The sensor reading.
    - name: MaxValue
      type: double
      default: infinity
      description: >
          The Maximum supported sensor reading.
    - name: MinValue
      type: double
      default: -infinity
      description: >
          The Minimum supported sensor reading.
    - name: Unit
      type: enum[self.Unit]
      description: >
          The unit of the reading.  Immutable once set for a sensor. For objects
          in the airflow namespace, Unit must be "CFM" For objects in the
          altitude namespace, Unit must be "Meters". For objects in the current
          namespace, Unit must be "Amperes". For objects in the energy
          namespace, Unit must be "Joules". For objects in the fan_tach
          namespace, Unit must be "RPMS". For objects in the humidity namespace,
          Unit must be "PercentRH" For objects in the power namespace, Unit must
          be "Watts". For objects in the pressure namespace, Unit must be
          "Pascals" For objects in the temperature namespace, Unit must be
          "DegreesC". For objects in the utilization namespace, Unit must be
          "Percent" For objects in the voltage namespace, Unit must be "Volts".

enumerations:
    - name: Unit
      description: >
          A sensor reading unit.
      values:
          - name: Amperes
            description: >
                Electrical charge flow rate as Amperes.
          - name: CFM
            description: >
                To calculate Air Flow in Cubic Feet per Minute
          - name: DegreesC
            description: >
                Temperature as degrees Celsius.
          - name: Joules
            description: >
                Energy transfer as Joules.
          - name: Meters
            description: >
                Length as meters.
          - name: Percent
            description: >
                Resource utilization as a percentage.
          - name: PercentRH
            description: >
                Relative humidity as a percentage.
          - name: Pascals
            description: >
                Pressure as pascals.
          - name: RPMS
            description: >
                Frequency of rotation as revolutions per minute.
          - name: Volts
            description: >
                Electomotive force as volts.
          - name: Watts
            description: >
                Rate of energy transfer as Watts.

associations:
    - name: inventory
      description: >
          Sensors may implement an 'inventory' to 'sensors' association with the
          inventory item related to it.
      reverse_names:
          - sensors
      required_endpoint_interfaces:
          - xyz.openbmc_project.Inventory.Item
    - name: monitoring
      description: >
          Sensors may monitor the BMC's resource utilization and implement an
          associatoin to the Bmc item.
      reverse_names:
          - monitored_by
      required_endpoint_interfaces:
          - xyz.openbmc_project.Inventory.Item.Bmc