Index: TestSupport.c =================================================================== diff -u -r98fa971c534d21b71371cb72a7c0839fe79045e6 -r36df97071f4a8ba7a2bbfe129db7c7b231d293d8 --- TestSupport.c (.../TestSupport.c) (revision 98fa971c534d21b71371cb72a7c0839fe79045e6) +++ TestSupport.c (.../TestSupport.c) (revision 36df97071f4a8ba7a2bbfe129db7c7b231d293d8) @@ -591,7 +591,7 @@ BOOL result = FALSE; MESSAGE_T msg; TEST_CONFIG_T config; - U32 configStatus = 0; + BOOL configStatus; U08 *payloadPtr = msg.payload; if ( TRUE == isTestingActivated() ) @@ -607,14 +607,21 @@ #ifdef _RO_ //msg.hdr.msgID = //TODO update; #endif - msg.hdr.payloadLen = sizeof( testConfig ); + msg.hdr.payloadLen = MIN( sizeof( testConfig ), ( sizeof( BOOL ) * MAX_TEST_CONFIGS ) ); for ( config = TEST_CONFIG_FIRST; config < NUM_OF_TEST_CONFIGS; ++config ) { - configStatus = (U32)getTestConfigStatus( config ); + configStatus = getTestConfigStatus( config ); - memcpy( payloadPtr, &configStatus, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); + if ( (U32)config >= MAX_TEST_CONFIGS ) + { + break; + } + else + { + memcpy( payloadPtr, (U08*)&configStatus, sizeof( BOOL ) ); + payloadPtr += sizeof( BOOL ); + } } // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer Index: TestSupport.h =================================================================== diff -u -r98fa971c534d21b71371cb72a7c0839fe79045e6 -r36df97071f4a8ba7a2bbfe129db7c7b231d293d8 --- TestSupport.h (.../TestSupport.h) (revision 98fa971c534d21b71371cb72a7c0839fe79045e6) +++ TestSupport.h (.../TestSupport.h) (revision 36df97071f4a8ba7a2bbfe129db7c7b231d293d8) @@ -43,43 +43,37 @@ NUM_OF_OVERRIDE_TYPES ///< Number of override types. } OVERRIDE_TYPE_T; +/// Due to message payload size limitation, test config list cannot exceed 62 (250/4) configs. +#define MAX_TEST_CONFIGS ( MAX_MSG_PAYLOAD_SIZE / sizeof( BOOL ) ) + #ifdef _DD_ /// DD test software configurations typedef enum test_Config_enums { - TEST_CONFIG_MIX_WITH_WATER = 0, ///< Test configuration mix with water. - TEST_CONFIG_FIRST = TEST_CONFIG_MIX_WITH_WATER, ///< Test configuration first configuration. - TEST_CONFIG_DISABLE_INLET_WATER_TEMP_CHECK, ///< Test configuration disable inlet water temperature check. - TEST_CONFIG_RECOVER_TREATMENT, ///< Test configuration recover treatment. - NUM_OF_TEST_CONFIGS ///< Number of test configuration. + TEST_CONFIG_BETA_HW = 0, ///< Test configuration using Beta HW + TEST_CONFIG_FIRST = TEST_CONFIG_BETA_HW, ///< Test configuration first configuration. + TEST_CONFIG_DISABLE_BC_PRESSURE_ALARMS, ///< Test configuration disable inlet water temperature check. + TEST_CONFIG_DIENER_CONC_PUMP, ///< Test configuration recover treatment. + NUM_OF_TEST_CONFIGS ///< Number of test configuration. } TEST_CONFIG_T; - #endif #ifdef _TD_ /// TD test software configurations typedef enum test_Config { - TEST_CONFIG_USE_WET_CARTRIDGE = 0, ///< Test configuration use wet cartridge. - TEST_CONFIG_FIRST = TEST_CONFIG_USE_WET_CARTRIDGE, ///< Test configuration first configuration. - TEST_CONFIG_USE_WORN_CARTRIDGE, ///< Test configuration use worn cartridge. - TEST_CONFIG_EXPEDITE_PRE_TREATMENT, ///< Test configuration expedite pre-treatment. - TEST_CONFIG_SKIP_BLOOD_PRIME, ///< Test configuration skip blood prime. - TEST_CONFIG_SKIP_DISINFECT_AND_SERVICE_TX_BLOCKERS, ///< Test configuration skip disinfect and service treatment blockers. - TEST_CONFIG_DISABLE_WET_SELFTEST_DISPLACEMENT_ALARM, ///< Test configuration disable wet self test displacement alarm. - TEST_CONFIG_RECOVER_TREATMENT, ///< Test configuration recover treatment. - TEST_CONFIG_ENABLE_ONE_MINUTE_TREATMENT, ///< Test configuration enable one minute treatment. - TEST_CONFIG_DISABLE_BLOOD_LEAK_ALARM, ///< Test configuration disable blood leak alarm. + TEST_CONFIG_FIRST = 0, ///< Test configuration first configuration. NUM_OF_TEST_CONFIGS ///< Number of test configuration. } TEST_CONFIG_T; #endif #ifdef _RO_ -/// DD test software configurations +/// FP test software configurations typedef enum test_Config_enums { - TEST_CONFIG_FIRST = 0, - NUM_OF_TEST_CONFIGS ///< Number of test configuration. + TEST_CONFIG_BETA_HW = 0, ///< Test configuration using Beta HW + TEST_CONFIG_FIRST = TEST_CONFIG_BETA_HW, ///< Test configuration first configuration. + NUM_OF_TEST_CONFIGS = 1, ///< Number of test configuration. } TEST_CONFIG_T; #endif