Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
pHSensor Class Reference

Interface for pH sensors. More...

#include <pHSensor.hpp>

Inheritance diagram for pHSensor:

Public Member Functions

virtual double getpH (double voltage)
 Convert voltage reading to pH value.
 
virtual std::string getSensorType ()
 Get the sensor type as a string, used for constructing MQTT topics.
 
virtual std::string toJSON (double voltage)
 Converts a voltage to a JSON object string for MQTT messages.
 

Detailed Description

Interface for pH sensors.

Defines functional interface for reading from and converting values from pH sensors.

Member Function Documentation

◆ getpH()

virtual double pHSensor::getpH ( double  voltage)
virtual

Convert voltage reading to pH value.

Returns
The pH as a double

Reimplemented in AtlasGravitypH, GenericPH, and AtlasEZOpH.

◆ getSensorType()

virtual std::string pHSensor::getSensorType ( )
virtual

Get the sensor type as a string, used for constructing MQTT topics.

Returns
The sensor manufacturer and type as a string

Reimplemented in AtlasGravitypH, GenericPH, and AtlasEZOpH.

◆ toJSON()

virtual std::string pHSensor::toJSON ( double  voltage)
virtual

Converts a voltage to a JSON object string for MQTT messages.

Returns
A sensor message with voltage as JSON

Reimplemented in AtlasEZOpH, AtlasGravitypH, and GenericPH.


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