Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rf47dd3b39499eee03d3e93236335c087b4ad71fb -r4c26b49a73736fa697bf7565dd7685c4e1cd599a --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision f47dd3b39499eee03d3e93236335c087b4ad71fb) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 4c26b49a73736fa697bf7565dd7685c4e1cd599a) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2023 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file SystemComm.c * -* @author (last) Sean Nash -* @date (last) 10-Oct-2023 +* @author (last) Dara Navaei +* @date (last) 10-May-2024 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -23,27 +23,27 @@ #include "Comm.h" #include "Interrupts.h" -#include "OperationModes.h" -#include "SystemComm.h" -#include "SystemCommMessages.h" -#include "Interrupts.h" #include "OperationModes.h" +#include "SystemComm.h" +#include "SystemCommMessages.h" +#include "Interrupts.h" +#include "OperationModes.h" #include "Timers.h" #include "Utilities.h" -/** - * @addtogroup SystemComm - * @{ - */ - +/** + * @addtogroup SystemComm + * @{ + */ + // ********** private definitions ********** #define NUM_OF_CAN_OUT_BUFFERS 5 ///< Number of CAN buffers for transmit #define NUM_OF_CAN_IN_BUFFERS 7 ///< Number of CAN buffers for receiving -#define NUM_OF_MSG_IN_BUFFERS 7 ///< Number of Msg buffers for receiving +#define NUM_OF_MSG_IN_BUFFERS 7 ///< Number of Msg buffers for receiving #define CAN_XMIT_PACKET_TIMEOUT_MS 200 ///< If transmitted CAN frame does not cause a transmit complete interrupt within this time, re-send or move on -#define MAX_XMIT_RETRIES 5 ///< Maximum number of retries on no transmit complete interrupt timeout +#define MAX_XMIT_RETRIES 5 ///< Maximum number of retries on no transmit complete interrupt timeout #define UI_COMM_TIMEOUT_IN_MS 7500 ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD. #define UI_COMM_SERVICE_MODE_TIMEOUT_IN_MS (2 * SEC_PER_MIN * MS_PER_SECOND) ///< Maximum time (in ms) that UI is allowed to wait before checking in with HD when in service mode. @@ -53,7 +53,7 @@ #define MAX_COMM_CRC_FAILURE_WINDOW_MS (10 * SEC_PER_MIN * MS_PER_SECOND) ///< CRC error window #define MSG_NOT_ACKED_TIMEOUT_MS 250 ///< Maximum time for a Denali message that requires ACK to be ACK'd - + #define MSG_NOT_ACKED_MAX_RETRIES 10 ///< Maximum number of times a message that requires ACK that was not ACK'd can be re-sent before alarm #define PENDING_ACK_LIST_SIZE 25 ///< Maximum number of Denali messages that can be pending ACK at any given time @@ -65,23 +65,23 @@ #pragma pack(push, 1) -/// Record for transmitted message that is pending acknowledgment from receiver. +/// Record for transmitted message that is pending acknowledgment from receiver. typedef struct { - BOOL used; - U16 seqNo; - U16 retries; - U32 timeStamp; - COMM_BUFFER_T channel; - U32 msgSize; - U08 msg[ MAX_ACK_MSG_SIZE ]; + BOOL used; ///< Used. + U16 seqNo; ///< Message sequence number. + U16 retries; ///< Number of retries. + U32 timeStamp; ///< Time stamp. + COMM_BUFFER_T channel; ///< Channel ID. + U32 msgSize; ///< Message size. + U08 msg[ MAX_ACK_MSG_SIZE ]; ///< Message. } PENDING_ACK_RECORD_T; #pragma pack(pop) // ********** private data ********** -/// Array of out-going CAN buffers. +/// Array of out-going CAN buffers. const COMM_BUFFER_T CAN_OUT_BUFFERS[ NUM_OF_CAN_OUT_BUFFERS ] = { COMM_BUFFER_OUT_CAN_HD_ALARM, @@ -91,7 +91,7 @@ COMM_BUFFER_OUT_CAN_PC }; -/// Array of in-coming CAN buffers. +/// Array of in-coming CAN buffers. const COMM_BUFFER_T MSG_IN_BUFFERS[ NUM_OF_MSG_IN_BUFFERS ] = { COMM_BUFFER_IN_CAN_DG_ALARM, @@ -109,8 +109,8 @@ static volatile PENDING_ACK_RECORD_T pendingAckList[ PENDING_ACK_LIST_SIZE ]; ///< List of outgoing messages that are awaiting an ACK -static volatile BOOL hdIsOnlyCANNode = TRUE; ///< Flag indicating whether HD is alone on CAN bus. -static U32 canXmitRetryCtr = 0; ///< Counter for CAN transmit retries. +static volatile BOOL hdIsOnlyCANNode = TRUE; ///< Flag indicating whether HD is alone on CAN bus. +static U32 canXmitRetryCtr = 0; ///< Counter for CAN transmit retries. static volatile BOOL dgIsCommunicating = FALSE; ///< Has DG sent a message since last check static U32 timeOfLastDGCheckIn = 0; ///< Last time DG checked in static volatile BOOL uiIsCommunicating = FALSE; ///< Has UI sent a message since last check @@ -148,12 +148,12 @@ { U32 i; - // Initialize bad message CRC time windowed count - initTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC, MAX_COMM_CRC_FAILURES, MAX_COMM_CRC_FAILURE_WINDOW_MS ); - - // Initialize FPGA clock speed error time windowed count - initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); + // Initialize bad message CRC time windowed count + initTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC, MAX_COMM_CRC_FAILURES, MAX_COMM_CRC_FAILURE_WINDOW_MS ); + // Initialize FPGA clock speed error time windowed count + initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CLOCK_SPEED_ERROR, MAX_FPGA_CLOCK_SPEED_ERRORS, MAX_FPGA_CLOCK_SPEED_ERROR_WINDOW_MS); + // Initialize pending ACK list for ( i = 0; i < PENDING_ACK_LIST_SIZE; i++ ) { @@ -172,11 +172,11 @@ void checkInFromDG( void ) { dgIsCommunicating = TRUE; - timeOfLastDGCheckIn = getMSTimerCount(); - - if ( TRUE == isAlarmActive( ALARM_ID_HD_DG_COMM_TIMEOUT ) ) - { - clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); + timeOfLastDGCheckIn = getMSTimerCount(); + + if ( TRUE == isAlarmActive( ALARM_ID_HD_DG_COMM_TIMEOUT ) ) + { + clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); } } @@ -190,10 +190,10 @@ *************************************************************************/ void checkInFromUI( void ) { - if ( FALSE == uiDidCommunicate ) - { // Start DG check-in timer when UI first communicates - timeOfLastDGCheckIn = getMSTimerCount(); - } + if ( FALSE == uiDidCommunicate ) + { // Start DG check-in timer when UI first communicates + timeOfLastDGCheckIn = getMSTimerCount(); + } uiIsCommunicating = TRUE; timeOfLastUICheckIn = getMSTimerCount(); @@ -238,36 +238,36 @@ * @return TRUE if UI has communicated since power up, FALSE if not *************************************************************************/ BOOL uiCommunicated( void ) -{ -#ifdef SIMULATE_UI - uiDidCommunicate = TRUE; -#endif +{ +#ifdef SIMULATE_UI + uiDidCommunicate = TRUE; +#endif return uiDidCommunicate; -} - -/*********************************************************************//** - * @brief - * The isHDOnlyCANNode function determines whether the HD is the only node - * currently on the CAN bus. - * @details Inputs: hdIsOnlyCANNode - * @details Outputs: none - * @return TRUE if HD is only node on CAN bus, FALSE if not - *************************************************************************/ -BOOL isHDOnlyCANNode( void ) -{ - return hdIsOnlyCANNode; } /*********************************************************************//** * @brief + * The isHDOnlyCANNode function determines whether the HD is the only node + * currently on the CAN bus. + * @details Inputs: hdIsOnlyCANNode + * @details Outputs: none + * @return TRUE if HD is only node on CAN bus, FALSE if not + *************************************************************************/ +BOOL isHDOnlyCANNode( void ) +{ + return hdIsOnlyCANNode; +} + +/*********************************************************************//** + * @brief * The execSystemCommRx function manages received data from other sub-systems. * @details Inputs: none * @details Outputs: Incoming messages parsed and processed. * @return none *************************************************************************/ void execSystemCommRx( void ) -{ +{ // Parse messages from comm buffers and queue them processIncomingData(); @@ -297,39 +297,39 @@ *************************************************************************/ void execSystemCommTx( void ) { - // Do not transmit if no other nodes on CAN bus - if ( FALSE == hdIsOnlyCANNode ) - { - // If CAN transmitter is idle, start transmitting any pending packets - if ( FALSE == isCAN1TransmitInProgress() ) - { - transmitNextCANPacket(); - } - else - { - // Generally, transmitter should not be busy at time of this function call - check timeout just in case so we do not get stuck waiting forever - if ( TRUE == didTimeout( lastCANPacketSentTimeStamp, CAN_XMIT_PACKET_TIMEOUT_MS ) ) - { - // Assume last packet was not successfully transmitted. Re-send last packet. - if ( ++canXmitRetryCtr <= MAX_XMIT_RETRIES ) - { - // Ensure we have a previous CAN packet/channel to resend - canTransmit() channel param MUST be valid - if ( ( lastCANPacketSentChannel > COMM_BUFFER_NOT_USED ) && ( lastCANPacketSentChannel <= COMM_BUFFER_LAST_CAN_BUFFER ) ) - { - canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); - } - } - // We must be only node on CAN bus - nobody is ACKing our transmitted frames - else - { - hdIsOnlyCANNode = TRUE; // Set only CAN node flag - canXmitRetryCtr = MAX_XMIT_RETRIES; - signalCANXmitsCompleted(); // Clear pending xmit flag - clearCANXmitBuffers(); // Clear xmit buffers - nothing is going out right now - } // end - are we retrying xmit or are we alone on CAN bus - } // end - pending xmit timeout? - } // end - transmit in progress or not - } // end - DG not alone on CAN bus + // Do not transmit if no other nodes on CAN bus + if ( FALSE == hdIsOnlyCANNode ) + { + // If CAN transmitter is idle, start transmitting any pending packets + if ( FALSE == isCAN1TransmitInProgress() ) + { + transmitNextCANPacket(); + } + else + { + // Generally, transmitter should not be busy at time of this function call - check timeout just in case so we do not get stuck waiting forever + if ( TRUE == didTimeout( lastCANPacketSentTimeStamp, CAN_XMIT_PACKET_TIMEOUT_MS ) ) + { + // Assume last packet was not successfully transmitted. Re-send last packet. + if ( ++canXmitRetryCtr <= MAX_XMIT_RETRIES ) + { + // Ensure we have a previous CAN packet/channel to resend - canTransmit() channel param MUST be valid + if ( ( lastCANPacketSentChannel > COMM_BUFFER_NOT_USED ) && ( lastCANPacketSentChannel <= COMM_BUFFER_LAST_CAN_BUFFER ) ) + { + canTransmit( canREG1, lastCANPacketSentChannel, lastCANPacketSent ); + } + } + // We must be only node on CAN bus - nobody is ACKing our transmitted frames + else + { + hdIsOnlyCANNode = TRUE; // Set only CAN node flag + canXmitRetryCtr = MAX_XMIT_RETRIES; + signalCANXmitsCompleted(); // Clear pending xmit flag + clearCANXmitBuffers(); // Clear xmit buffers - nothing is going out right now + } // end - are we retrying xmit or are we alone on CAN bus + } // end - pending xmit timeout? + } // end - transmit in progress or not + } // end - DG not alone on CAN bus } /*********************************************************************//** @@ -348,15 +348,15 @@ // Message interrupt is for a transmit message box? if ( TRUE == isCANBoxForXmit( srcCANBox ) ) { - U32 bytesXmitted; - + U32 bytesXmitted; + bytesXmitted = transmitNextCANPacket(); // If nothing more to send, signal that transmitter is available if ( 0 == bytesXmitted ) { signalCANXmitsCompleted(); - } + } } else if ( TRUE == isCANBoxForRecv( srcCANBox ) ) { @@ -377,7 +377,7 @@ } else { - // Should not get here - not an active message box + // Should not get here - not an active message box SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_CAN_MESSAGE_BOX, srcCANBox ) } } @@ -432,26 +432,26 @@ } return result; -} - -/*********************************************************************//** - * @brief - * The clearCANXmitBuffers function clears all CAN transmit buffers. - * @details Inputs: CAN_OUT_BUFFERS[] - * @details Outputs: CAN transmit buffers cleared. - * @return none - *************************************************************************/ -static void clearCANXmitBuffers( void ) -{ - U32 i; - - for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) - { - clearBuffer( CAN_OUT_BUFFERS[ i ] ); - } } +/*********************************************************************//** + * @brief + * The clearCANXmitBuffers function clears all CAN transmit buffers. + * @details Inputs: CAN_OUT_BUFFERS[] + * @details Outputs: CAN transmit buffers cleared. + * @return none + *************************************************************************/ +static void clearCANXmitBuffers( void ) +{ + U32 i; + for ( i = 0; i < NUM_OF_CAN_OUT_BUFFERS; i++ ) + { + clearBuffer( CAN_OUT_BUFFERS[ i ] ); + } +} + + /************************************************************************* ********************** TRANSMIT SUPPORT FUNCTIONS ************************ *************************************************************************/ @@ -543,7 +543,7 @@ * The processIncomingData function parses out messages from the Input * Comm Buffers and adds them to the Received Message Queue. * @details Inputs: none - * @details Outputs:hdIsOnlyCANNode, rcvMsg, dgIsCommunicating, + * @details Outputs:hdIsOnlyCANNode, rcvMsg, dgIsCommunicating, * timeOfLastDGCheckIn, timeOfLastUICheckIn, uiDidCommunicate * @return none *************************************************************************/ @@ -572,9 +572,9 @@ if ( numOfBytesInBuffer >= MESSAGE_OVERHEAD_SIZE ) { // Peek at minimum of all bytes available or max message size (+1 for sync byte) U32 bytesPeeked = peekFromCommBuffer( MSG_IN_BUFFERS[ i ], data, MIN( numOfBytesInBuffer, sizeof( MESSAGE_WRAPPER_T ) + 1 ) ); - S32 msgSize = parseMessageFromBuffer( data, bytesPeeked ); - - hdIsOnlyCANNode = FALSE; // Since we are getting a message, this indicates we are not the only node on the CAN bus + S32 msgSize = parseMessageFromBuffer( data, bytesPeeked ); + + hdIsOnlyCANNode = FALSE; // Since we are getting a message, this indicates we are not the only node on the CAN bus canXmitRetryCtr = 0; if ( msgSize > 0 ) // Valid, complete message found? @@ -597,19 +597,19 @@ // Copy CRC portion of message data to the new message rcvMsg.crc = *dataPtr; // Add new message to queue for later processing - addToMsgQueue( MSG_Q_IN, &rcvMsg ); - // If message from DG broadcast channel, update DG comm status - if ( COMM_BUFFER_IN_CAN_DG_BROADCAST == MSG_IN_BUFFERS[ i ] ) - { - dgIsCommunicating = TRUE; - timeOfLastDGCheckIn = getMSTimerCount(); - } - // If message from UI channel, mark UI communication so HD can begin transmitting - if ( ( COMM_BUFFER_IN_CAN_UI_2_HD == MSG_IN_BUFFERS[ i ] ) || ( COMM_BUFFER_IN_CAN_UI_BROADCAST == MSG_IN_BUFFERS[ i ] ) ) - { - timeOfLastUICheckIn = getMSTimerCount(); - uiDidCommunicate = TRUE; + addToMsgQueue( MSG_Q_IN, &rcvMsg ); + // If message from DG broadcast channel, update DG comm status + if ( COMM_BUFFER_IN_CAN_DG_BROADCAST == MSG_IN_BUFFERS[ i ] ) + { + dgIsCommunicating = TRUE; + timeOfLastDGCheckIn = getMSTimerCount(); } + // If message from UI channel, mark UI communication so HD can begin transmitting + if ( ( COMM_BUFFER_IN_CAN_UI_2_HD == MSG_IN_BUFFERS[ i ] ) || ( COMM_BUFFER_IN_CAN_UI_BROADCAST == MSG_IN_BUFFERS[ i ] ) ) + { + timeOfLastUICheckIn = getMSTimerCount(); + uiDidCommunicate = TRUE; + } } else if ( -1 == msgSize ) // Candidate message with bad CRC found? { @@ -721,7 +721,7 @@ { BOOL isThereMsgRcvd = TRUE; // Assume TRUE at first to get into while loop MESSAGE_WRAPPER_T message; - + while ( TRUE == isThereMsgRcvd ) { // See if any messages received @@ -780,10 +780,10 @@ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_COMM_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif { - activateAlarmNoData( ALARM_ID_HD_UI_COMM_TIMEOUT ); - } + clearAlarmCondition( ALARM_ID_HD_DG_COMM_TIMEOUT ); + } + dgIsCommunicating = FALSE; } - if ( TRUE == didTimeout( timeOfLastDGCheckIn, DG_COMM_TIMEOUT_IN_MS ) ) { #ifndef RUN_WITHOUT_DG @@ -815,10 +815,10 @@ *************************************************************************/ static void checkTooManyBadMsgCRCs( void ) { - if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); - } + if ( TRUE == incTimeWindowedCount( TIME_WINDOWED_COUNT_BAD_MSG_CRC ) ) + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_COMM_TOO_MANY_BAD_CRCS, (U32)ALARM_SOURCE_HD ); + } } /*********************************************************************//** @@ -861,8 +861,8 @@ { _enable_IRQ(); } - } - + } + return result; } @@ -923,7 +923,7 @@ pendingAckList[ i ].retries--; pendingAckList[ i ].timeStamp = getMSTimerCount(); addToCommBuffer( pendingAckList[ i ].channel, (U08*)pendingAckList[ i ].msg, pendingAckList[ i ].msgSize ); - } + } // If no retries left, alarm else { @@ -964,18 +964,18 @@ handleOffButtonConfirmMsgFromUI( message ); break; - case MSG_ID_ALARM_TRIGGERED: - handleAlarmTriggered( message ); - break; - - case MSG_ID_ALARM_CONDITION_CLEARED: - handleAlarmCleared( message ); - break; - - case MSG_ID_UI_ALARM_USER_ACTION_REQUEST: - handleAlarmUserAction( message ); + case MSG_ID_ALARM_TRIGGERED: + handleAlarmTriggered( message ); break; + case MSG_ID_ALARM_CONDITION_CLEARED: + handleAlarmCleared( message ); + break; + + case MSG_ID_UI_ALARM_USER_ACTION_REQUEST: + handleAlarmUserAction( message ); + break; + case MSG_ID_UI_CHECK_IN: handleUICheckIn( message ); break; @@ -990,12 +990,12 @@ case MSG_ID_USER_UF_SETTINGS_CHANGE_REQUEST: handleChangeUFSettingsRequest( message ); - break; - - case MSG_ID_USER_SALINE_BOLUS_REQUEST: - handleSalineBolusRequest( message ); break; + case MSG_ID_USER_SALINE_BOLUS_REQUEST: + handleSalineBolusRequest( message ); + break; + case MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE_REQUEST: handleChangeUFSettingsConfirmation( message ); break; @@ -1010,23 +1010,23 @@ case MSG_ID_FW_VERSIONS_REQUEST: handleFWVersionRequest( message ); - handleHDSerialNumberRequest(); - break; - - case MSG_ID_DG_VERSION_REPONSE: - handleDGVersionResponse( message ); - break; - - case MSG_ID_DG_HEATERS_DATA: - handleDGHeatersData( message ); + handleHDSerialNumberRequest(); break; + case MSG_ID_DG_VERSION_REPONSE: + handleDGVersionResponse( message ); + break; + + case MSG_ID_DG_HEATERS_DATA: + handleDGHeatersData( message ); + break; + case MSG_ID_DG_TEMPERATURE_DATA: handleDGTemperatureData( message ); break; - case MSG_ID_DG_FLOW_SENSORS_DATA: - handleDialysateFlowData( message ); + case MSG_ID_DG_FLOW_SENSORS_DATA: + handleDialysateFlowData( message ); break; case MSG_ID_DG_OP_MODE_DATA: @@ -1209,14 +1209,28 @@ handleReceiveROPermeateSampleReadyToDispenseFromDG( message ); break; + case MSG_ID_HD_SET_ENTER_BOOTLOADER: + case MSG_ID_HD_ENTER_BOOTLOADER_NOW: + case MSG_ID_HD_REBOOT_NOW: + handleRebootNowRequest( message ); + break; + + case MSG_ID_UI_INSTITUTIONAL_RECORD_REQUEST: + handleSendInstitutionalRecordToUI( message ); + break; + + case MSG_ID_UI_HD_RESET_IN_SERVICE_MODE_REQUEST: + handleUIHDResetInServiceModeRequest( message ); + break; + // NOTE: this always must be the last case case MSG_ID_TESTER_LOGIN_REQUEST: handleTesterLogInRequest( message ); break; default: // Un-recognized or un-handled message ID received - ignore - break; + break; } // Handle any test messages if tester has logged in successfully @@ -1266,12 +1280,12 @@ case MSG_ID_BLOOD_FLOW_SEND_INTERVAL_OVERRIDE: handleTestBloodFlowBroadcastIntervalOverrideRequest( message ); - break; - - case MSG_ID_TREATMENT_TIME_REMAINING_OVERRIDE: - handleTestTreatmentTimeRemainingOverrideRequest( message ); break; + case MSG_ID_TREATMENT_TIME_REMAINING_OVERRIDE: + handleTestTreatmentTimeRemainingOverrideRequest( message ); + break; + case MSG_ID_BLOOD_PUMP_MEAS_SPEED_OVERRIDE: handleTestBloodPumpMeasuredSpeedOverrideRequest( message ); break; @@ -1318,6 +1332,14 @@ case MSG_ID_OCCLUSION_BLOOD_PUMP_OVERRIDE: handleTestBloodPumpOcclusionOverrideRequest( message ); + break; + + case MSG_ID_HD_PARTIAL_OCCLUSION_BLOOD_PUMP_OVERRIDE: + handleTestFilteredBloodPumpOcclusionOverrideRequest( message ); + break; + + case MSG_ID_HD_PARTIAL_OCCL_BLOOD_PUMP_BASELINE_OVERRIDE: + handleTestBloodPumpOcclusionBaselineOverrideRequest( message ); break; case MSG_ID_PRES_OCCL_SEND_INTERVAL_OVERRIDE: @@ -1414,6 +1436,10 @@ handleSetAirTrapLevelSensorOverrideRequest( message ); break; + case MSG_ID_HD_RAW_AIR_TRAP_LEVEL_SENSOR_OVERRIDE: + handleSetRawAirTrapLevelSensorOverrideRequest( message ); + break; + case MSG_ID_HD_SOFTWARE_RESET_REQUEST: handleHDSoftwareResetRequest( message ); break; @@ -1678,7 +1704,7 @@ handleTestFansRPMAlarmStartTimeOffsetRequest( message ); break; - case MSG_ID_HD_SYRINGE_PUMP_HEPRIN_BOLUS_TARGET_RATE_OVERRIDE: + case MSG_ID_HD_SYRINGE_PUMP_HEPARIN_BOLUS_TARGET_RATE_OVERRIDE: handleTestSyringePumpHeprinBolusTargetRateOverrideRequest( message ); break; @@ -1816,10 +1842,18 @@ handleTestHDRecirulationPctOverrideRequest( message ); break; + case MSG_ID_HD_GET_INSTITUTIONAL_RECORD: + handleGetHDInstitutionalRecord( message ); + break; + + case MSG_ID_HD_SET_INSTITUTIONAL_RECORD: + handleSetHDInstitutionalRecord( message ); + break; + // The default cannot be reached in VectorCAST since the cases are run in a for loop default: // Unrecognized message ID received - ignore - break; + break; } } }