Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rabac168ce06b65ca7a2ddeff20dd3c35480a8806 -r257fca8c33c53999f384d84f1ed31f1772155e52 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision abac168ce06b65ca7a2ddeff20dd3c35480a8806) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 257fca8c33c53999f384d84f1ed31f1772155e52) @@ -3608,22 +3608,54 @@ if ( 0 == message->hdr.payloadLen ) { + typedef struct + { + U32 minBloodFlowMLPM; + U32 maxBloodFlowMLPM; + U32 minDialysateFlowMLPM; + U32 maxDialysateFlowMLPM; + U32 minTxDurationMIN; + U32 maxTxDurationMIN; + U32 minStopHeparinDispBeforeTxEndMIN; + U32 maxStopHeparinDispBeforeTxEndMIN; + U32 minSalineBolusVolumeML; + U32 maxSalineBolusVolumeML; + F32 minDialysateTempC; + F32 maxDialysateTempC; + S32 minArtPressLimitWindowMMHG; + S32 maxArtPressLimitWindowMMHG; + S32 minVenPressLimitWindowMMHG; + S32 maxVenPressLimitWindowMMHG; + S32 minVenAsymPressLimitMMHG; + S32 maxVenAsymPressLimitMMHG; + F32 minUFVolumeL; + F32 maxUFVolumeL; + F32 minHeparinDispRateMLPHR; + F32 maxHeparinDispRateMLPHR; + F32 minHeparinBolusVolumeML; + F32 maxHeparinBolusVolumeML; + U32 enableChemicalDisinfect; + } HD_INSTITUTIONAL_LOCAL_RECORD_T; + U32 accept = 1; - U32 reason = 0; + U32 reason = 0; HD_INSTITUTIONAL_RECORD_T hdInstitutionalRecord; + HD_INSTITUTIONAL_LOCAL_RECORD_T hdInstitutionalLocalRecord; - getNVRecord2Driver( GET_INSTITUTIONAL_RECORD, (U08*)&hdInstitutionalRecord, sizeof( HD_INSTITUTIONAL_RECORD_T ), 0, ALARM_ID_NO_ALARM ); + getNVRecord2Driver( GET_INSTITUTIONAL_RECORD, (U08*)&hdInstitutionalRecord, sizeof( HD_INSTITUTIONAL_RECORD_T ), 0, ALARM_ID_NO_ALARM ); + memcpy( &hdInstitutionalLocalRecord, &hdInstitutionalRecord, sizeof( HD_INSTITUTIONAL_RECORD_T ) - sizeof( U32 ) - sizeof( U16 ) ); + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_INSTITUTIONAL_RECORD_RESPONSE; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( HD_INSTITUTIONAL_RECORD_T ) - sizeof( U32 ) - sizeof( U16 ); + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( HD_INSTITUTIONAL_LOCAL_RECORD_T ); memcpy( payloadPtr, &accept, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); memcpy( payloadPtr, &reason, sizeof( U32 ) ); payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &hdInstitutionalRecord, sizeof( HD_INSTITUTIONAL_RECORD_T ) - sizeof( U32 ) - sizeof( U16 ) ); + memcpy( payloadPtr, &hdInstitutionalLocalRecord, sizeof( HD_INSTITUTIONAL_LOCAL_RECORD_T ) ); // 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_HD_2_UI, ACK_NOT_REQUIRED );