Index: firmware/App/Services/Messaging.h =================================================================== diff -u -r70f10c77f4f9a48d51030c00504d520fe25d0ba9 -rad2492d1c1b63ec2727e5a7a13c5b3a4f8021f86 --- firmware/App/Services/Messaging.h (.../Messaging.h) (revision 70f10c77f4f9a48d51030c00504d520fe25d0ba9) +++ firmware/App/Services/Messaging.h (.../Messaging.h) (revision ad2492d1c1b63ec2727e5a7a13c5b3a4f8021f86) @@ -14,15 +14,16 @@ * @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" - +#include "OperationModes.h" + /** * @defgroup Messaging Messaging * @brief The system communication messages unit provides helper functions @@ -35,7 +36,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. @@ -49,6 +50,14 @@ { U08 userRequest; ///< request to confirm, cancel, or reject off button request } UI_OFF_BUTTON_RESPONSE_PAYLOAD_T; + +/// Payload record structure for off button response. +typedef struct +{ + U32 id; + U32 command; + U32 reason; +} UI_PAYLOAD_T; #pragma pack(pop) /// Payload record structure for UI response. @@ -138,13 +147,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 @@ -160,17 +169,22 @@ BOOL handleUICheckIn( MESSAGE_T *message ); BOOL handleTesterLogInRequest( MESSAGE_T *message ); BOOL handleUpdateAvailable( MESSAGE_T *message ); +BOOL handleUIVersionResponse( MESSAGE_T *message ); BOOL testTDSoftwareResetRequest( MESSAGE_T *message ); // Test send message helper functions BOOL sendEvent( TD_EVENT_ID_T event, EVENT_DATA_T dat1, EVENT_DATA_T dat2 ); -BOOL sendOffButtonMsgToUI( U08 prompt ); +BOOL sendPOSTTestResult( TD_POST_STATE_T test, BOOL passed ); +BOOL sendPOSTFinalResult( BOOL passed ); +BOOL sendUIVersionRequest( void ); +BOOL sendRequestForDDResendAlarms( void ); BOOL testSetTestConfiguration( MESSAGE_T *message ); BOOL testGetTestConfiguration( MESSAGE_T *message ); BOOL testResetAllTestConfigurations( MESSAGE_T *message ); +BOOL sendAckResponseMsg( MSG_ID_T msgID, COMM_BUFFER_T buffer, BOOL ack ); /**@}*/ -#endif +#endif