aqhome, aqhome-apps: cleanup, removed unneeded files.

This commit is contained in:
Martin Preuss
2025-03-14 21:22:48 +01:00
parent 31d8cb10df
commit 7e745c98e6
194 changed files with 292 additions and 17295 deletions

View File

@@ -258,22 +258,24 @@ void _setDeviceName(AQH_VALUE *value, uint32_t uid)
void _announceValue(AQH_NODE_SERVER *xo, uint32_t uid, const AQHNODE_VALUE *v)
{
AQH_VALUE *value;
AQH_MESSAGE *msg;
value=AQH_Value_new();
_setDeviceName(value, uid);
AQH_Value_SetDriver(value, "nodes");
AQH_Value_SetName(value, AQHNODE_Value_GetName(v));
AQH_Value_SetValueUnits(value, AQHNODE_Value_GetValueUnits(v));
AQH_Value_SetValueType(value, AQHNODE_Value_GetValueType(v));
AQH_Value_SetModality(value, AQHNODE_Value_GetModality(v));
if (xo && xo->brokerEndpoint) {
AQH_VALUE *value;
AQH_MESSAGE *msg;
msg=AQH_IpcdMessageValues_newForOne(AQH_MSGTYPE_IPC_DATA_ANNOUNCEVALUE,
AQH_Endpoint_GetNextMessageId(xo->brokerEndpoint), 0,
0, value);
AQH_Endpoint_AddMsgOut(xo->brokerEndpoint, msg);
AQH_Value_free(value);
value=AQH_Value_new();
_setDeviceName(value, uid);
AQH_Value_SetDriver(value, "nodes");
AQH_Value_SetName(value, AQHNODE_Value_GetName(v));
AQH_Value_SetValueUnits(value, AQHNODE_Value_GetValueUnits(v));
AQH_Value_SetValueType(value, AQHNODE_Value_GetValueType(v));
AQH_Value_SetModality(value, AQHNODE_Value_GetModality(v));
msg=AQH_IpcdMessageValues_newForOne(AQH_MSGTYPE_IPC_DATA_ANNOUNCEVALUE,
AQH_Endpoint_GetNextMessageId(xo->brokerEndpoint), 0,
0, value);
AQH_Endpoint_AddMsgOut(xo->brokerEndpoint, msg);
AQH_Value_free(value);
}
}

View File

@@ -149,13 +149,13 @@ void _runService(AQH_OBJECT *aqh, AQH_EVENT_LOOP *eventLoop)
now=time(NULL);
if (_diffInSeconds(now, timeLastConnectionCleanup)>CONNCLEAN_INTERVAL_IN_SECS) {
DBG_ERROR(NULL, "Cleanup connections");
DBG_INFO(NULL, "Cleanup connections");
AQH_NodeServer_CleanupClients(aqh);
timeLastConnectionCleanup=now;
}
if (_diffInSeconds(now, timeLastConnCheck)>CONNCHECK_INTERVAL_IN_SECS) {
DBG_ERROR(NULL, "Check connections");
DBG_INFO(NULL, "Check connections");
AQH_NodeServer_CheckBrokerConnection(aqh);
AQH_NodeServer_CheckTtyConnection(aqh);
timeLastConnCheck=now;

View File

@@ -24,7 +24,7 @@
#include <aqhome/ipc2/ipc_server.h>
#include <aqhome/ipc2/tcpd_object.h>
#include <aqhome/ipc2/tty_endpoint.h>
#include <aqhome/ipc2/ttyobject.h>
#include <aqhome/ipc2/tty_object.h>
#include <aqhome/ipc2/tcp_object.h>
#include <aqhome/ipc2/tcpd_object.h>
#include <aqhome/ipc2/ipc_client.h>
@@ -580,7 +580,7 @@ int _startBroker(AQH_OBJECT *o, AQH_NODE_SERVER *xo)
DBG_ERROR(NULL, "Error connecting to broker: %d", rv);
return (rv<0)?rv:GWEN_ERROR_PERMISSIONS;
}
DBG_ERROR(NULL, "Connected to broker at %s:%d", xo->brokerAddress, xo->brokerPort);
DBG_ERROR(NULL, "Fully connected to broker at %s:%d", xo->brokerAddress, xo->brokerPort);
return 0;
}
else {
@@ -808,7 +808,7 @@ void _handleMsgFromTty(AQH_OBJECT *o, AQH_NODE_SERVER *xo, const AQH_MESSAGE *ms
uint8_t code;
code=AQH_NodeMessage_GetMsgType(msg);
DBG_ERROR(NULL, "Received Node packet %d (%x)", (int) code, code);
DBG_INFO(NULL, "Received Node packet %d (%x)", (int) code, code);
AQH_NodeServer_NodeMsgToDb(o, msg);
_writeTtyMsgToLogFile(xo, msg);
_forwardTtyMsgToBroker(o, xo, msg);
@@ -1117,7 +1117,7 @@ void _handleMsgFromBroker(AQH_OBJECT *o, AQH_OBJECT *ep, const AQH_MESSAGE *msg)
code=AQH_IpcMessage_GetCode(msg);
protoId=AQH_IpcMessage_GetProtoId(msg);
if (protoId==AQH_IPC_PROTOCOL_DATA_ID) {
DBG_ERROR(NULL, "Received IPC packet %d (%x)", (int) code, code);
DBG_INFO(NULL, "Received IPC packet %d (%x)", (int) code, code);
switch(code) {
case AQH_MSGTYPE_IPC_DATA_SETDATA: AQH_NodeServer_HandleSetData(o, ep, msg); break;
default: break;