Index: firmware/App/Services/DDInterface.h =================================================================== diff -u -r73d8423edc56daed591bc0b3f7baee5540aea423 -r9ea1971251bb0064e626c21e7d94215114254a98 --- firmware/App/Services/DDInterface.h (.../DDInterface.h) (revision 73d8423edc56daed591bc0b3f7baee5540aea423) +++ firmware/App/Services/DDInterface.h (.../DDInterface.h) (revision 9ea1971251bb0064e626c21e7d94215114254a98) @@ -32,126 +32,28 @@ // ********** public definitions ********** -#define DEFAULT_TARGET_FILL_FLOW_RATE_LPM 0.8F ///< Default target fill flow rate in L/min. -#define DRAIN_RESERVOIR_TO_VOLUME_ML 0 ///< Drain reservoir to this volume (in mL) during treatment. -#define LOAD_CELL_ILLEGAL_WEIGHT_VALUE -10000.0F ///< Initial value for Load Cells, known bad value - -/// DG Concentrate ratios data structure. +/// DD command response data record structure. typedef struct { - F32 acidMixingRatio; ///< Acid mixing ratio - F32 bicarbMixingRatio; ///< Bicarb mixing ratio - U32 timeFillPrepMS; ///< Fill prepare time in milliseconds -} DG_MIXING_RATIOS_T; - -/// Payload record structure for a reservoirs data message. -typedef struct -{ - U32 resID; ///< Active reservoir ID - U32 setFillToVolumeMl; ///< Reservoir set fill to target volume in ml - U32 setDrainToVolumeMl; ///< Reservoir set drain to target volume in ml - U32 timeReservoirCycleMS; ///< Reservoir time cycle in milliseconds - U32 timeReservoirFill2SwitchMS; ///< Reservoir time fill to switch in milliseconds - F32 timeUFDecayMS; ///< Ultrafilter decay time in milliseconds - F32 tempUFFill; ///< Ultrafilter fill temperature in C - F32 tempReservoirUseActual; ///< Reservoir actual use temperature in C - F32 tempReservoirEndFill; ///< Reservoir end of the fill temperature in C - F32 tempAvgFill; ///< Average fill temperature in C - F32 tempLastFill; ///< Last fill temperature in C - F32 timereservoirFillMS; ///< Reservoir fill time in milliseconds -} DG_RESERVOIRS_DATA_PAYLOAD_T; - -/// Payload record structure for a drain reservoir command message. -typedef struct -{ - U32 drainToVolumeML; ///< Drain to target volume in ml - BOOL tareLoadCells; ///< Flag indicates to tare load cells or not - BOOL rinseConcentrateLines; ///< Flag indicates to rinse concentrate lines or not - BOOL cmd; ///< Flag indicates to start or stop the drain mode -} DRAIN_RESERVOIR_CMD_PAYLOAD_T; - -/// DG command response data record structure. -typedef struct -{ U32 commandID; ///< The command DG is responding to BOOL rejected; ///< Flag indicates if the command has been rejected U32 rejectCode; ///< Reason code for rejecting the command -} DG_CMD_RESPONSE_T; +} DD_CMD_RESPONSE_T; -/// DG heat/chemical disinfects and flush state for UI structure. -typedef struct DG_Disinfects -{ - U32 chemDisinfectUIState; ///< DG chemical disinfect UI state - U32 heatDisinfectUIState; ///< DG heat disinfect UI state - U32 flushUIState; ///< DG flush UI state -} DG_DISINFECT_UI_STATES_T; - -/// HD version of the DG service record -typedef struct -{ - DG_SERVICE_RECORD_T dgServiceRecord; ///< HD version of the DG service record. - DG_USAGE_INFO_RECORD_T dgUsageInfo; ///< HD version of the DG usage info. - BOOL isDGServiceRecordAvailable; ///< Flag to indicate DG service record is available. - BOOL isDGUsageInfoAvailable; ///< Flag to indicate DG usage info is available. -} DG_SERVICE_AND_USAGE_DATA_T; - // ********** public function prototypes ********** void initDDInterface( void ); -void execDGInterfaceMonitor( void ); +void execDDInterfaceMonitor( void ); -DG_OP_MODE_T getDGOpMode( void ); -U32 getDGSubMode( void ); -BOOL getDialysateFlowDataFreshFlag( void ); -F32 getDGDialysateFlowRateLMin( void ); -F32 getDGRawDialysateFlowRateLMin( void ); -F32 getDialysateTemperature( void ); -F32 getRedundantDialysateTemperature( void ); -F32 getHeatDisinfectTemperatureSensorValue( void ); -BOOL getTrimmerHeaterCommandedOn( void ); -DG_DISINFECT_UI_STATES_T getDGDisinfectsStates( void ); -DG_MIXING_RATIOS_T getDGMixingRatios( void ); -void getHDVersionDGServiceAndUsageData( DG_SERVICE_AND_USAGE_DATA_T* data ); +DD_OP_MODE_T getDDOpMode( void ); +U32 getDDSubMode( void ); -void setDGOpMode( U32 opMode, U32 subMode ); -void setDialysateTemperatureReadings( F32 tdi, F32 tro, F32 thd ); -void setDialysateFlowData( FLOW_SENSORS_DATA_T flowRates ); -void setDGDisinfectsStates( DG_DISINFECT_UI_STATES_T states ); -void setDGMixingRatios( DG_MIXING_RATIOS_T ratios ); -void setDGHeatersData( HEATERS_DATA_T *data ); -void setHDVersionDGServiceRecord( DG_SERVICE_RECORD_T* data ); -void setHDVersionDGUsageInfo( DG_USAGE_INFO_RECORD_T* data ); +void setDDOpMode( U32 opMode, U32 subMode ); -void cmdSetDGDialysateHeatingParams( DG_CMD_DIALYSATE_HEATING_PARAMS_T heatingParams ); -void cmdStartDG( void ); -void cmdStopDG( void ); -void cmdStartDGFill( U32 fillToVolMl, F32 targetFlowLPM ); -void cmdStopDGFill( void ); -void cmdStartDGDrain( U32 drainToVolMl, BOOL tareLoadCell, BOOL rinse, BOOL start ); -void cmdStartDGTrimmerHeater( void ); -void cmdStopDGTrimmerHeater( void ); -void cmdDGSampleWater( SAMPLE_WATER_CMD_T cmd ); -void cmdStartDGFlush( void ); -void cmdDGParkConcentratePumps( void ); -void cmdStopDGFlush( void ); -void cmdStartDGHeatDisinfect( void ); -void cmdStopDGHeatDisinfect( void ); -void cmdStartDGChemicalDisinfect( void ); -void cmdStopDGChemicalDisinfect( void ); -void cmdStartDGChemicalFlushDisinfect( void ); -void cmdStopDGChemFlushDisinfect( void ); -void cmdStopDGActiveCool( void ); -void cmdStartDGROPermeateSampleMode( void ); -void cmdStopDGROPermeateSampleMode( void ); -void cmdRequestDGMixingRatios( void ); -void cmdSetDGToServiceMode( void ); - -void handleDGCommandResponse( DG_CMD_RESPONSE_T *dgCmdRespPtr ); -BOOL getDGCommandResponse( U32 commandID, DG_CMD_RESPONSE_T *cmdRespPtr ); +void handleDDCommandResponse( DD_CMD_RESPONSE_T *ddCmdRespPtr ); +BOOL getDDCommandResponse( U32 commandID, DD_CMD_RESPONSE_T *cmdRespPtr ); -void checkDialysateTemperature( void ); - /**@}*/ #endif