// ----------------------------------------------------------------------------- /// @file repairProcessRow.h /// @brief File description // ----------------------------------------------------------------------------- // Micro-Key bv // Industrieweg 28, 9804 TG Noordhorn // Postbus 92, 9800 AB Zuidhorn // The Netherlands // Tel: +31 594 503020 // Fax: +31 594 505825 // Email: support@microkey.nl // Web: www.microkey.nl // ----------------------------------------------------------------------------- /// $Revision$ /// $Author$ /// $Date$ // (c) 2015 Micro-Key bv // ----------------------------------------------------------------------------- /** * %RepairProcessRow implementation * \defgroup RepairProcessRow Package RepairProcessRow * \ingroup hsb-mrts * @{ */ #ifndef REPAIRPROCESSROW_H_ #define REPAIRPROCESSROW_H_ // ----------------------------------------------------------------------------- // Include files // ----------------------------------------------------------------------------- #include #include "PID.h" // ----------------------------------------------------------------------------- // Constant and macro definitions // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Type definitions. // ----------------------------------------------------------------------------- struct RepairProcessRowErrorData { bool rowHasError; int outOfLimitsCounter; int outOfLimitsDuration; int outOfLimitsValue; }; struct RepairProcessRow { bool initialized; const struct ADConverter* adcChannel; int lastADCValue; const struct DAConverter* dacChannel; int lastDACValue; int pidError; struct Pid pid; struct RepairProcessRowErrorData errorData; }; // ----------------------------------------------------------------------------- // Function declarations // ----------------------------------------------------------------------------- /** ---------------------------------------------------------------------------- * repairProcessRow_construct * Constructor for a repair row * * @param self The repair row object * @param outOfLimtsDuration Duration limits for outOfLimts. When the * outOfLimits counter reaches this value, * the row is in error state * @param outOfLimitsValue The threshold that marks that the repair * row is outside valid boundaries and in * erro state * * @return ErrorStatus SUCCESS if construction was successful * ERROR otherwise * * @todo * ----------------------------------------------------------------------------- */ extern ErrorStatus repairProcessRow_construct(struct RepairProcessRow* self, const struct ADConverter* adcChannel, const struct DAConverter* dacChannel, int outOfLimitsDuration, int outOfLimitsValue); /** ---------------------------------------------------------------------------- * repairProcessRow_destruct * Destructor for a repair row * * @param self The repair row object * * @return void * * @todo * ----------------------------------------------------------------------------- */ extern void repairProcessRow_destruct(struct RepairProcessRow* self); #endif /* REPAIRPROCESSROW_H_ */ /** @} */