Index: NVDataMgmtDGRecords.h =================================================================== diff -u -r592773fa1fc0df8a99bb202505dac31a55261f4c -r59871c9964559b5137781af9c2eeed6bab18ef73 --- NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 592773fa1fc0df8a99bb202505dac31a55261f4c) +++ NVDataMgmtDGRecords.h (.../NVDataMgmtDGRecords.h) (revision 59871c9964559b5137781af9c2eeed6bab18ef73) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2021-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2021-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 NVDataMgmtDGRecords.h * * @author (last) Dara Navaei -* @date (last) 01-Jul-2022 +* @date (last) 10-Jun-2023 * * @author (original) Dara Navaei * @date (original) 12-Feb-2021 @@ -31,13 +31,12 @@ // ********** 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 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. +#define MAX_TOP_LEVEL_PN_CHARS 10U ///< Max number of characters for top level part number. +#define MAX_TOP_LEVEL_SN_CHARS 20U ///< 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 GENERIC_VOL_RESERVED_SPACE_COUNT 4 ///< Generic volumes reserved space count. #ifndef _RELEASE_ /// Software configuration enums @@ -49,7 +48,7 @@ SW_CONFIG_DISABLE_HEATERS_MONITOR, ///< Software configuration disable heaters monitor. SW_CONFIG_DISABLE_DRAIN_PUMP_MONITOR, ///< Software configuration disable drain pump monitor. SW_CONFIG_DISABLE_RO_PUMP_MONITOR, ///< Software configuration disable RO pump monitor. - SW_CONFIG_DISABLE_RO_RATIO_CHECK, ///< Software configuration disable RO ratio check + SW_CONFIG_DISABLE_RO_RATIO_CHECK, // TODO remove ///< Software configuration disable RO ratio check SW_CONFIG_DISABLE_COND_SENSOR_CHECK, ///< Software configuration disable conductivity sensor check. SW_CONFIG_DISABLE_WATER_QUALITY_CHECK, ///< Software configuration disable water quality check. SW_CONFIG_DISABLE_FLOW_VS_LOAD_CELL_CHECK_IN_FILL, ///< Software configuration disable flow vs. load cell check in fill. @@ -58,16 +57,16 @@ SW_CONFIG_DISABLE_CONC_PUMPS, ///< Software configuration disable concentrate pumps. SW_CONFIG_DISABLE_CAPS_MONITOR, ///< Software configuration disable cap monitor. SW_CONFIG_DISABLE_UV_REACTORS, ///< Software configuration disable UV reactors. - SW_CONFIG_DISABLE_ACID_ALARMS, ///< Software configuration disable acid alarms. + SW_CONFIG_DISABLE_VOLTAGES_MONITOR, ///< Software configuration disable voltages monitor. SW_CONFIG_DISABLE_BICARB_ALARMS, ///< Software configuration disable bicarb alarms. SW_CONFIG_DISABLE_EMPTY_BOTTLES_ALARM, ///< Software configuration disable empty bottle alarms. - SW_CONFIG_DISABLE_BICARB_CONDUCTIVITY_TEST, ///< Software configuration disable bicarb conductivity test. - SW_CONFIG_DISABLE_ACID_CONDUCTIVITY_TEST, ///< Software configuration disable acid conductivity test. + SW_CONFIG_DISABLE_BICARB_CONDUCTIVITY_TEST, // TODO remove ///< Software configuration disable bicarb conductivity test. + SW_CONFIG_DISABLE_ACID_CONDUCTIVITY_TEST, // TODO remove ///< Software configuration disable acid conductivity test. SW_CONFIG_DISABLE_CONC_PUMPS_SPEED_ALARM, ///< Software configuration disable concentrate pumps speed alarm. - SW_CONFIG_DISABLE_MIXING_IN_FILL, ///< Software configuration disable mixing in fill. + SW_CONFIG_DISABLE_MIXING_IN_FILL, // TODO remove ///< Software configuration disable mixing in fill. SW_CONFIG_DISABLE_TEMPERATURE_SENSORS_ALARM, ///< Software configuration disable temperature sensors alarm. - SW_CONFIG_ENABLE_V3_SYSTEM, ///< Software configuration enable V3 system. - SW_CONFIG_DISABLE_SERVICE_AND_DISINFECT_CHECK, ///< Software configuration disable service and disinfect checks. + SW_CONFIG_DISABLE_CONCENTRATE_PUMPS_PARK, ///< Software configuration disable concentrate pumps park feature. + SW_CONFIG_ENABLE_USING_TPO_FOR_PRIMARY_HEATER_CONTROL, ///< Software configuration enable TPo for primary heater control. NUM_OF_SW_CONFIGS ///< Number of software configurations. } SOFTWARE_CONFIG_T; #endif @@ -92,6 +91,7 @@ GET_CAL_FANS_RECORD, ///< Get fans calibration record. GET_CAL_PRE_RO_PURGE_VOLUME_RECORD, ///< Get pre RO purge volume record. GET_CAL_FILTERS_RECORD, ///< Get filters record. + GET_CAL_FILL_CONDUCTIVITIES_RECORD, ///< Get fill conductivities record. GET_INF_HEATERS_RECORD, ///< Get heaters information form the the last run. GET_SYS_RECORD, ///< Get system record. GET_SRV_RECORD, ///< Get service record. @@ -160,6 +160,8 @@ CAL_DATA_CPO_COND_SENSOR, ///< CPo conductivity sensor. CAL_DATA_CD1_COND_SENSOR, ///< CD1 conductivity sensor. CAL_DATA_CD2_COND_SENSOR, ///< CD2 conductivity sensor. + CAL_DATA_CD2_COND_SENSOR_CHEM_DISINFECT, ///< CD2 chemical disinfect conductivity sensor. + CAL_DATA_CD2_COND_SENSOR_FILL_BICARB_TEST, ///< CD2 conductivity sensor fill bicarb test. NUM_OF_CAL_DATA_COND_SENSORS, ///< Number of conductivity sensors. } CAL_DATA_DG_COND_SENSORS_T; @@ -222,14 +224,45 @@ NUM_OF_DG_SCHEDULED_RUNS ///< Number of DG scheduled runs. } SCHEDULED_DG_RUNS_T; -/// Disinfect types -typedef enum dg_disinfects +/// DG usage info items +typedef enum dg_usage_items { - USAGE_INFO_HEAT_DISINFECT = 0, ///< Heat disinfect. - USAGE_INFO_CHEMICAL_DISINFECT, ///< Chemical disinfect. - NUM_OF_DISINFECTS ///< Number of disinfects. -} DG_DISINFECT_T; + USAGE_INFO_RO_GEN_WATER = 0, ///< Usage info RO generated water. + USAGE_INFO_BASIC_FLUSH, ///< Usage info basic flush. + USAGE_INFO_CHEM_DIS_START, ///< Usage info chemcial disinfect start. + USAGE_INFO_CHEM_DIS, ///< Usage info chemical disinfect complete. + USAGE_INFO_CHEM_FLUSH, ///< Usage info chemical flush complete. + USAGE_INFO_HEAT_DIS, ///< Usage info heat disinfect complete. + USAGE_INFO_FILTER_FLUSH, ///< Usage info filter flush complete. + USAGE_INFO_HEAT_DIS_ACTIVE_COOL, ///< Usage info heat disinfect active cool complete. + NUM_OF_USAGE_INFO_ITEMS ///< Number of usage info items. +} DG_USAGE_INFO_ITEMS_T; +/// DG acid types +typedef enum dg_acid_types +{ + ACID_08_1251_1 = 0, ///< Acid type 08-1251-1. + ACID_08_2251_0, ///< Acid type 08-2251-0. + ACID_08_3251_9, ///< ACid type 08-3251-9. + NUM_OF_ACID_TYPE ///< Number of acid types. +} DG_ACID_TYPES_T; + +/// DG bicarb types +typedef enum db_bicarb_types +{ + BICARB_08_677753_0 = 0, ///< Bicarb type 08-677753-0 + NUM_OF_BICARB_TYPE ///< Number of bicarb types. +} DG_BICARB_TYPES_T; + +/// DG fill conductivity tests +typedef enum dg_conductivity_ops +{ + FILL_COND_NORMAL_OP = 0, ///< Fill conductivity normal operation. + FILL_COND_ACID_TEST, ///< Fill conductivity acid test. + FILL_COND_BICARB_TEST, ///< Fill conductivity bicarb test. + NUM_OF_FILL_COND_TEST ///< Number of fill conductivity test. +} DG_FILL_COND_OPS_T; + #pragma pack(push, 1) /// Polynomial calibration structure typedef struct @@ -307,7 +340,6 @@ typedef struct { POLYNOMIAL_CAL_PAYLOAD_T condSensors[ NUM_OF_CAL_DATA_COND_SENSORS ]; ///< Conductivity sensors to calibrate. - 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 @@ -447,6 +479,21 @@ U16 crc; ///< CRC for the reservoirs and UF record. } DG_HEATING_CAL_RECORD_T; +/// DG acid and bicarb fill conductivity values +typedef struct +{ + F32 acidConduSPerCM; ///< Acid conductivity uS/cm. + F32 bicarbConduSPerCM; ///< Bicarb conductivity uS/cm. + U32 calibrationTime; ///< Calibration time. + U16 crc; ///< CRC for the acid/bicarb fill conductivity values. +} DG_ACID_BICARB_FILL_COND_VALUES_T; + +/// DG acid and bicarb fill conductivity record +typedef struct +{ + DG_ACID_BICARB_FILL_COND_VALUES_T fillCondValues[ NUM_OF_ACID_TYPE ][ NUM_OF_FILL_COND_TEST ]; ///< Acid and bicarb fill conductivity values. +} DG_CHEMICALS_FILL_COND_CAL_RECORD_T; + /// DG systems record structure typedef struct { @@ -457,16 +504,6 @@ U16 crc; ///< CRC for the DG system record structure. } DG_SYSTEM_RECORD_T; -/// DG service record structure -typedef struct -{ - U08 serviceLoc; ///< DG service location. - U32 lastServiceEpochDate; ///< DG last service date in epoch. - U32 serviceIntervalSeconds; ///< DG service interval in seconds. - //U32 lastResetTimeEpoch; ///< Last time the record was reset in epoch. - U16 crc; ///< CRC for the DG service record structure. -} DG_SERVICE_RECORD_T; - /// DG scheduled runs record structure typedef struct { @@ -480,18 +517,6 @@ DG_SCHEDULED_RUN_T dgScheduledRun[ NUM_OF_DG_SCHEDULED_RUNS ]; ///< DG scheduled run. } DG_SCHEDULED_RUN_RECORD_T; -/// DG usage info structure. -typedef struct -{ - F32 roWaterGenTotalL; ///< Total RO water generated in liters. (Cannot be reset) - F32 roWaterGenSinceLastServiceL; ///< RO water generated since last treatment in liters. - 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; - /// DG heaters information structure typedef struct { @@ -505,7 +530,6 @@ U08 swConfigs[ NUM_OF_SW_CONFIGS ]; ///< Software configurations. } DG_SW_CONFIG_RECORD_T; #endif - #pragma pack(pop) /**@}*/