Added Haltest for zigbee-manager
[platform/core/connectivity/zigbee-manager.git] / haltest / zbl.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef __ZIGBEE_MANAGER_H__
17 #define __ZIGBEE_MANAGER_H__
18
19 #include <glib.h>
20 #include <gio/gio.h>
21
22 #include "gdbus.h"
23 #include "common.h"
24
25 #define MAX_ENDPOINT_CLUSTERS 32
26 #define ZB_802_15_4_CHANNELS_MASK 0x07FFF800UL
27
28 typedef unsigned char ieee_addr[8];
29 typedef unsigned short nwk_addr;
30 typedef unsigned char aes128_key[16];
31
32 typedef enum {
33         ZB_ZDP_ALTERNATIVE_PAN_COORDINATOR = (1 << 0),
34         ZB_ZDP_DEVICE_TYPE = (1 << 1),
35         ZB_ZDP_POWER_SOURCE = (1 << 2),
36         ZB_ZDP_RECEIVER_ON_WHEN_IDLE = (1 << 3),
37         ZB_ZDP_SECURITY_CAPABILITY = (1 << 6),
38         ZB_ZDP_ALLOCATE_ADDRESS = (1 << 7),
39 } zb_zdo_mac_capability_field_e;
40
41 typedef enum {
42         ZB_APS_NO_ACK_REQUEST = (0 << 6),
43         ZB_APS_ACK_REQUEST = (1 << 6),
44 } zb_aps_ack_request_e;
45
46 typedef enum {
47         ZB_APS_DELIVERY_UNICAST = 0,
48         ZB_APS_DELIVERY_INDIRECT = 1,
49         ZB_APS_DELIVERY_BROADCAST = 2,
50         ZB_APS_DELIVERY_MULTICAST = 3,
51 } zb_aps_delivery_mode_e;
52
53 typedef enum {
54         ZB_ZCL_FC_GLOBALLY_USED = (0 << 0),
55         ZB_APS_FC_CLUSTER_SPECIFIC = (1 << 0),
56 } zb_zcl_fc_type_e;
57
58 typedef enum {
59         ZB_ZCL_CLIENT_TO_SERVER = (0 << 3),
60         ZB_ZCL_SERVER_TO_CLIENT = (1 << 3),
61 } zb_zcl_fc_direction_e;
62
63 typedef enum {
64         ZB_ZCL_LEAVE_WELL_ALONE = (0 << 4),
65         ZB_ZCL_DISABLE_DEFAULT_RESPONSE = (1 << 4),
66 } zb_zcl_fc_disable_default_response_e;
67
68 typedef enum {
69         ZB_ZCL_FC_NOT_MANUFACTURER = (0 << 2),
70         ZB_ZCL_FC_MANUFACTURER = (1 << 2),
71 } zb_zcl_fc_manufacturer_present_e;
72
73 class Zigbee:public GDbus {
74         private:
75         public:
76                 Zigbee();
77                 ~Zigbee();
78                 int zbl_enable(void);
79                 int zbl_disable(void);
80 };
81 #endif /* __ZIGBEE_MANAGER_H__ */