Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r0a61f7fa5ff6945ebc2e507d8ecb71a652c38eaa -rd62cad9611841e592b4b46b1170e4beb57c1d153 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 0a61f7fa5ff6945ebc2e507d8ecb71a652c38eaa) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision d62cad9611841e592b4b46b1170e4beb57c1d153) @@ -227,12 +227,15 @@ { BOOL result; MESSAGE_T msg; + ACK_RESPONSE_PAYLOAD_T cmd; + cmd.acknowledgement = ack; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = msgID; - msg.hdr.payloadLen = sizeof( U08 ); - msg.payload[ 0 ] = (U08)ack; + msg.hdr.payloadLen = sizeof( ACK_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &cmd, sizeof( ACK_RESPONSE_PAYLOAD_T ) ); // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer result = serializeMessage( msg, buffer, ACK_NOT_REQUIRED ); @@ -255,17 +258,17 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + UI_RESPONSE_PAYLOAD_T cmd; + cmd.accepted = accepted; + cmd.rejectionReason = reason; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = msgID; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ); + msg.hdr.payloadLen = sizeof( UI_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &cmd, sizeof( UI_RESPONSE_PAYLOAD_T ) ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, 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_2_UI, ACK_REQUIRED ); @@ -287,17 +290,21 @@ * @param cmd 0=prompt user to confirm, 1=cancel prompt, 2=reject user off request * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ -BOOL sendOffButtonMsgToUI( U08 cmd ) +BOOL sendOffButtonMsgToUI( U08 prompt ) { BOOL result; MESSAGE_T msg; + UI_OFF_BUTTON_RESPONSE_PAYLOAD_T cmd; + cmd.userRequest = prompt; + // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_OFF_BUTTON_PRESS; - msg.hdr.payloadLen = sizeof( U08 ); - msg.payload[ 0 ] = cmd; + msg.hdr.msgID = MSG_ID_OFF_BUTTON_PRESS_REQUEST; + msg.hdr.payloadLen = sizeof( UI_OFF_BUTTON_RESPONSE_PAYLOAD_T ); + memcpy(&msg.payload, &cmd, sizeof( UI_OFF_BUTTON_RESPONSE_PAYLOAD_T ) ); + // 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_2_UI, ACK_REQUIRED ); @@ -367,27 +374,21 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; - U32 e = (U32)event; - // Convert the two data types enums to U32. The enums are interpreted as a U08 by the compiler - U32 dataType1 = (U32)dat1.dataType; - U32 dataType2 = (U32)dat2.dataType; + EVENT_PAYLOAD_T eventStruct; + eventStruct.event = (U32)event; + eventStruct.dataType1 = (U32)dat1.dataType; + eventStruct.data1 = dat1.data; + eventStruct.dataType2 = (U32)dat2.dataType; + eventStruct.data2 = dat2.data; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_EVENT; // The payload length is the event ID, 2 event datas and the events data types for each of the event data - msg.hdr.payloadLen = sizeof( U32 ) + 2 * sizeof( EVENT_DATAS_T ) + 2 * sizeof( U32 ); + msg.hdr.payloadLen = sizeof( EVENT_PAYLOAD_T ); - memcpy( payloadPtr, &e, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &dataType1, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &dat1.data, sizeof( EVENT_DATAS_T ) ); - payloadPtr += sizeof( EVENT_DATAS_T ); - memcpy( payloadPtr, &dataType2, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &dat2.data, sizeof( EVENT_DATAS_T ) ); + memcpy( &msg.payload, &eventStruct, sizeof( EVENT_PAYLOAD_T ) ); // 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_2_UI, ACK_NOT_REQUIRED ); @@ -416,28 +417,23 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + UF_SETTINGS_CHANGE_RESPONSE_PAYLOAD_T ufResponse; + ufResponse.accepted = accepted; + ufResponse.rejectionReason = reason; + ufResponse.ufVolume = volume_mL; + ufResponse.durationInMinutes = time_min; + ufResponse.timeDiff = timeDiff; + ufResponse.ufRate = ufRate_mL_min; + ufResponse.rateDiff = rateDiff; + ufResponse.oldUFRate = oldUFRate_mL_min; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_USER_UF_SETTINGS_CHANGE_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ) + sizeof( F32 ) + sizeof( U32 ) + sizeof( S32 ) + sizeof( F32 ) + sizeof( F32 ) + sizeof( F32 ); + msg.hdr.payloadLen = sizeof( UF_SETTINGS_CHANGE_RESPONSE_PAYLOAD_T ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &volume_mL, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &time_min, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &timeDiff, sizeof( S32 ) ); - payloadPtr += sizeof( S32 ); - memcpy( payloadPtr, &ufRate_mL_min, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &rateDiff, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &oldUFRate_mL_min, sizeof( F32 ) ); + memcpy( &msg.payload, &ufResponse, sizeof( UF_SETTINGS_CHANGE_RESPONSE_PAYLOAD_T ) ); // 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_2_UI, ACK_REQUIRED ); @@ -463,22 +459,21 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + UF_SETTINGS_CONFIRMATION_RESPONSE_PAYLOAD_T ufConfirm; + // Populate Messsage + ufConfirm.accepted = accepted; + ufConfirm.rejectionReason = reason; + ufConfirm.volume = volume_mL; + ufConfirm.duration = time_min; + ufConfirm.ufRate = ufRate_mL_min; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ) + sizeof( F32 ) + sizeof( U32 ) + sizeof( F32 ); + msg.hdr.payloadLen = sizeof( UF_SETTINGS_CONFIRMATION_RESPONSE_PAYLOAD_T ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &volume_mL, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &time_min, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &ufRate_mL_min, sizeof( F32 ) ); + memcpy( &msg.payload, &ufConfirm, sizeof( UF_SETTINGS_CONFIRMATION_RESPONSE_PAYLOAD_T ) ); // 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_2_UI, ACK_REQUIRED ); @@ -503,21 +498,19 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + TREATMENT_TIME_CHANGE_RESPONSE_PAYLOAD_T treatmentResponse; + treatmentResponse.accepted = accepted; + treatmentResponse.rejectionReason = reason; + treatmentResponse.duration = time_min; + treatmentResponse.volume = volume_mL; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_USER_TREATMENT_TIME_CHANGE_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ) + sizeof( U32 ) + sizeof( F32 ); + msg.hdr.payloadLen = sizeof( TREATMENT_TIME_CHANGE_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &treatmentResponse, sizeof( TREATMENT_TIME_CHANGE_RESPONSE_PAYLOAD_T ) ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &time_min, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &volume_mL, sizeof( F32 ) ); - // 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_2_UI, ACK_REQUIRED ); @@ -541,21 +534,19 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + BLOOD_DIAL_RATE_CHANGE_RESPONSE_PAYLOAD_T rateResponse; + rateResponse.accepted = accepted; + rateResponse.rejectionReason = reason; + rateResponse.bloodRate = bloodRate; + rateResponse.dialRate = dialRate; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_USER_BLOOD_DIAL_RATE_CHANGE_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ) + sizeof( U32 ) + sizeof( U32 ); + msg.hdr.payloadLen = sizeof( BLOOD_DIAL_RATE_CHANGE_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &rateResponse, sizeof( BLOOD_DIAL_RATE_CHANGE_RESPONSE_PAYLOAD_T ) ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &bloodRate, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &dialRate, 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_2_UI, ACK_REQUIRED ); @@ -606,17 +597,17 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + UI_RESPONSE_PAYLOAD_T heparinResponse; + heparinResponse.accepted = accepted; + heparinResponse.rejectionReason = rejReason; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_HEPARIN_PAUSE_RESUME_RESPONSE; - msg.hdr.payloadLen = sizeof( U32 ) * 2; + msg.hdr.payloadLen = sizeof( UI_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &heparinResponse, sizeof( UI_RESPONSE_PAYLOAD_T ) ); - memcpy( payloadPtr, &accepted, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &rejReason, 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_2_UI, ACK_REQUIRED ); @@ -638,17 +629,17 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + UI_RESPONSE_PAYLOAD_T audioVolumeResponse; + audioVolumeResponse.accepted = accepted; + audioVolumeResponse.rejectionReason = rejReason; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_ALARM_AUDIO_VOLUME_SET_RESPONSE; - msg.hdr.payloadLen = sizeof( U32 ) * 2; + msg.hdr.payloadLen = sizeof( UI_RESPONSE_PAYLOAD_T ); + memcpy( &msg.payload, &audioVolumeResponse, sizeof( UI_RESPONSE_PAYLOAD_T ) ); - memcpy( payloadPtr, &accepted, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &rejReason, 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_2_UI, ACK_REQUIRED ); @@ -673,25 +664,21 @@ { BOOL result; MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + TREATMENT_PARAM_BROADCAST_PAYLOAD_T paramRanges; + paramRanges.minTreatmentTime = minTime; + paramRanges.maxTreatmentTime = maxTime; + paramRanges.minUFVolume = minUFVol; + paramRanges.maxUFVolume = maxUFVol; + paramRanges.minDialRate = minDialRate; + paramRanges.maxDialRate = maxDialRate; + // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_TREATMENT_PARAM_CHANGE_RANGES; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( F32 ) + sizeof( F32 ) + sizeof( U32 ) + sizeof( U32 ); + msg.hdr.msgID = MSG_ID_TREATMENT_PARAM_CHANGE_RANGES_DATA; + msg.hdr.payloadLen = sizeof( TREATMENT_PARAM_BROADCAST_PAYLOAD_T ); + memcpy( &msg.payload, ¶mRanges, sizeof( TREATMENT_PARAM_BROADCAST_PAYLOAD_T ) ); - memcpy( payloadPtr, &minTime, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &maxTime, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &minUFVol, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &maxUFVol, sizeof( F32 ) ); - payloadPtr += sizeof( F32 ); - memcpy( payloadPtr, &minDialRate, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &maxDialRate, 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_2_UI, ACK_REQUIRED ); @@ -710,14 +697,13 @@ BOOL sendTreatmentPeriodicDataToUI( TREATMENT_LOG_DATA_PERIODIC_T * periodDataPtr ) { MESSAGE_T msg; - U08 *payloadPtr = msg.payload; // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_TREATMENT_LOG_PERIODIC_DATA; msg.hdr.payloadLen = sizeof( TREATMENT_LOG_DATA_PERIODIC_T ); - memcpy( payloadPtr, periodDataPtr, sizeof( TREATMENT_LOG_DATA_PERIODIC_T ) ); + memcpy( &msg.payload, periodDataPtr, sizeof( TREATMENT_LOG_DATA_PERIODIC_T ) ); // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer return serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED ); @@ -740,7 +726,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -761,7 +747,7 @@ } else { - sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, FALSE ); + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_NOT_REQUIRED ); } } @@ -815,17 +801,19 @@ BOOL sendTreatmentLogData( BOOL accepted, U32 reason, TREATMENT_LOG_DATA_PAYLOAD_T *logDataPtr ) { MESSAGE_T msg; + UI_RESPONSE_PAYLOAD_T UIReponse; U08 *payloadPtr = msg.payload; + UIReponse.accepted = accepted; + UIReponse.rejectionReason = reason; + // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_TREATMENT_LOG_DATA_RESPONSE; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ) + sizeof( TREATMENT_LOG_DATA_PAYLOAD_T ); + msg.hdr.payloadLen = sizeof( UI_RESPONSE_PAYLOAD_T ) + sizeof( TREATMENT_LOG_DATA_PAYLOAD_T ); - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &reason, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); + memcpy( payloadPtr, &UIReponse, sizeof( UI_RESPONSE_PAYLOAD_T ) ); + payloadPtr += sizeof( UI_RESPONSE_PAYLOAD_T ); memcpy( payloadPtr, logDataPtr, sizeof( TREATMENT_LOG_DATA_PAYLOAD_T ) ); // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -1432,7 +1420,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_SWITCH_RESERVOIR_CMD; + msg.hdr.msgID = MSG_ID_DG_SWITCH_RESERVOIR_CMD_REQUEST; msg.hdr.payloadLen = sizeof( DG_SWITCH_RSRVRS_CMD_T ); memcpy( payloadPtr, cmd, sizeof( DG_SWITCH_RSRVRS_CMD_T ) ); @@ -1460,7 +1448,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_CHANGE_VALVE_SETTING_CMD; + msg.hdr.msgID = MSG_ID_DG_CHANGE_VALVE_SETTING_CMD_REQUEST; msg.hdr.payloadLen = sizeof( U32 ); memcpy( payloadPtr, &valveSettingCmd, sizeof( U32 ) ); @@ -1490,7 +1478,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_FILL_CMD; + msg.hdr.msgID = MSG_ID_DG_FILL_CMD_REQUEST; msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( F32 ); memcpy( payloadPtr, &fillToVolumeMl, sizeof( U32 ) ); @@ -1522,7 +1510,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_DRAIN_CMD; + msg.hdr.msgID = MSG_ID_DG_DRAIN_CMD_REQUEST; msg.hdr.payloadLen = sizeof( DRAIN_RESERVOIR_CMD_PAYLOAD_T ); memcpy( payloadPtr, drainCmdPtr, sizeof( DRAIN_RESERVOIR_CMD_PAYLOAD_T ) ); @@ -1550,7 +1538,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_STARTING_STOPPING_TREATMENT_CMD; + msg.hdr.msgID = MSG_ID_STARTING_STOPPING_TREATMENT_CMD_REQUEST; msg.hdr.payloadLen = sizeof( BOOL ); memcpy( payloadPtr, &start, sizeof( BOOL ) ); @@ -1579,7 +1567,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_START_STOP_TRIMMER_HEATER_CMD; + msg.hdr.msgID = MSG_ID_HD_START_STOP_TRIMMER_HEATER_CMD_REQUEST; msg.hdr.payloadLen = sizeof( BOOL ); memcpy( payloadPtr, &start, sizeof( BOOL ) ); @@ -1606,7 +1594,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_SAMPLE_WATER_CMD; + msg.hdr.msgID = MSG_ID_DG_SAMPLE_WATER_CMD_REQUEST; msg.hdr.payloadLen = sizeof( U32 ); memcpy( msg.payload, &cmd, sizeof( U32 ) ); @@ -1727,7 +1715,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_START_STOP_FLUSH; + msg.hdr.msgID = MSG_ID_DG_START_STOP_FLUSH_CMD_REQUEST; msg.hdr.payloadLen = sizeof( BOOL ); memcpy( msg.payload, &start, sizeof( BOOL ) ); @@ -1756,7 +1744,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_START_STOP_HEAT_DISINFECT; + msg.hdr.msgID = MSG_ID_DG_START_STOP_HEAT_DISINFECT_CMD_REQUEST; msg.hdr.payloadLen = sizeof( BOOL ); memcpy( msg.payload, &start, sizeof( BOOL ) ); @@ -1830,7 +1818,7 @@ payload.alarmsFlags |= ( almStatus.noMinimize ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_NO_MINIMIZE) : 0 ); payload.alarmsFlags |= ( almStatus.topAlarmConditionDetected ? BIT_BY_POS(ALARM_STATE_FLAG_BIT_POS_TOP_CONDITION) : 0 ); - result = broadcastData( MSG_ID_ALARM_STATUS, COMM_BUFFER_OUT_CAN_HD_ALARM, (U08*)&payload, sizeof( ALARM_COMP_STATUS_PAYLOAD_T ) ); + result = broadcastData( MSG_ID_ALARM_STATUS_DATA, COMM_BUFFER_OUT_CAN_HD_ALARM, (U08*)&payload, sizeof( ALARM_COMP_STATUS_PAYLOAD_T ) ); return result; } @@ -1969,7 +1957,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_DG_CONCENTRATE_MIXING_RATIOS; + msg.hdr.msgID = MSG_ID_HD_DG_CONCENTRATE_MIXING_RATIOS_REQUEST; msg.hdr.payloadLen = 0; // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -3086,7 +3074,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_VERSION; + msg.hdr.msgID = MSG_ID_HD_VERSION_REPONSE; msg.hdr.payloadLen = sizeof( HD_VERSIONS_T ); if ( message->hdr.payloadLen == sizeof( UI_VERSIONS_T ) ) @@ -3125,7 +3113,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_REQUEST_FW_VERSIONS; + msg.hdr.msgID = MSG_ID_FW_VERSIONS_REQUEST; msg.hdr.payloadLen = sizeof( UI_VERSIONS_T ); // usually UI sends this request w/ UI version info - we will leave that blank // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -3177,7 +3165,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_SERIAL_NUMBER; + msg.hdr.msgID = MSG_ID_HD_SERIAL_NUMBER_RESPONSE; // Add 1 byte for null terminator msg.hdr.payloadLen = MAX_TOP_LEVEL_SN_CHARS + 1; @@ -3330,7 +3318,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_UI_CONFIRMATION; + msg.hdr.msgID = MSG_ID_HD_UI_CONFIRMATION_REQUEST; // The payload length is U32 Request ID, U32 Type, U32 Reject Reason msg.hdr.payloadLen = 3 * sizeof( U32 ); @@ -5269,6 +5257,7 @@ if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) { memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) { result = testSetBatteryRemainingCapacityOverride( payload.state.f32 ); @@ -7258,7 +7247,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_DG_ALARMS; + msg.hdr.msgID = MSG_ID_HD_DG_ALARMS_REQUEST; msg.hdr.payloadLen = 0; // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -7283,7 +7272,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_DG_USAGE_INFO; + msg.hdr.msgID = MSG_ID_HD_DG_USAGE_INFO_REQUEST; msg.hdr.payloadLen = 0; // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer @@ -7308,7 +7297,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_DG_SERVICE_RECORD; + msg.hdr.msgID = MSG_ID_HD_DG_SERVICE_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 @@ -7605,7 +7594,7 @@ // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_REQUEST_DG_SERVICE_MODE; + msg.hdr.msgID = MSG_ID_HD_DG_SERVICE_MODE_REQUEST; msg.hdr.payloadLen = 0; // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer