Index: firmware/App/Controllers/Valves.h =================================================================== diff -u -r38ee99e9adeb19cacb0c88807e8f6f48b076a241 -r0b79c0e7dcf7f9e64c890447e83571d3123ab52c --- firmware/App/Controllers/Valves.h (.../Valves.h) (revision 38ee99e9adeb19cacb0c88807e8f6f48b076a241) +++ firmware/App/Controllers/Valves.h (.../Valves.h) (revision 0b79c0e7dcf7f9e64c890447e83571d3123ab52c) @@ -37,16 +37,27 @@ NUM_OF_VALVE_STATES ///< number of valve states } VALVE_STATE_NAMES_T; +#define NUM_OF_DD_VALVES ( ( LAST_DD_VALVE - FIRST_DD_VALVE ) + 1 ) +#define NUM_OF_IOFP_VALVES ( ( LAST_FP_VALVE - FIRST_IO_VALVE ) + 1 ) +#define NUM_OF_IO_VALVES ( ( LAST_IO_VALVE - FIRST_IO_VALVE ) + 1 ) +#define NUM_OF_FP_VALVES ( ( LAST_FP_VALVE - FIRST_FP_VALVE ) + 1 ) + #pragma pack(push, 1) /// Valves publish structure typedef struct { U16 valvesStatus; ///< 2 way valves status. U08 valvesBCStatus; ///< Balancing chamber valves status. - U08 valvesUFStatus; ///< Ultrafiltration valves status. - U08 valvesSensedState[ DD_NUM_OF_VALVES ]; ///< DD valves sensed states. + U08 valvesSensedState[ LAST_DD_VALVE + 1 ]; ///< DD sensed valve states. } DD_VALVES_DATA_T; +/// Valves publish structure +typedef struct +{ + U16 valvesCmdState; ///< Commanded FP valve states (bits). + U08 valvesSensedState[ NUM_OF_IOFP_VALVES ]; ///< Sensed FP valve states (enumerations). +} FP_VALVES_DATA_T; + /// Balancing chamber valve states override structure typedef struct { @@ -70,6 +81,10 @@ BOOL testValveSensedStateOverride( MESSAGE_T *message ); BOOL testValveOpenCloseStateOverride( MESSAGE_T *message ); +BOOL testIOFPValvesStatesPublishIntervalOverride( MESSAGE_T *message ); +BOOL testIOFPValveStateOverride( MESSAGE_T *message ); +BOOL testIOFPValveSensedStateOverride( MESSAGE_T *message ); + /**@}*/ #endif