/************************************************************************** * * Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file FlowSensor.h * * @author (last) Sean Nash * @date (last) 21-Nov-2024 * * @author (original) Sean Nash * @date (original) 21-Nov-2024 * ***************************************************************************/ #ifndef __FLOW_SENSOR_H__ #define __FLOW_SENSOR_H__ #include "DDCommon.h" /** * @defgroup FlowSensor FlowSensor * @brief Flow sensors driver unit. Reads the flow rates and temperatures * from the various RO flow sensors. * * @addtogroup FlowSensor * @{ */ // ********** public definitions ********** #define MIN_FLOW 0 ///< Minimum flow value used for overriding #define MAX_FLOW 2000 ///< Maximum flow value used for overriding /// Enumeration of flow sensors handled by this unit. typedef enum FlowSensors { P7_FLOW = 0, ///< Water inlet flow sensor (FMS P7) FLOW_SENSOR_FIRST = P7_FLOW, ///< First flow P16_FLOW, ///< RO outlet flow sensor (FMP P16) NUM_OF_FLOW_SENSORS ///< Number of flow sensors } FLOW_SENSORS_T; // ********** public function prototypes ********** void initFlowSensor( void ); void readFlowSensors( void ); S32 getFlowRate( FLOW_SENSORS_T sensor ); F32 getFlowTemperature( FLOW_SENSORS_T sensor ); BOOL testFlowSensorReadingsOverride( MESSAGE_T *message ); BOOL testFlowSensorTemperatureReadingsOverride( MESSAGE_T *message ); /**@}*/ #endif