-
Notifications
You must be signed in to change notification settings - Fork 5
/
gzw_notification.h
78 lines (70 loc) · 2.52 KB
/
gzw_notification.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef GOOPENZWAVE_NOTIFICATION
#define GOOPENZWAVE_NOTIFICATION
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "gzw_valueid.h"
#ifdef __cplusplus
extern "C" {
#endif
// Types.
typedef void* notification_t;
// enum notification_type
typedef enum {
notification_type_valueAdded = 0,
notification_type_valueRemoved,
notification_type_valueChanged,
notification_type_valueRefreshed,
notification_type_group,
notification_type_nodeNew,
notification_type_nodeAdded,
notification_type_nodeRemoved,
notification_type_nodeProtocolInfo,
notification_type_nodeNaming,
notification_type_nodeEvent,
notification_type_pollingDisabled,
notification_type_pollingEnabled,
notification_type_sceneEvent,
notification_type_createButton,
notification_type_deleteButton,
notification_type_buttonOn,
notification_type_buttonOff,
notification_type_driverReady,
notification_type_driverFailed,
notification_type_driverReset,
notification_type_essentialNodeQueriesComplete,
notification_type_nodeQueriesComplete,
notification_type_awakeNodesQueried,
notification_type_allNodesQueriedSomeDead,
notification_type_allNodesQueried,
notification_type_notification,
notification_type_driverRemoved,
notification_type_controllerCommand,
notification_type_nodeReset
} notification_type;
// enum notification_code
typedef enum {
notification_code_msgComplete = 0,
notification_code_timeout,
notification_code_noOperation,
notification_code_awake,
notification_code_sleep,
notification_code_dead,
notification_code_alive
} notification_code;
// Public member functions.
notification_type notification_getType(notification_t n);
uint32_t notification_getHomeId(notification_t n);
uint8_t notification_getNodeId(notification_t n);
valueid_t notification_getValueId(notification_t n);
uint8_t notification_getGroupIdx(notification_t n);
uint8_t notification_getEvent(notification_t n);
uint8_t notification_getButtonId(notification_t n);
uint8_t notification_getSceneId(notification_t n);
uint8_t notification_getNotification(notification_t n);
uint8_t notification_getByte(notification_t n);
char* notification_getAsString(notification_t n);
#ifdef __cplusplus
}
#endif
#endif // define GOOPENZWAVE_NOTIFICATION