Index: firmware/App/Modes/FPModes/FPOperationModes.c =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r269914a43e6b8416f596da27886cdf34402b1cc9 --- firmware/App/Modes/FPModes/FPOperationModes.c (.../FPOperationModes.c) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Modes/FPModes/FPOperationModes.c (.../FPOperationModes.c) (revision 269914a43e6b8416f596da27886cdf34402b1cc9) @@ -578,4 +578,24 @@ return result; } +/*********************************************************************//** + * @brief + * The testGetFPDefeaturedStatus function return whether FP is defeatured or not. + * @details \b Inputs: none + * @details \b Outputs: none + * @details \b Message: \b Sent: MSG_ID_FP_DEF_STATUS_RESPONSE + * @param message request message from Dialin for FP defeatured status. + * @return TRUE if set successful, FALSE if not + *************************************************************************/ +BOOL testGetFPDefeaturedStatus( MESSAGE_T *message ) +{ + BOOL result = FALSE; + FP_DEF_STATUS_PAYLOAD_T data; + + data.isFPDefeatured = isFPDefeatured(); + result = sendMessage( MSG_ID_FP_DEF_STATUS_RESPONSE, COMM_BUFFER_OUT_DD_CAN_PC, (U08*)&data, sizeof(FP_DEF_STATUS_PAYLOAD_T) ); + + return result; +} + /**@}*/ Index: firmware/App/Modes/FPModes/FPOperationModes.h =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r269914a43e6b8416f596da27886cdf34402b1cc9 --- firmware/App/Modes/FPModes/FPOperationModes.h (.../FPOperationModes.h) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Modes/FPModes/FPOperationModes.h (.../FPOperationModes.h) (revision 269914a43e6b8416f596da27886cdf34402b1cc9) @@ -34,13 +34,21 @@ #define NO_FP_SUB_STATE 0xFF ///< value for when submode does not have specific substates and is not applicable. +#pragma pack(push, 1) /// Payload record structure for op mode broadcast message typedef struct { U32 opMode; ///< Current operating mode U32 subMode; ///< Current sub-mode of current operating mode } OP_MODE_PAYLOAD_T; +/// Payload structure for FP defeatured status request +typedef struct +{ + BOOL isFPDefeatured; ///< Current operating mode +} FP_DEF_STATUS_PAYLOAD_T; +#pragma pack(pop) + // ********** public function prototypes ********** void initFPOperationModes( void ); // Initialize this unit @@ -59,7 +67,8 @@ void setCurrentFP4thLevelState( U32 state ); // Set the current 4th level state. BOOL testSetFPOperationMode( MESSAGE_T *message ); // Set operation mode override BOOL testSetFPOpModePublishIntervalOverride( MESSAGE_T *message ); // Set operation mode publish interval override -BOOL testSetGeneratePermeateSignal( MESSAGE_T *message ); // Set start stop generate permeate. +BOOL testSetGeneratePermeateSignal( MESSAGE_T *message ); // Set start stop generate permeate. +BOOL testGetFPDefeaturedStatus( MESSAGE_T *message ); // Send a response message with FP defeatured status payload /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r269914a43e6b8416f596da27886cdf34402b1cc9 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 269914a43e6b8416f596da27886cdf34402b1cc9) @@ -244,6 +244,7 @@ { MSG_ID_FP_SET_START_STOP_OVERRIDE_REQUEST, &testSetGeneratePermeateSignal }, { MSG_ID_FP_RO_REJECTION_RATIO_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testRORejectionRatioDataPublishIntervalOverride }, { MSG_ID_FP_RO_FILTERED_REJECTION_RATIO_OVERRIDE_REQUEST, &testRORejectionRatioFilteredOverride }, + { MSG_ID_FP_DEF_STATUS_REQUEST, &testGetFPDefeaturedStatus }, }; /// Calculation for number of entries in the incoming message function handler look-up table.