- Re-located repairprocessrow information in dedicated object
- added error conditions to repair row and added condition handling to repair process

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@260 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-23 09:02:13 +00:00
parent aa9ba5ea8e
commit e3ca058c96
30 changed files with 1348 additions and 323 deletions

View File

@@ -0,0 +1,107 @@
// -----------------------------------------------------------------------------
/// @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
// -----------------------------------------------------------------------------
/// @defgroup {group_name} {group_description}
/// Description
/// @file repairProcessRow.h
/// @ingroup {group_name}
#ifndef REPAIRPROCESSROW_H_
#define REPAIRPROCESSROW_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include <stdbool.h>
#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 AdcChannel* adcChannel;
uint16_t lastADCValue;
const struct MAX5715_DAC* dacChannel;
uint16_t 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 AdcChannel* adcChannel, const struct MAX5715_DAC* 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_ */