Digi XBee(R) ANSI C Host Library
zcl_basic.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2012 Digi International Inc.,
3  * All rights not expressly granted are reserved.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
7  * You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
10  * =======================================================================
11  */
12 
28 #ifndef __XBEE_ZCL_BASIC_H
29 #define __XBEE_ZCL_BASIC_H
30 
31 #include "zigbee/zcl.h"
32 
34 
39 #define ZCL_BASIC_ATTR_ZCL_VERSION 0x0000
40 #define ZCL_BASIC_ATTR_APP_VERSION 0x0001
42 #define ZCL_BASIC_ATTR_STACK_VERSION 0x0002
44 #define ZCL_BASIC_ATTR_HW_VERSION 0x0003
46 #define ZCL_BASIC_ATTR_MANUFACTURER_NAME 0x0004
48 #define ZCL_BASIC_ATTR_MODEL_IDENTIFIER 0x0005
50 #define ZCL_BASIC_ATTR_DATE_CODE 0x0006
52 #define ZCL_BASIC_ATTR_POWER_SOURCE 0x0007
54 
56 #define ZCL_BASIC_ATTR_LOCATION_DESC 0x0010
57 #define ZCL_BASIC_ATTR_PHYSICAL_ENV 0x0011
59 #define ZCL_BASIC_ATTR_DEVICE_ENABLED 0x0012
61 #define ZCL_BASIC_ATTR_ALARM_MASK 0x0013
63 
71 #define ZCL_VERSION 0x01
72 
78 #define ZCL_BASIC_PS_UNKNOWN 0x00
79 #define ZCL_BASIC_PS_SINGLE_PHASE 0x01
81 #define ZCL_BASIC_PS_THREE_PHASE 0x02
83 #define ZCL_BASIC_PS_BATTERY 0x03
85 #define ZCL_BASIC_PS_DC 0x04
87 #define ZCL_BASIC_PS_EMERGENCY_CONST 0x05
89 #define ZCL_BASIC_PS_EMERGENCY_SWITCH 0x06
91  // 0x07 to 0x7F are reserved
94 
96 #define ZCL_BASIC_PS_BATTERY_BACKUP 0x80
97 
99 #define ZCL_BASIC_CMD_FACTORY_DEFAULTS 0x00
100 
101 int _zcl_basic_server( const wpan_envelope_t FAR *envelope,
102  void FAR *context);
103 
113 #ifdef ZCL_FACTORY_RESET_FN
114  #define ZCL_CLUST_ENTRY_BASIC_SERVER \
115  { ZCL_CLUST_BASIC, \
116  &_zcl_basic_server, \
117  zcl_basic_attribute_tree, \
118  WPAN_CLUST_FLAG_SERVER }
119 #else
120  #define ZCL_CLUST_ENTRY_BASIC_SERVER \
121  { ZCL_CLUST_BASIC, \
122  &zcl_general_command, \
123  zcl_basic_attribute_tree, \
124  WPAN_CLUST_FLAG_SERVER }
125 #endif
126 
128 
129 #endif // __XBEE_ZCL_BASIC_H
130 
#define FAR
On platforms with "far" pointers, define to the proper keyword; empty definition if not required...
Definition: platform.h:396
int _zcl_basic_server(const wpan_envelope_t FAR *envelope, void FAR *context)
Handles commands for the Basic Server Cluster.
Definition: zcl_basic.c:50
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
Header for implementation of ZigBee Cluster Library.
#define XBEE_END_DECLS
Macro defined to.
Definition: platform.h:42
The "envelope" is used to gather all necessary information about a given frame on the network...
Definition: aps.h:40