-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.h
executable file
·66 lines (56 loc) · 1.61 KB
/
functions.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
62
63
64
65
66
// Main functions
int main(int argc, char** argv);
void requestAllStatus();
void initApp(bool fullInit);
// UDP receiver functions
int udpInit();
void udpClose();
int udpProcess(int udpRecvBytes, char *senderIP);
void *udpServer(void *argument);
void checkUDP();
// UDP broadcast functions
int udpSend(char *weiStatus, int weiStatusLen);
// TCP server functions
int tcpInit();
void tcpClose();
int tcpProcess();
void *tcpServer(void *argument);
int debugTcpInit();
void debugTcpClose();
int debugTcpProcess();
void *debugTcpServer(void *argument);
void checkTCP();
// TCP client functions
int tcpSend(char *devCmd, char *devIP, int cmdLen);
int tcpSendToPort(char *devCmd, char *devIP, int cmdLen, int tcpPort);
// MQTT functions
int mqttInit();
int mqttClose();
int subscribeTopic(char * topic, int qos);
int unsubscribeTopic(char * topic);
int publishTopic(char * topic, char * payload, int qos);
void mqttPublisher();
void mqttProcess();
void checkMQTT();
// Camera functions
void *camStreamThread(void *argument);
// Temperature sensor functions
void dht11Read();
bool DHT_read();
uint32_t DHT_expectPulse(bool level);
float calcHeatIndex(float floatTemp, float floatHumid);
float convertCtoF(float c);
float convertFtoC(float f);
// Signal handler functions
void signalHandler( int signum );
// Time functions
void updateDeviceTime();
void getSysTime(int isCmd);
void lunchReboot();
void rebootRouter();
// File & directory functions
int stringcmp(const void *a,const void *b);
void cleanDir();
void moveVideos();
void *moveVideosThread(void *argument);
void checkSamba();