-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalarmsys.h
61 lines (54 loc) · 1.16 KB
/
alarmsys.h
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
/*
* alarmsys.h
*
* Created on: Nov 9, 2018
* Author: linux
*/
#ifndef ALARMSYS_H_
#define ALARMSYS_H_
// INCLUDE SYSTEM
// INCLUDE PROGRAM
#include "files/ctrlfile.h"
#include "socketclient/ThingSpeak.h"
#include "socketserver/DisplayServer.h"
#include "email/email.h"
using namespace std;
// DEFINES
#define TARGET
// GLOBAL VARS
extern bool sendsms;
extern bool armed;
extern bool alarmactive;
extern bool silentactive;
extern bool program_end;
extern bool contactopen;
extern bool xbeetest;
// CLASSES EXTERN
extern CtrlFile *ctrlfile;
extern ThingSpeak *tspeak;
extern Email *emailalarm;
extern DisplayServer *display;
// DEFINES
#define ON true
#define OFF false
#define SET true
#define CLR false
#define LOGFILENAME "/home/debian/Alarmsystem/files/alarm.log"
#define VERSION "V1.4"
// MAIN CLASS
class Alert
{
public:
Alert();
bool file_work(void);
void init_system(void);
bool init_tasks(void);
bool switch_relais(bool onoff);
void set_armed(void);
void set_unarmed(void);
void main_handler(void);
void create_itimer_mainproc(int i);
virtual ~Alert();
private:
};
#endif /* ALARMSYS_H_ */