Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -r876a1cdab00a28265349cec424f77709a101db5c -r57dd046b04afac3364f6adc7d47252d73cacab4d --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 876a1cdab00a28265349cec424f77709a101db5c) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 57dd046b04afac3364f6adc7d47252d73cacab4d) @@ -8,7 +8,7 @@ * @file SystemCommMessages.h * * @author (last) Michael Garthwaite -* @date (last) 07-Feb-2023 +* @date (last) 08-Mar-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -63,6 +63,80 @@ #define ACK_REQUIRED TRUE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. #define ACK_NOT_REQUIRED FALSE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. + +#pragma pack(push, 1) +typedef struct +{ + U08 acknowledgement; ///< Acknowledgement Byte +} ACK_RESPONSE_PAYLOAD_T; + +typedef struct +{ + U08 userRequest; ///< request to confirm, cancel, or reject off button request +} UI_OFF_BUTTON_RESPONSE_PAYLOAD_T; +#pragma pack(pop) + +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. +} UI_RESPONSE_PAYLOAD_T; + +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. + F32 ufVolume; ///< UF Volume in mL. + U32 durationInMinutes; ///< new Treatment duration in minutes. + S32 timeDiff; ///< Treatment duration difference. + F32 ufRate; ///< new UF rate in mL/min. + F32 rateDiff; ///< difference between new and old UF rates. + F32 oldUFRate; ///< Previous UF Rate in mL/min. +} UF_SETTINGS_CHANGE_RESPONSE_PAYLOAD_T; + +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. + F32 volume; ///< UF Volume in mL. + U32 duration; ///< Treatment duration in minutes + F32 ufRate; ///< UF rate in mL. +} UF_SETTINGS_CONFIRMATION_RESPONSE_PAYLOAD_T; + +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. + U32 duration; ///< Treatment duration in minutes + F32 volume; ///< UF Volume in mL. +} TREATMENT_TIME_CHANGE_RESPONSE_PAYLOAD_T; + +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. + U32 bloodRate; ///< new blood flow rate + U32 dialRate; ///< new dialysate flow rate +} BLOOD_DIAL_RATE_CHANGE_RESPONSE_PAYLOAD_T; + +typedef struct +{ + U32 event; ///< Event ID + U32 dataType1; ///< Data type for data field 1 + EVENT_DATAS_T data1; ///< data field 1 + U32 dataType2; ///< Data type for data field 2 + EVENT_DATAS_T data2; ///< Data field 2 +} EVENT_PAYLOAD_T; + +typedef struct +{ + U32 minTreatmentTime; ///< Minimum treatment duration (in minutes) + U32 maxTreatmentTime; ///< Maximum treatment duration (in minutes) + F32 minUFVolume; ///< Minimum ultrafiltration volume (in mL) + F32 maxUFVolume; ///< Maximum ultrafiltration volume (in mL) + U32 minDialRate; ///< Minimum dialysate flow rate (in mL/min) + U32 maxDialRate; ///< Maximum dialysate flow rate (in mL/min) +} TREATMENT_PARAM_BROADCAST_PAYLOAD_T; // ********** public function prototypes ********** @@ -347,7 +421,7 @@ void handleUIActiveAlarmsListRequest( MESSAGE_T *message ); // MSG_ID_HD_ACTIVE_ALARMS_LIST_REQUEST_RESPONSE -BOOL sendActiveAlarmsList( BOOL accepted, U32 reason, U32 *alarmList, U32 size ); +BOOL sendActiveAlarmsList( ACTIVE_ALARM_LIST_RESPONSE_PAYLOAD_T alarmListPayload ); // MSG_ID_HD_TREATMENT_LOG_ALARM_EVENT BOOL sendTreatmentLogAlarmEventData( ALARM_ID_T alarmID, ALARM_DATA_T almData1, ALARM_DATA_T almData2 );