Index: TestSupport.h =================================================================== diff -u -rd797fb40d36f986ae2d8b169b9d133ffb0d90453 -r140b1f1da9f28b08926a4f1a0ceefa7e5a0759de --- TestSupport.h (.../TestSupport.h) (revision d797fb40d36f986ae2d8b169b9d133ffb0d90453) +++ TestSupport.h (.../TestSupport.h) (revision 140b1f1da9f28b08926a4f1a0ceefa7e5a0759de) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2023 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 TestSupport.h +* @file TestSupport.h * -* @author (last) Sean Nash -* @date (last) 25-Aug-2020 +* @author (last) Dara Navaei +* @date (last) 03-Jun-2023 * -* @author (original) Sean -* @date (original) 11-Feb-2020 +* @author (original) Sean +* @date (original) 11-Feb-2020 * ***************************************************************************/ @@ -31,8 +31,42 @@ #define OVERRIDE_KEY 0xCCC33C33 ///< Override key #define OVERRIDE_RESET 0x00000000 ///< Override reset +#ifdef _DG_ +/// DG 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_T; +#else +/// HD 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. + NUM_OF_TEST_CONFIGS ///< Number of test configuration. +} TEST_CONFIG_T; +#endif + #pragma pack(push,1) +/// Test configuration payload +typedef struct +{ + BOOL reset; ///< Test configuration reset. + U32 config; ///< Test configuration. +} TEST_CONFIG_PAYLOAD_T ; + /// Test override payload type union. typedef union { @@ -86,9 +120,24 @@ // ********** public function prototypes ********** +U08 getU08OverrideValue( OVERRIDE_U32_T *ovU32 ); +U16 getU16OverrideValue( OVERRIDE_U32_T *ovU32 ); U32 getU32OverrideValue( OVERRIDE_U32_T *ovU32 ); +S32 getS32OverrideValue( OVERRIDE_S32_T *ovS32 ); F32 getF32OverrideValue( OVERRIDE_F32_T *ovF32 ); +// Test configuration functions + +void initTestConfigs( void ); +BOOL setTestConfig( TEST_CONFIG_T config ); +BOOL resetTestConfig( TEST_CONFIG_T config ); +BOOL getTestConfigStatus( TEST_CONFIG_T config ); +BOOL sendTestConfigStatusToDialin( void ); +BOOL resetAllTestConfigs( void ); + +void setDialinCheckInTimeStamp( void ); +BOOL hasDialinCheckInExpired( void ); + /**@}*/ #endif