13#ifndef PACKET_ZBEE_APS_H
14#define PACKET_ZBEE_APS_H
17#define ZBEE_APS_FCF_FRAME_TYPE 0x03
18#define ZBEE_APS_FCF_DELIVERY_MODE 0x0c
19#define ZBEE_APS_FCF_INDIRECT_MODE 0x10
20#define ZBEE_APS_FCF_ACK_FORMAT 0x10
21#define ZBEE_APS_FCF_SECURITY 0x20
22#define ZBEE_APS_FCF_ACK_REQ 0x40
23#define ZBEE_APS_FCF_EXT_HEADER 0x80
25#define ZBEE_APS_FCF_DATA 0x00
26#define ZBEE_APS_FCF_CMD 0x01
27#define ZBEE_APS_FCF_ACK 0x02
28#define ZBEE_APS_FCF_INTERPAN 0x03
30#define ZBEE_APS_FCF_UNICAST 0x00
31#define ZBEE_APS_FCF_INDIRECT 0x01
32#define ZBEE_APS_FCF_BCAST 0x02
33#define ZBEE_APS_FCF_GROUP 0x03
35#define ZBEE_APS_EXT_FCF_FRAGMENT 0x03
36#define ZBEE_APS_EXT_FCF_FRAGMENT_NONE 0x00
37#define ZBEE_APS_EXT_FCF_FRAGMENT_FIRST 0x01
38#define ZBEE_APS_EXT_FCF_FRAGMENT_MIDDLE 0x02
40#define ZBEE_APS_CMD_SKKE1 0x01
41#define ZBEE_APS_CMD_SKKE2 0x02
42#define ZBEE_APS_CMD_SKKE3 0x03
43#define ZBEE_APS_CMD_SKKE4 0x04
44#define ZBEE_APS_CMD_TRANSPORT_KEY 0x05
45#define ZBEE_APS_CMD_UPDATE_DEVICE 0x06
46#define ZBEE_APS_CMD_REMOVE_DEVICE 0x07
47#define ZBEE_APS_CMD_REQUEST_KEY 0x08
48#define ZBEE_APS_CMD_SWITCH_KEY 0x09
49#define ZBEE_APS_CMD_EA_INIT_CHLNG 0x0a
50#define ZBEE_APS_CMD_EA_RESP_CHLNG 0x0b
51#define ZBEE_APS_CMD_EA_INIT_MAC_DATA 0x0c
52#define ZBEE_APS_CMD_EA_RESP_MAC_DATA 0x0d
53#define ZBEE_APS_CMD_TUNNEL 0x0e
54#define ZBEE_APS_CMD_VERIFY_KEY 0x0f
55#define ZBEE_APS_CMD_CONFIRM_KEY 0x10
56#define ZBEE_APS_CMD_RELAY_MSG_DOWNSTREAM 0x11
57#define ZBEE_APS_CMD_RELAY_MSG_UPSTREAM 0x12
59#define ZBEE_APS_CMD_KEY_TC_MASTER 0x00
60#define ZBEE_APS_CMD_KEY_STANDARD_NWK 0x01
61#define ZBEE_APS_CMD_KEY_APP_MASTER 0x02
62#define ZBEE_APS_CMD_KEY_APP_LINK 0x03
63#define ZBEE_APS_CMD_KEY_TC_LINK 0x04
64#define ZBEE_APS_CMD_KEY_HIGH_SEC_NWK 0x05
66#define ZBEE_APS_CMD_SKKE_DATA_LENGTH 16
67#define ZBEE_APS_CMD_KEY_LENGTH 16
69#define ZBEE_APS_CMD_REQ_NWK_KEY 0x01
70#define ZBEE_APS_CMD_REQ_APP_KEY 0x02
72#define ZBEE_APS_CMD_UPDATE_STANDARD_SEC_REJOIN 0x00
73#define ZBEE_APS_CMD_UPDATE_STANDARD_UNSEC_JOIN 0x01
74#define ZBEE_APS_CMD_UPDATE_LEAVE 0x02
75#define ZBEE_APS_CMD_UPDATE_STANDARD_UNSEC_REJOIN 0x03
76#define ZBEE_APS_CMD_UPDATE_HIGH_SEC_REJOIN 0x04
77#define ZBEE_APS_CMD_UPDATE_HIGH_UNSEC_JOIN 0x05
78#define ZBEE_APS_CMD_UPDATE_HIGH_UNSEC_REJOIN 0x07
80#define ZBEE_APS_CMD_EA_KEY_NWK 0x00
81#define ZBEE_APS_CMD_EA_KEY_LINK 0x01
82#define ZBEE_APS_CMD_EA_CHALLENGE_LENGTH 16
83#define ZBEE_APS_CMD_EA_MAC_LENGTH 16
84#define ZBEE_APS_CMD_EA_DATA_LENGTH 4
87#define ZBEE_APP_TYPE 0xF0
88#define ZBEE_APP_COUNT 0x0F
90#define ZBEE_APP_TYPE_KVP 0x01
91#define ZBEE_APP_TYPE_MSG 0x02
93#define ZBEE_APP_KVP_CMD 0x0F
94#define ZBEE_APP_KVP_TYPE 0xF0
96#define ZBEE_APP_KVP_SET 0x01
97#define ZBEE_APP_KVP_EVENT 0x02
98#define ZBEE_APP_KVP_GET_ACK 0x04
99#define ZBEE_APP_KVP_SET_ACK 0x05
100#define ZBEE_APP_KVP_EVENT_ACK 0x06
101#define ZBEE_APP_KVP_GET_RESP 0x08
102#define ZBEE_APP_KVP_SET_RESP 0x09
103#define ZBEE_APP_KVP_EVENT_RESP 0x0A
105#define ZBEE_APP_KVP_NO_DATA 0x00
106#define ZBEE_APP_KVP_UINT8 0x01
107#define ZBEE_APP_KVP_INT8 0x02
108#define ZBEE_APP_KVP_UINT16 0x03
109#define ZBEE_APP_KVP_INT16 0x04
110#define ZBEE_APP_KVP_FLOAT16 0x0B
111#define ZBEE_APP_KVP_ABS_TIME 0x0C
112#define ZBEE_APP_KVP_REL_TIME 0x0D
113#define ZBEE_APP_KVP_CHAR_STRING 0x0E
114#define ZBEE_APP_KVP_OCT_STRING 0x0F
116#define ZBEE_APP_KVP_OVERHEAD 4
119#define ZBEE_ZCL_CID_BASIC 0x0000
120#define ZBEE_ZCL_CID_POWER_CONFIG 0x0001
121#define ZBEE_ZCL_CID_DEVICE_TEMP_CONFIG 0x0002
122#define ZBEE_ZCL_CID_IDENTIFY 0x0003
123#define ZBEE_ZCL_CID_GROUPS 0x0004
124#define ZBEE_ZCL_CID_SCENES 0x0005
125#define ZBEE_ZCL_CID_ON_OFF 0x0006
126#define ZBEE_ZCL_CID_ON_OFF_SWITCH_CONFIG 0x0007
127#define ZBEE_ZCL_CID_LEVEL_CONTROL 0x0008
128#define ZBEE_ZCL_CID_ALARMS 0x0009
129#define ZBEE_ZCL_CID_TIME 0x000a
130#define ZBEE_ZCL_CID_RSSI_LOCATION 0x000b
131#define ZBEE_ZCL_CID_ANALOG_INPUT_BASIC 0x000c
132#define ZBEE_ZCL_CID_ANALOG_OUTPUT_BASIC 0x000d
133#define ZBEE_ZCL_CID_ANALOG_VALUE_BASIC 0x000e
134#define ZBEE_ZCL_CID_BINARY_INPUT_BASIC 0x000f
135#define ZBEE_ZCL_CID_BINARY_OUTPUT_BASIC 0x0010
136#define ZBEE_ZCL_CID_BINARY_VALUE_BASIC 0x0011
137#define ZBEE_ZCL_CID_MULTISTATE_INPUT_BASIC 0x0012
138#define ZBEE_ZCL_CID_MULTISTATE_OUTPUT_BASIC 0x0013
139#define ZBEE_ZCL_CID_MULTISTATE_VALUE_BASIC 0x0014
140#define ZBEE_ZCL_CID_COMMISSIONING 0x0015
141#define ZBEE_ZCL_CID_PARTITION 0x0016
142#define ZBEE_ZCL_CID_OTA_UPGRADE 0x0019
143#define ZBEE_ZCL_CID_POLL_CONTROL 0x0020
144#define ZBEE_ZCL_CID_GP 0x0021
146#define ZBEE_ZCL_CID_POWER_PROFILE 0x001a
147#define ZBEE_ZCL_CID_APPLIANCE_CONTROL 0x001b
150#define ZBEE_ZCL_CID_SHADE_CONFIG 0x0100
151#define ZBEE_ZCL_CID_DOOR_LOCK 0X0101
152#define ZBEE_ZCL_CID_WINDOW_COVERING 0X0102
155#define ZBEE_ZCL_CID_PUMP_CONFIG_CONTROL 0x0200
156#define ZBEE_ZCL_CID_THERMOSTAT 0x0201
157#define ZBEE_ZCL_CID_FAN_CONTROL 0x0202
158#define ZBEE_ZCL_CID_DEHUMIDIFICATION_CONTROL 0x0203
159#define ZBEE_ZCL_CID_THERMOSTAT_UI_CONFIG 0x0204
162#define ZBEE_ZCL_CID_COLOR_CONTROL 0x0300
163#define ZBEE_ZCL_CID_BALLAST_CONFIG 0x0301
166#define ZBEE_ZCL_CID_ILLUMINANCE_MEASUREMENT 0x0400
167#define ZBEE_ZCL_CID_ILLUMINANCE_LEVEL_SENSING 0x0401
168#define ZBEE_ZCL_CID_TEMPERATURE_MEASUREMENT 0x0402
169#define ZBEE_ZCL_CID_PRESSURE_MEASUREMENT 0x0403
170#define ZBEE_ZCL_CID_FLOW_MEASUREMENT 0x0404
171#define ZBEE_ZCL_CID_REL_HUMIDITY_MEASUREMENT 0x0405
172#define ZBEE_ZCL_CID_OCCUPANCY_SENSING 0x0406
173#define ZBEE_ZCL_CID_ELECTRICAL_MEASUREMENT 0x0b04
176#define ZBEE_ZCL_CID_IAS_ZONE 0x0500
177#define ZBEE_ZCL_CID_IAS_ACE 0x0501
178#define ZBEE_ZCL_CID_IAS_WD 0x0502
181#define ZBEE_ZCL_CID_GENERIC_TUNNEL 0x0600
182#define ZBEE_ZCL_CID_BACNET_PROTOCOL_TUNNEL 0x0601
183#define ZBEE_ZCL_CID_BACNET_ANALOG_INPUT_REG 0x0602
184#define ZBEE_ZCL_CID_BACNET_ANALOG_INPUT_EXT 0x0603
185#define ZBEE_ZCL_CID_BACNET_ANALOG_OUTPUT_REG 0x0604
186#define ZBEE_ZCL_CID_BACNET_ANALOG_OUTPUT_EXT 0x0605
187#define ZBEE_ZCL_CID_BACNET_ANALOG_VALUE_REG 0x0606
188#define ZBEE_ZCL_CID_BACNET_ANALOG_VALUE_EXT 0x0607
189#define ZBEE_ZCL_CID_BACNET_BINARY_INPUT_REG 0x0608
190#define ZBEE_ZCL_CID_BACNET_BINARY_INPUT_EXT 0x0609
191#define ZBEE_ZCL_CID_BACNET_BINARY_OUTPUT_REG 0x060a
192#define ZBEE_ZCL_CID_BACNET_BINARY_OUTPUT_EXT 0x060b
193#define ZBEE_ZCL_CID_BACNET_BINARY_VALUE_REG 0x060c
194#define ZBEE_ZCL_CID_BACNET_BINARY_VALUE_EXT 0x060d
195#define ZBEE_ZCL_CID_BACNET_MULTISTATE_INPUT_REG 0x060e
196#define ZBEE_ZCL_CID_BACNET_MULTISTATE_INPUT_EXT 0x060f
197#define ZBEE_ZCL_CID_BACNET_MULTISTATE_OUTPUT_REG 0x0610
198#define ZBEE_ZCL_CID_BACNET_MULTISTATE_OUTPUT_EXT 0x0611
199#define ZBEE_ZCL_CID_BACNET_MULTISTATE_VALUE_REG 0x0612
200#define ZBEE_ZCL_CID_BACNET_MULTISTATE_VALUE_EXT 0x0613
203#define ZBEE_ZCL_CID_KEEP_ALIVE 0x0025
204#define ZBEE_ZCL_CID_PRICE 0x0700
205#define ZBEE_ZCL_CID_DEMAND_RESPONSE_LOAD_CONTROL 0x0701
206#define ZBEE_ZCL_CID_SIMPLE_METERING 0x0702
207#define ZBEE_ZCL_CID_MESSAGE 0x0703
208#define ZBEE_ZCL_CID_TUNNELING 0x0704
209#define ZBEE_ZCL_CID_PRE_PAYMENT 0x0705
210#define ZBEE_ZCL_CID_ENERGY_MANAGEMENT 0x0706
211#define ZBEE_ZCL_CID_CALENDAR 0x0707
212#define ZBEE_ZCL_CID_DEVICE_MANAGEMENT 0x0708
213#define ZBEE_ZCL_CID_EVENTS 0x0709
214#define ZBEE_ZCL_CID_MDU_PAIRING 0x070A
215#define ZBEE_ZCL_CID_SUB_GHZ 0x070B
216#define ZBEE_ZCL_CID_DAILY_SCHEDULE 0x070D
219#define ZBEE_ZCL_CID_KE 0x0800
222#define ZBEE_ZCL_CID_APPLIANCE_IDENTIFICATION 0x0b00
223#define ZBEE_ZCL_CID_METER_IDENTIFICATION 0x0b01
224#define ZBEE_ZCL_CID_APPLIANCE_EVENTS_AND_ALERT 0x0b02
225#define ZBEE_ZCL_CID_APPLIANCE_STATISTICS 0x0b03
227#define ZBEE_ZCL_CID_ZLL 0x1000
229#define ZBEE_ZCL_CID_MANUFACTURER_SPECIFIC_MIN 0xFC00
230#define ZBEE_ZCL_CID_MANUFACTURER_SPECIFIC_MAX 0xFFFF
233#define ZBEE_APS_T2_CID_TCP 0x0001
234#define ZBEE_APS_T2_CID_RESPC 0x0002
235#define ZBEE_APS_T2_CID_RETPC 0x0003
236#define ZBEE_APS_T2_CID_PCR 0x0004
237#define ZBEE_APS_T2_CID_BTREQ 0x001c
238#define ZBEE_APS_T2_CID_BTGREQ 0x001d
239#define ZBEE_APS_T2_CID_BTRES 0x0054
240#define ZBEE_APS_T2_CID_BTRES_S_SBT 0x00
241#define ZBEE_APS_T2_CID_BTRES_S_TFOFA 0x01
242#define ZBEE_APS_T2_CID_BTGRES 0x0055
243#define ZBEE_APS_T2_CID_RDREQ 0x1000
244#define ZBEE_APS_T2_CID_RDRES 0x1001
245#define ZBEE_APS_T2_CID_FREQ 0xa0a8
246#define ZBEE_APS_T2_CID_FRES 0xe000
247#define ZBEE_APS_T2_CID_FNDR 0xe001
248#define ZBEE_APS_T2_CID_BR 0xf000
249#define ZBEE_APS_T2_CID_BTADR 0xf001
250#define ZBEE_APS_T2_CID_BTARXOWIDR 0xf00a
251#define ZBEE_APS_T2_CID_BTARACR 0xf00e
254#define ZBEE_APP_STATUS_SUCCESS 0x00
255#define ZBEE_APP_STATUS_ASDU_TOO_LONG 0xa0
256#define ZBEE_APP_STATUS_DEFRAG_DEFERRED 0xa1
257#define ZBEE_APP_STATUS_DEFRAG_UNSUPPORTED 0xa2
258#define ZBEE_APP_STATUS_ILLEGAL_REQUEST 0xa3
259#define ZBEE_APP_STATUS_INVALID_BINDING 0xa4
260#define ZBEE_APP_STATUS_INVALID_GROUP 0xa5
261#define ZBEE_APP_STATUS_INVALID_PARAMETER 0xa6
262#define ZBEE_APP_STATUS_NO_ACK 0xa7
263#define ZBEE_APP_STATUS_NO_BOUND_DEVICE 0xa8
264#define ZBEE_APP_STATUS_NO_SHORT_ADDRESS 0xa9
265#define ZBEE_APP_STATUS_NOT_SUPPORTED 0xaa
266#define ZBEE_APP_STATUS_SECURED_LINK_KEY 0xab
267#define ZBEE_APP_STATUS_SECURED_NWK_KEY 0xac
268#define ZBEE_APP_STATUS_SECURITY_FAIL 0xad
269#define ZBEE_APP_STATUS_TABLE_FULL 0xae
270#define ZBEE_APP_STATUS_UNSECURED 0xaf
271#define ZBEE_APP_STATUS_UNSUPPORTED_ATTRIBUTE 0xb0
273#define ZBEE_APS_NODE_PROTO_DATA 0
292 uint8_t fragmentation;
293 uint8_t block_number;
296 bool profile_present;
304 uint32_t extended_counter;
312 uint32_t extended_counter;
318extern int gPREF_zbee_se_protocol_version;
321 ZBEE_SE_VERSION_1_1B,
323 ZBEE_SE_VERSION_1_2A,
324 ZBEE_SE_VERSION_1_2B,
Definition value_string.h:292
Definition packet-epl.h:22
Definition packet-zbee-aps.h:303
Definition packet-zbee-aps.h:311
Definition packet-zbee-aps.h:276