forked from dresden-elektronik/deconz-rest-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
device_access_fn.h
42 lines (34 loc) · 1.28 KB
/
device_access_fn.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
/*
* Copyright (c) 2021 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#ifndef DEVICE_ACCESS_FN_H
#define DEVICE_ACCESS_FN_H
#include <QString>
#include <QVariant>
#include <vector>
class Resource;
class ResourceItem;
namespace deCONZ {
class ApsController;
class ApsDataIndication;
class ZclFrame;
}
struct DA_ReadResult
{
bool isEnqueued = false;
quint8 apsReqId = 0;
quint8 sequenceNumber = 0;
};
typedef bool (*ParseFunction_t)(Resource *r, ResourceItem *item, const deCONZ::ApsDataIndication &ind, const deCONZ::ZclFrame &zclFrame, const QVariant &parseParameters);
typedef DA_ReadResult (*ReadFunction_t)(const Resource *r, const ResourceItem *item, deCONZ::ApsController *apsCtrl, const QVariant &readParameters);
typedef bool (*WriteFunction_t)(const Resource *r, const ResourceItem *item, deCONZ::ApsController *apsCtrl, const QVariant &writeParameters);
ParseFunction_t DA_GetParseFunction(const QVariant ¶ms);
ReadFunction_t DA_GetReadFunction(const QVariant ¶ms);
WriteFunction_t DA_GetWriteFunction(const QVariant ¶ms);
#endif // DEVICE_ACCESS_FN_H