add dataclient sublib to be used by multiple tools.
This commit is contained in:
45
aqhome/dataclient/client.h
Normal file
45
aqhome/dataclient/client.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2025 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_CLIENT_H
|
||||
#define AQHOME_DATA_CLIENT_H
|
||||
|
||||
#include <aqhome/api.h>
|
||||
#include <aqhome/events2/object.h>
|
||||
#include <aqhome/data/value.h>
|
||||
#include <aqhome/data/device.h>
|
||||
|
||||
|
||||
|
||||
AQHOME_API AQH_OBJECT *AQH_DataClient_new(AQH_EVENT_LOOP *eventLoop, uint8_t protoId, uint8_t protoVer);
|
||||
|
||||
AQHOME_API void AQH_DataClient_SetTimeout(AQH_OBJECT *o, int i);
|
||||
|
||||
|
||||
AQHOME_API int AQH_DataClient_Connect(AQH_OBJECT *o,
|
||||
const char *addr, int port,
|
||||
const char *userId, const char *passwd,
|
||||
const char *clientId,
|
||||
uint32_t flags);
|
||||
AQHOME_API int AQH_DataClient_Disconnect(AQH_OBJECT *o);
|
||||
|
||||
|
||||
AQHOME_API AQH_DEVICE_LIST *AQH_DataClient_GetDevices(AQH_OBJECT *o);
|
||||
AQHOME_API AQH_VALUE_LIST *AQH_DataClient_GetValues(AQH_OBJECT *o, const char *deviceName, int modality);
|
||||
|
||||
AQHOME_API uint64_t AQH_DataClient_GetFirstData(AQH_OBJECT *o, const char *valueName, uint64_t *dataPtr, uint64_t maxNum);
|
||||
AQHOME_API uint64_t AQH_DataClient_GetLastData(AQH_OBJECT *o, const char *valueName, uint64_t *dataPtr, uint64_t maxNum);
|
||||
AQHOME_API uint64_t AQH_DataClient_GetPeriodData(AQH_OBJECT *o, const char *valueName,
|
||||
uint64_t *dataPtr, uint64_t maxNum,
|
||||
uint64_t tsBegin, uint64_t tsEnd);
|
||||
|
||||
AQHOME_API int AQH_DataClient_SetData(AQH_OBJECT *o, const AQH_VALUE *v, const char *data);
|
||||
AQHOME_API int AQH_DataClient_UpdateData(AQH_OBJECT *o, const AQH_VALUE *v, uint64_t timeStamp, double dataPoint);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user