aqhome: re-implemented aqhomed.

- added IPC endpoint2
This commit is contained in:
Martin Preuss
2023-07-12 01:45:24 +02:00
parent 43b23b2636
commit 39987b31c7
25 changed files with 2140 additions and 564 deletions

50
apps/aqhomed/aqhomed_p.h Normal file
View File

@@ -0,0 +1,50 @@
/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2023 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQHOMED_P_H
#define AQHOMED_P_H
#include "./aqhomed.h"
#include "aqhome/nodes/nodedb.h"
/* default values */
#define AQHOMED_DEFAULT_NODEADDR 240
#define AQHOMED_DEFAULT_PIDFILE "/var/run/aqhomed.pid"
#define AQHOMED_DEFAULT_DEVICE "/dev/ttyUSB0"
#define AQHOMED_DEFAULT_IPC_PORT 45454
#define AQHOMED_DEFAULT_MQTT_CLIENTID "aqhomed"
#define AQHOMED_DEFAULT_MQTT_TOPIC_PREFIX "aqhome/sensors"
#define AQHOMED_DEFAULT_MQTT_KEEPALIVE 600
#define AQHOMED_DEFAULT_MQTT_PORT 1883
struct AQHOMED {
GWEN_MSG_ENDPOINT2 *rootEndpoint;
GWEN_MSG_ENDPOINT2 *ttyEndpoint;
GWEN_MSG_ENDPOINT2 *ipcdEndpoint;
GWEN_MSG_ENDPOINT2 *mqttEndpoint;
AQH_NODE_DB *nodeDb;
GWEN_DB_NODE *dbArgs;
char *dbFile;
char *logFile;
char *writeFolder;
char *pidFile;
int nodeAddress;
};
#endif