Index: firmware/App/Services/Reservoirs.h =================================================================== diff -u -r62ee40b55ed96eb0de1c0f05455eb986f76c1842 -r8059b3b67364c3593091a23266f33186430ffe26 --- firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 62ee40b55ed96eb0de1c0f05455eb986f76c1842) +++ firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 8059b3b67364c3593091a23266f33186430ffe26) @@ -39,26 +39,34 @@ } RESERVOIR_ID_T; #pragma pack(push,1) -/// Enumeration of drain command. + +/// Drain command data structure. typedef struct { U32 targetVolume; ///< Target volume to drain to (in mL) BOOL tareLoadCell; ///< Flag to tare load call } DRAIN_CMD_T; + +/// DG command response data record. +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; + #pragma pack(pop) // ********** public function prototypes ********** void initReservoirs( void ); void execReservoirs( void ); -BOOL setActiveReservoirCmd( RESERVOIR_ID_T resID ); // handle switch reservoirs command from HD -BOOL startFillCmd( U32 fillToVolMl ); // handle fill command from HD -BOOL stopFillCmd( void ); // handle stop fill command from HD -BOOL startDrainCmd( DRAIN_CMD_T drainCmd ); // handle drain command from HD -BOOL stopDrainCmd( void ); // handle stop drain command from HD -BOOL startTrimmerHeaterCmd( void ); // handle start trimmer heater control command from HD -BOOL stopTrimmerHeaterCmd( void ); // handle stop trimmer heater control command from HD +void setActiveReservoirCmd( RESERVOIR_ID_T resID ); // handle switch reservoirs command from HD +void startFillCmd( U32 fillToVolMl ); // handle fill command from HD +void stopFillCmd( void ); // handle stop fill command from HD +void startDrainCmd( DRAIN_CMD_T drainCmd ); // handle drain command from HD +void stopDrainCmd( void ); // handle stop drain command from HD RESERVOIR_ID_T getInactiveReservoir( void ); BOOL hasTargetFillVolumeBeenReached( RESERVOIR_ID_T reservoirId );