-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathActions.h
More file actions
77 lines (69 loc) · 2 KB
/
Actions.h
File metadata and controls
77 lines (69 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// ********************
// Gestion des Actions
// ********************
class Action {
private:
int Idx; //Index
void CallExterne(String host, String url, int port);
int T_LastAction = 0;
int tempoTimer = 0;
int16_t Tseuil = 2000;
public:
Action(); //Constructeur par defaut
Action(int aIdx);
void Definir(String ligne);
String Lire();
void Activer(float Pw, int Heure, float Temperature, int Ltarfbin);
void Arreter();
void RelaisOn();
void Prioritaire();
int16_t CanalTempEnCours(int Heure);
byte TypeEnCours(int Heure, float Temperature, int Ltarfbin, int Retard);
byte SelActEnCours(int Heure);
int Valmin(int Heure);
int Valmax(int Heure);
struct ParaPeriode {
int Type;
int Vmin;
int Vmax;
};
ParaPeriode ParaEnCours(int Heure, float Temperature, int Ltarfbin, int Retard);
void InitGpio(int FreqPWM);
byte Actif; //0=Inactif,1=Decoupe ou On/Off, 2=Multi, 3= Train, 4=PWM (sauf Triac)
int Port;
int Repet;
int Tempo;
String Titre;
String Host;
String OrdreOn;
String OrdreOff;
int Gpio;
int OutOn;
int OutOff;
int tOnOff;
byte Kp, Ki, Kd;
byte NbPeriode;
byte ForceOuvre;
byte ExtSelAct; //Selection Action en cours
int8_t ExtValide; //Condition Action externe
int16_t ExtHequiv; //Duree heure *100 action externe
int16_t ExtOuvert; //Pourcent ouverture
bool On, PID;
float H_Ouvre;
byte Type[8]; //0=NO(pas utilisé),1=OFF,2=ON,3=PW,4=Triac
int16_t Hdeb[8];
int16_t Hfin[8];
int16_t Vmin[8]; //Seuil Pw On ou decoupe
int16_t Vmax[8]; //Seuil Pw Off ou ouverture max
byte ONouvre[8]; //Ouverture max à ON forcé
int16_t Tinf[8]; //Temperarure * 10
int16_t Tsup[8];
int16_t Hmin[8]; //Heure deci *100 Min pour actif. 0=non utilisé
int16_t Hmax[8]; //Heure deci *100 Max pour actif
int16_t CanalTemp[8];
byte SelAct[8]; //Ref ESP/Action. 255=pas exploité
byte Ooff[8]; //Ouvre Min Action pour Actif. 0 non utilisé
byte O_on[8];
byte Tarif[8];
};
extern void StockMessage(String m);