Index: firmware/App/Services/Messaging.h =================================================================== diff -u -r395522dffef1348e176564925656012f529c1910 -rc288f2956e37f1f0b964b077af7c39b6387a5df6 --- firmware/App/Services/Messaging.h (.../Messaging.h) (revision 395522dffef1348e176564925656012f529c1910) +++ firmware/App/Services/Messaging.h (.../Messaging.h) (revision c288f2956e37f1f0b964b077af7c39b6387a5df6) @@ -14,15 +14,15 @@ * @date (original) 01-Aug-2024 * ***************************************************************************/ - -#ifndef __MESSAGING_H__ -#define __MESSAGING_H__ +#ifndef __MESSAGING_H__ +#define __MESSAGING_H__ + #include "TDCommon.h" #include "TDDefs.h" #include "MessageSupport.h" #include "MsgQueues.h" - + /** * @defgroup Messaging Messaging * @brief The system communication messages unit provides helper functions @@ -35,7 +35,7 @@ // ********** public definitions ********** #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. +#define ACK_NOT_REQUIRED FALSE ///< Macro for functions that want to know if an outgoing message requires acknowledgement from receiver. #pragma pack(push, 1) /// Payload record structure for ACK response. @@ -58,47 +58,6 @@ U32 rejectionReason; ///< Rejection reason if not accepted. } UI_RESPONSE_PAYLOAD_T; -/// Payload record structure for UF change response. -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; - -/// Payload record structure for UF change confirmation response. -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; - -/// Payload record structure for treatment duration change response. -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; - -/// Payload record structure for blood / dialysate rate change response. -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; - /// Payload record structure for treatment parameter broadcast messages. typedef struct { @@ -138,13 +97,13 @@ F32 maxHeparinBolusVolumeML; ///< Max heparin bolus volume in mL. U32 enableChemicalDisinfect; ///< Enable/disable chemical disinfect. } HD_INSTITUTIONAL_LOCAL_RECORD_T; - -// ********** public function prototypes ********** -// Serialize message +// ********** public function prototypes ********** + +// Serialize message U32 serializeMessage( MESSAGE_T msg, COMM_BUFFER_T buffer, BOOL ackReq ); -// ACK MSG +// ACK MSG BOOL sendACKMsg( MESSAGE_T *message ); // Handle version request message @@ -171,4 +130,4 @@ /**@}*/ -#endif +#endif