Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r8a89e041755b26fad2530e1b8ad2cfeed1937b0a -r30cbd9ff622e635f16df3801aabeb15dfaf5fff5 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 8a89e041755b26fad2530e1b8ad2cfeed1937b0a) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 30cbd9ff622e635f16df3801aabeb15dfaf5fff5) @@ -1987,7 +1987,53 @@ sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, status ); } +/*********************************************************************//** + * @brief + * The sendRORejectionRatioRequestToHD function handles sending the RO + * rejection ratio request to HD + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +void sendRORejectionRatioRequestToHD( void ) +{ + MESSAGE_T msg; + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_REQUEST; + msg.hdr.payloadLen = 0; + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_HD, ACK_REQUIRED ); +} + +/*********************************************************************//** + * @brief + * The handleRORejectionResponseFromHDInstitRecord function handles receiving + * RO rejection ratio response from HD institutional record + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleRORejectionResponseFromHDInstitRecord( MESSAGE_T* message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof(F32) ) + { + F32 roRejectionRatio; + + memcpy( &roRejectionRatio, message->payload, sizeof(F32) ); + + + status = TRUE; + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, status ); +} + // *********************************************************************** // **************** Message Handling Helper Functions ******************** // ***********************************************************************