Digi XBee(R) ANSI C Host Library
zcl_basic_attributes.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 
67 #include "zigbee/zcl_basic.h"
68 
69 #ifndef ZCL_POWER_SOURCE
70  #error You must at least define ZCL_POWER_SOURCE before including this header
71 #endif
72 
74 const struct zcl_basic_dev_info {
75  uint8_t ZCLVersion;
76 #ifdef ZCL_APP_VERSION
77  uint8_t ApplicationVersion;
78 #endif
79 #ifdef ZCL_STACK_VERSION
80  uint8_t StackVersion;
81 #endif
82 #ifdef ZCL_HW_VERSION
83  uint8_t HWVersion;
84 #endif
85  uint8_t PowerSource;
88 #ifdef ZCL_APP_VERSION
89  ZCL_APP_VERSION,
90 #endif
91 #ifdef ZCL_STACK_VERSION
92  ZCL_STACK_VERSION,
93 #endif
94 #ifdef ZCL_HW_VERSION
95  ZCL_HW_VERSION,
96 #endif
97  ZCL_POWER_SOURCE
98 };
99 
101 // note that this list must be kept sorted by attribute ID
103 {
104 // ID, Flags, Type, Address to data, min, max, read, write
106  ZCL_ATTRIB_FLAG_READONLY, // flags
107  ZCL_TYPE_UNSIGNED_8BIT, // type
108  &zcl_basic_dev_info.ZCLVersion, // address to data
109  },
110 #ifdef ZCL_APP_VERSION
113  ZCL_TYPE_UNSIGNED_8BIT,
114  &zcl_basic_dev_info.ApplicationVersion,
115  },
116 #endif
117 #ifdef ZCL_STACK_VERSION_ADDR
120  ZCL_TYPE_UNSIGNED_8BIT,
121  ZCL_STACK_VERSION_ADDR,
122  },
123 #elif defined ZCL_STACK_VERSION
126  ZCL_TYPE_UNSIGNED_8BIT,
127  &zcl_basic_dev_info.StackVersion,
128  },
129 #endif
130 #ifdef ZCL_HW_VERSION
133  ZCL_TYPE_UNSIGNED_8BIT,
134  &zcl_basic_dev_info.HWVersion,
135  },
136 #endif
137 #ifdef ZCL_MANUFACTURER_NAME
141  ZCL_MANUFACTURER_NAME,
142  },
143 #endif
144 #ifdef ZCL_MODEL_IDENTIFIER
148  ZCL_MODEL_IDENTIFIER,
149  },
150 #endif
151 #ifdef ZCL_DATE_CODE
155  ZCL_DATE_CODE,
156  },
157 #endif
160  ZCL_TYPE_ENUM_8BIT,
161  &zcl_basic_dev_info.PowerSource,
162  },
163 
165 };
166 
167 const zcl_attribute_tree_t FAR zcl_basic_attribute_tree[] =
168  { { ZCL_MFG_NONE, zcl_basic_attributes, NULL } };
169 
#define FAR
On platforms with "far" pointers, define to the proper keyword; empty definition if not required...
Definition: platform.h:396
#define ZCL_TYPE_STRING_CHAR
First octet is number of characters in string or 0xff for invalid.
Definition: zcl_types.h:223
#define ZCL_BASIC_ATTR_STACK_VERSION
StackVersion, UINT8, read-only.
Definition: zcl_basic.h:43
#define ZCL_BASIC_ATTR_ZCL_VERSION
ZCLVersion, UINT8, read-only.
Definition: zcl_basic.h:39
#define ZCL_BASIC_ATTR_MODEL_IDENTIFIER
ModelIdentifier, 32-char STRING, read-only.
Definition: zcl_basic.h:49
#define ZCL_BASIC_ATTR_APP_VERSION
ApplicationVersion, UINT8, read-only.
Definition: zcl_basic.h:41
const zcl_attribute_base_t FAR zcl_basic_attributes[]
Table of attributes for the Basic Cluster Server.
Definition: zcl_basic_attributes.h:102
#define ZCL_BASIC_ATTR_POWER_SOURCE
PowerSource, ENUM8, read-only.
Definition: zcl_basic.h:53
Basic structure for storing a list of attributes in a cluster.
Definition: zcl.h:735
#define ZCL_BASIC_ATTR_DATE_CODE
DateCode, 16-char STRING, read-only.
Definition: zcl_basic.h:51
Definition: zcl.h:854
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
#define ZCL_BASIC_ATTR_HW_VERSION
HWVersion, UINT8, read-only.
Definition: zcl_basic.h:45
ZigBee Cluster Library; Basic Cluster (ZCL_CLUSTER_BASIC, 0x0000)
#define ZCL_BASIC_ATTR_MANUFACTURER_NAME
ManufacturerName, 32-char STRING, read-only.
Definition: zcl_basic.h:47
#define ZCL_VERSION
ZCL_VERSION is sent as ZCLVersion attribute.
Definition: zcl_basic.h:71
#define ZCL_ATTRIB_FLAG_READONLY
attribute is read-only
Definition: zcl.h:745
Global used to hold values referenced by zcl_basic_attributes[].
Definition: zcl_basic_attributes.h:74
#define ZCL_ATTRIBUTE_END_OF_LIST
Attribute ID for end of list marker.
Definition: zcl.h:851