Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rd4a90fda6c1f463633a4e7d45424acd2d2a0bce8 -r12cb82342073207c23708afaa64b25f83f2cdfed --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d4a90fda6c1f463633a4e7d45424acd2d2a0bce8) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 12cb82342073207c23708afaa64b25f83f2cdfed) @@ -825,6 +825,35 @@ return result; } +/*********************************************************************//** + * @brief + * The broadcastAlarmConditionCleared function constructs an alarm condition + * cleared msg to be broadcast and queues the msg for transmit on the + * appropriate CAN channel. + * @details Inputs: none + * @details Outputs: alarm condition cleared msg constructed and queued. + * @param alarm ID of alarm that has had its condition cleared + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL broadcastAlarmConditionCleared( U32 alarm ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_ALARM_CONDITION_CLEARED; + msg.hdr.payloadLen = sizeof( U32 ); + + memcpy( payloadPtr, &alarm, sizeof( U32 ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_ALARM, ACK_REQUIRED ); + + return result; +} + /*********************************************************************//** * @brief * The broadcastBloodFlowData function constructs a blood flow data msg to