Index: NVDataMgmtDGRecords.h =================================================================== diff -u -r449284762afeab963030f9eccd6cfded649abbad -r7a8126075d566078097485bf4757f2a380a1ef98 --- NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 449284762afeab963030f9eccd6cfded649abbad) +++ NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 7a8126075d566078097485bf4757f2a380a1ef98) @@ -8,7 +8,7 @@ * @file NVDataMgmtDGRecords.h * * @author (last) Dara Navaei -* @date (last) 24-Apr-2022 +* @date (last) 01-Jul-2022 * * @author (original) Dara Navaei * @date (original) 12-Feb-2021 @@ -31,8 +31,13 @@ // ********** public definitions ********** -#define MAX_TOP_LEVEL_PN_CHARS 10U ///< Max number of characters for top level part number. -#define MAX_TOP_LEVEL_SN_CHARS 15U ///< Max number of characters for top level serial number. +#define MAX_TOP_LEVEL_PN_CHARS 10U ///< Max number of characters for top level part number. +#define MAX_TOP_LEVEL_SN_CHARS 15U ///< Max number of characters for top level serial number. +#define PRES_SENSORS_RESERVED_SPACE_COUNT 5 ///< Pressure sensors reserved space count. +#define FLOW_SENSROS_RESERVED_SPACE_COUNT 2 ///< Flow sensors reserved space count. +#define TEMP_SENSORS_RESERVED_SPACE_COUNT 2 ///< Temperature sensors reserved space count. +#define COND_SENSORS_RESERVED_SPACE_COUNT 2 ///< Conductivity sensors reserved space count. +#define GENERIC_VOL_RESERVED_SPACE_COUNT 4 ///< Generic volumes reserved space count. #ifndef _RELEASE_ /// Software configuration enums @@ -100,6 +105,7 @@ CAL_DATA_RO_PUMP_OUTLET_PRES_SENSOR, ///< DG calibration data RO pump outlet pressure sensor. CAL_DATA_DRAIN_PUMP_INLET_PRES_SENSOR, ///< DG calibration data drain pump inlet pressure sensor. CAL_DATA_DRAIN_PUMP_OUTLET_PRES_SENSOR, ///< DG calibration data drain pump outlet pressure sensor. + CAL_DATA_BAROMETRIC_PRES_SENSOR, ///< DG calibration data barometric pressure sensor. NUM_OF_CAL_DATA_PRES_SENSORS, ///< Number of calibration data pressure sensors. } CAL_DATA_DG_PRES_SENSORS_T; @@ -139,6 +145,9 @@ CAL_DATA_OUTLET_PRIMARY_HEATER_TEMP, ///< Outlet primary heater temperature sensor. CAL_DATA_COND_SENSOR_1_TEMP, ///< Conductivity sensor 1 temperature sensor. CAL_DATA_COND_SENSOR_2_TEMP, ///< Conductivity sensor 2 temperature sensor. + CAL_DATA_HEAT_DISINFECT_TEMP, ///< Heat disinfect temperature sensor. + CAL_DATA_INTERNAL_THD_TEMP, ///< Heat disinfect internal ADC temperature sensor. + CAL_DATA_BARMOTERIC_TEMP, ///< Barometric temperature sensor. NUM_OF_CAL_DATA_TEMP_SENSORS, ///< Number of temperature sensors. } CAL_DATA_DG_TEMP_SENSORS_T; @@ -205,12 +214,20 @@ /// DG scheduled runs enumeration. typedef enum dg_scheduled_runs { - FLUSH = 0, ///< Flush run. - HEAT_DISINFECT, ///< Heat disinfect run. - CHEMICAL_DISINFECT, ///< Chemical disinfect run. + RUN_FLUSH = 0, ///< Flush run. + RUN_HEAT_DISINFECT, ///< Heat disinfect run. + RUN_CHEMICAL_DISINFECT, ///< Chemical disinfect run. NUM_OF_DG_SCHEDULED_RUNS ///< Number of DG scheduled runs. } SCHEDULED_DG_RUNS_T; +/// Disinfect types +typedef enum dg_disinfects +{ + USAGE_INFO_HEAT_DISINFECT = 0, ///< Heat disinfect. + USAGE_INFO_CHEMICAL_DISINFECT, ///< Chemical disinfect. + NUM_OF_DISINFECTS ///< Number of disinfects. +} DG_DISINFECT_T; + #pragma pack(push, 1) /// Polynomial calibration structure typedef struct @@ -261,18 +278,14 @@ typedef struct { POLYNOMIAL_CAL_PAYLOAD_T pressureSensors[ NUM_OF_CAL_DATA_PRES_SENSORS ]; ///< Pressure sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 6 ]; ///< Reserved space for future pressure sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ PRES_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future pressure sensors. } DG_PRES_SENSORS_CAL_RECORD_T; /// Flow sensors calibration structure typedef struct { POLYNOMIAL_CAL_PAYLOAD_T flowSensors[ NUM_OF_CAL_DATA_FLOW_SENSORS ]; ///< Flow sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 2 ]; ///< Reserved space for future flow sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ FLOW_SENSROS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future flow sensors. } DG_FLOW_SENSORS_CAL_RECORD_T; /// Load cells calibration structure @@ -285,18 +298,14 @@ typedef struct { POLYNOMIAL_CAL_PAYLOAD_T tempSensors[ NUM_OF_CAL_DATA_TEMP_SENSORS ]; ///< Temperature sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 5 ]; ///< Reserved space for future temperature sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ TEMP_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future temperature sensors. } DG_TEMP_SENSORS_CAL_RECORD_T; /// Conductivity sensors calibration structure typedef struct { POLYNOMIAL_CAL_PAYLOAD_T condSensors[ NUM_OF_CAL_DATA_COND_SENSORS ]; ///< Conductivity sensors to calibrate. - // NOTE: The reserved space is for 6 sensors. This portion of the struct should be eventually be - // reduced, so #define was not used for the size of the array - POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ 2 ]; ///< Reserved space for future conductivity sensors. + POLYNOMIAL_CAL_PAYLOAD_T reservedSpace[ COND_SENSORS_RESERVED_SPACE_COUNT ]; ///< Reserved space for future conductivity sensors. } DG_COND_SENSORS_CAL_RECORD_T; /// Drain line volume calibration structure @@ -344,15 +353,16 @@ /// DG generic volume record typedef struct { - DG_GENERIC_VOLUME_DATA_T genericVolume[ 4 ]; ///< DG generic volume record. + DG_GENERIC_VOLUME_DATA_T genericVolume[ GENERIC_VOL_RESERVED_SPACE_COUNT ]; ///< DG generic volume record. }DG_GENERIC_VOLUME_RECORD_T; /// DG acid concentrate typedef struct { F32 acidConcMixRatio; ///< Acid concentrate mix ratio. - F32 startVolume; ///< Start volume. - F32 reserverdSpace; ///< Reserved space. + F32 acidFullBottleVolumeML; ///< Acid full bottle volume in milliliters. + F32 acidConductivityUSPerCM; ///< Acid conductivity in uS/cm. + F32 acidBottleTemperature; ///< Acid bottle temperature in C. U32 calibrationTime; ///< Calibration time. U16 crc; ///< CRC. } DG_ACID_CONCENTRATE_T; @@ -361,8 +371,9 @@ typedef struct { F32 bicarbConcMixRatio; ///< Bicarb concentrate mix ratio. - F32 startVolume; ///< Start volume. - F32 reservedSpace; ///< Reserved space. + F32 bicarbStartVolumeML; ///< Bicarb start volume. + F32 bicarbConductivityUSPerCM; ///< Bicarb conductivity in uS/cm. + F32 bicarbBottleTemperature; ///< Bicarb bottle temperature in C. U32 calibrationTime; ///< Calibration time. U16 crc; ///< CRC. } DG_BICARB_CONCENTRATE_T; @@ -471,8 +482,10 @@ { F32 roWaterGenTotalL; ///< Total RO water generated in liters. (Cannot be reset) F32 roWaterGenSinceLastServiceL; ///< RO water generated since last treatment in liters. - U32 lastDisinfectDate; ///< Last disinfect date in epoch. - U32 isDisinfected; ///< Disinfect status boolean flag. + U32 lastHeatDisDateEpoch; ///< Last heat disinfect date in epoch. + U32 lastChemicalDisDateEpoch; ///< Last chemical disinfect date in epoch. + BOOL isDisinfected; ///< Disinfect status boolean flag. + U32 lastResetTimeEpoch; ///< Last time the record was reset in epoch. U16 crc; ///< CRC for the DG usage info structure. } DG_USAGE_INFO_RECORD_T;