Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc9d07d1ef0aeca2e5b988303de87a56c313923bf -r049e70f1959af7f5d8afa73f373e87c20759d6a6 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c9d07d1ef0aeca2e5b988303de87a56c313923bf) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 049e70f1959af7f5d8afa73f373e87c20759d6a6) @@ -1814,6 +1814,19 @@ /*********************************************************************//** * @brief + * The setTesterStatusToLoggedOut function sets the status of the tester to + * logged out. + * @details Inputs: none + * @details Outputs: testerLoggedIn + * @return none + *************************************************************************/ +void setTesterStatusToLoggedOut( void ) +{ + testerLoggedIn = FALSE; +} + +/*********************************************************************//** + * @brief * The sendTestAckResponseMsg function constructs a simple response message for * a handled test message and queues it for transmit on the appropriate UART channel. * @details Inputs: none @@ -4536,4 +4549,105 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); } +/*********************************************************************//** + * @brief + * The handleTestDGSetTestConfig function handles a request to set the + * test configuration. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGSetTestConfig( MESSAGE_T *message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof( TEST_CONFIG_PAYLOAD_T ) ) + { + TEST_CONFIG_PAYLOAD_T payload; + + memcpy( &payload, message->payload, sizeof( TEST_CONFIG_PAYLOAD_T ) ); + + if ( TRUE == payload.reset ) + { + status = resetTestConfig( (TEST_CONFIG_T)payload.config ); + } + else + { + status = setTestConfig( (TEST_CONFIG_T)payload.config ); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + +/*********************************************************************//** + * @brief + * The handleTestDGGetTestConfig function handles a request to get the + * test configuration per request. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGGetTestConfig( MESSAGE_T* message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( 0 == message->hdr.payloadLen ) + { + result = sendTestConfigStatusToDialin(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleTestDGResetAllTestConfigs function handles a request to reset + * all of the test configurations. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGResetAllTestConfigs( MESSAGE_T* message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( ( 0 == message->hdr.payloadLen ) && ( TRUE == isTestingActivated() ) ) + { + result = resetAllTestConfigs(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleTestDGDialinCheckIn function handles check in from Dialin. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGDialinCheckIn( MESSAGE_T* message ) +{ + BOOL status = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + status = TRUE; + setDialinCheckInTimeStamp(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + /**@}*/