Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/hsb-mrts/inc/repairProcessRow.h
mmi bb08cae83a Major updates:
- added DAConverter(s)
- added ADConverter(s)
- Fixed some display issues
- Made repair process and signalProfileGenerator calculate with voltages (signed) instead of DAC/ADC values
- Fixed several bugs in task handlings
- Put display data mirror into dedicated file displaycontent

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@261 05563f52-14a8-4384-a975-3d1654cca0fa
2017-10-24 13:56:55 +00:00

108 lines
3.5 KiB
C

// -----------------------------------------------------------------------------
/// @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 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_ */