Embedded Artistry C Interfaces
A reference collection of abstract interfaces in C.
Public Attributes | List of all members
HumiditySensor Struct Reference

Virtual Relative Humidity Sensor Interface. More...

#include <humidity_sensor.h>

Public Attributes

bool(* getHumidity )(uint8_t *const humidity)
 Get the current relative humidity. More...
 

Detailed Description

Virtual Relative Humidity Sensor Interface.

A standard interface for a device which can measure relative humidity.

This device returns relative humdity, rounded to the nearest whole percentage.

Fundamental Assumptions

Implementation Notes

Definition at line 60 of file humidity_sensor.h.

Member Data Documentation

◆ getHumidity

bool(* HumiditySensor::getHumidity) (uint8_t *const humidity)

Get the current relative humidity.

Precondition
The sensor has been properly initialized by the system.
The humidity parameter is not NULL.
Postcondition
If the measurement is valid, the data pointed to by the humidity parameter will be updated with the latest reading.
If the measurement is invalid, the data pointed to by the humidity parameter will remain unchanged.
Parameters
[in,out]Currentrelative humidity in %. Humidity is specified as an integral perecentage.
Returns
True if the sample is valid, false if invalid (e.g., an error occured)

Definition at line 76 of file humidity_sensor.h.


The documentation for this struct was generated from the following file: