Files
c_pompes/main.hpp
2025-12-09 22:13:34 +01:00

63 lines
1.1 KiB
C++

#undef timeout
#include "mqtt/async_client.h"
void RemiseZeroInput();
void ProcessInitIO();
void ProcessInitValues();
double ProcessMoteur(int i);
void ProcessException();
void Process();
void InitPrometheus();
void ProcessPrometheus();
void ProcessMQTT(mqtt::async_client* client);
double SimulConsoSinusoidale(long t);
double SimulConsoBrown(double valeur_precedente);
// DIGITAL INPUT
#define IN_SENSOR_MIN 10
#define IN_SENSOR_LOW 11
#define IN_SENSOR_HIGH 12
#define IN_SENSOR_MAX 13
// ANALOG INPUT
#define IN_TANK_LEVEL 14
#define IN_FLOW_OUT 15
#define IN_FLOW_IN 16
#define IN_FLOW_DIF 17
#define IN_TANK_MIN 18
#define IN_TANK_MAX 19
#define IN_FLOW_CAP 20
#define IN_FLOW_1 21
#define IN_FLOW_2 22
#define IN_FLOW_3 23
#define IN_FLOW_4 24
// DIGITAL OUTPUT
#define OUT_PUMP_1 25
#define OUT_PUMP_2 26
#define OUT_PUMP_3 27
#define OUT_PUMP_4 28
#define OUT_DISPLAY_MODE 29
#define OUT_DISPLAY_GRAFCET 30
// ANALOG OUTPUT
#define OUT_LEVEL_MIN 31
#define OUT_LEVEL_LOW 32
#define OUT_LEVEL_HIGH 33
#define OUT_LEVEL_MAX 34
#define OUT_FLOW_PER_PUMP 35
#define OUT_FLOW_OUT_AMPLITUDE 36
#define OUT_BEEP 254
#define OUT_END 255