Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rc85d9f0a8023fabdf1cd557965958d225e2b9085 -r6679a2cd813b21a8cb4c58b3eeb721e0eef9a10b --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision c85d9f0a8023fabdf1cd557965958d225e2b9085) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 6679a2cd813b21a8cb4c58b3eeb721e0eef9a10b) @@ -18,19 +18,23 @@ #include // for memcpy() #include "reg_system.h" - +#include "BalancingChamber.h" #include "Conductivity.h" #include "Compatible.h" #include "ConcentratePumps.h" #include "DialysatePumps.h" #include "Heaters.h" #include "Level.h" #include "Messaging.h" +#include "MessagePayloads.h" +#include "ModeStandby.h" +#include "ModeGenDialysate.h" #include "OperationModes.h" #include "PAL.h" #include "Pressure.h" #include "SystemCommDD.h" #include "Temperature.h" +#include "TDInterface.h" #include "Utilities.h" #include "Valves.h" @@ -117,6 +121,16 @@ MSG_ID_DD_HEATERS_DUTY_CYCLE_OVERRIDE_REQUEST, MSG_ID_DD_LEVELS_PUBLISH_INTERVAL_OVERRIDE_REQUEST, MSG_ID_DD_LEVELS_STATUS_OVERRIDE_REQUEST, + MSD_ID_DD_TD_COMMUNICATION_STATUS_OVERRIDE_REQUEST, //40 + MSG_ID_DD_OP_MODE_STATUS_OVERRIDE_REQUEST, + MSG_ID_DD_SET_OPERATION_MODE_OVERRIDE_REQUEST, + MSG_ID_DD_START_GEN_DIALYSATE_MODE_OVERRIDE_REQUEST, + MSG_ID_DD_DIALYSATE_PUMPS_START_STOP_OVERRIDE_REQUEST, + MSG_ID_DD_GEND_MODE_DATA_PUBLISH_OVERRIDE_REQUEST, //45 + MSG_ID_DD_CONCENTRATE_PUMPS_START_STOP_OVERRIDE_REQUEST, + MSG_ID_DD_HEATERS_START_STOP_OVERRIDE_REQUEST, + MSG_ID_DD_VALVES_OPEN_CLOSE_STATE_OVERRIDE_REQUEST, + MSG_ID_DD_GEN_DIALYSATE_REQUEST_DATA, }; /// Message handling function table @@ -160,6 +174,16 @@ &testHeaterDutyCycleOverride, &testLevelsDataPublishIntervalOverride, &testLevelStatusOverride, + &testTDCommunicationStatus, //40 + &testDDOpModePublishIntervalOverride, + &testSetOperationMode, + &testDDstartGenDialysateOverride, + &testDialysatePumpStartStopOverride, + &testDDGenDialysateDataPublishIntervalOverride, //45 + &testConcentratePumpStartStopOverride, + &testHeaterStartStopOverride, + &testValveOpenCloseStateOverride, + &handleDialysateDeliveryRequestMsg, }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLERS) / sizeof(MsgFuncPtr)) @@ -175,7 +199,6 @@ // ********** private function prototypes ********** static BOOL sendTestAckResponseMsg( MSG_ID_T msgID, BOOL ack ); -static BOOL sendAckResponseMsg( MSG_ID_T msgID, COMM_BUFFER_T buffer, BOOL ack ); /*********************************************************************//** * @brief @@ -301,7 +324,7 @@ * @param ack TRUE if test message was handled successfully, FALSE if not * @return TRUE if response message successfully queued for transmit, FALSE if not *************************************************************************/ -static BOOL sendAckResponseMsg( MSG_ID_T msgID, COMM_BUFFER_T buffer, BOOL ack ) +BOOL sendAckResponseMsg( MSG_ID_T msgID, COMM_BUFFER_T buffer, BOOL ack ) { BOOL result; MESSAGE_T msg; @@ -392,10 +415,10 @@ /*********************************************************************//** * @brief - * The sendEvent function constructs an DG event message to the UI and + * The sendEvent function constructs an DD event message to the UI and * queues the msg for transmit on the appropriate CAN channel. * @details \b Inputs: none - * @details \b Outputs: DG event msg constructed and queued. + * @details \b Outputs: DD event msg constructed and queued. * @param event Enumeration of event type that occurred * @param dat1 First data associated with event * @param dat2 Second data associated with event @@ -463,7 +486,7 @@ payloadPtr += sizeof( U32 ); data = almData2.data.uInt.data; memcpy( payloadPtr, &data, sizeof( U32 ) ); - // Pad with space for 3 U32s - set to zero - unused for DG + // Pad with space for 3 U32s - set to zero - unused for DD payloadPtr += ( sizeof( U32) * 3 ); memset( payloadPtr, 0, sizeof( U32) * 3 ); @@ -565,6 +588,7 @@ return status; } + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/