started working on aqhome-data.

this will be the data daemon storing datapoints, accessable via IPC.
This commit is contained in:
Martin Preuss
2023-08-14 02:00:37 +02:00
parent 51a13f286f
commit 5fdb33c192
24 changed files with 1976 additions and 26 deletions

View File

@@ -0,0 +1,43 @@
/****************************************************************************
* 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 AQHOME_DATA_P_H
#define AQHOME_DATA_P_H
#include "./aqhome_data.h"
#include <gwenhywfar/mutex.h>
#define AQHOME_DATA_DEFAULT_PIDFILE "/var/run/aqhome-data.pid"
#define AQHOME_DATA_DEFAULT_DATADIR "/var/lib/aqhome-data/data"
#define AQHOME_DATA_DEFAULT_STATEFILE "/var/lib/aqhome-data/statefile"
#define AQHOME_DATA_DEFAULT_IPC_PORT 45456
struct AQHOME_DATA {
GWEN_MSG_ENDPOINT *ipcdEndpoint;
GWEN_DB_NODE *dbArgs;
AQH_STORAGE *storage;
char *pidFile;
int timeout; /* timeout for run e.g. inside valgrind */
GWEN_MUTEX *storageMutex;
};
#endif