#include <zblib_service_interface.h>
#include <zblib_driver.h>
-#include <zblib_driver_alarm.h>
#include <zblib_driver_custom.h>
-#include <zblib_driver_door_lock.h>
-#include <zblib_driver_fan_control.h>
-#include <zblib_driver_level_control.h>
#include <zblib_driver_mfglib_control.h>
-#include <zblib_driver_on_off.h>
#include <zblib_driver_service.h>
-#include <zblib_driver_thermostat.h>
-#include <zblib_driver_zclbasic_control.h>
-#include <zblib_driver_zclglobal_control.h>
-#include <zblib_driver_zclias_control.h>
-#include <zblib_driver_zclidentify_control.h>
-#include <zblib_driver_zcl_color.h>
+#include <zblib_driver_zcl_alarm.h>
+#include <zblib_driver_zcl_basic.h>
+#include <zblib_driver_zcl_color_control.h>
+#include <zblib_driver_zcl_door_lock.h>
+#include <zblib_driver_zcl_fan_control.h>
+#include <zblib_driver_zcl_global_control.h>
#include <zblib_driver_zcl_group.h>
+#include <zblib_driver_zcl_ias_zone.h>
+#include <zblib_driver_zcl_identify.h>
+#include <zblib_driver_zcl_level_control.h>
+#include <zblib_driver_zcl_on_off.h>
#include <zblib_driver_zcl_poll_control.h>
#include <zblib_driver_zcl_scene.h>
-#include <zblib_driver_zdodev_control.h>
+#include <zblib_driver_zcl_thermostat.h>
#include <zblib_driver_zdo_bind.h>
+#include <zblib_driver_zdo_dev_control.h>
/**< ZigBee Request object */
struct zblib_request_type {
{
ZblibDriverType_e driver_type;
- driver_type = ((request_type && 0xFF000000) >> 24);
+ driver_type = ((request_type & 0xFF000000) >> 24);
return driver_type;
}
{
guint ops_id;
- ops_id = (request_type && 0x000000FF);
+ ops_id = (request_type & 0x000000FF);
return ops_id;
}
/* Look-up requets_id in request hash table */
request = (ZigBeeRequest *)g_hash_table_lookup(request_table, (gconstpointer)request_id);
if (NULL == request_table) {
- Z_LOGE("No request availabel for request_id: [%d]", request_id);
+ Z_LOGE("No request available for request_id: [%d]", request_id);
return NULL;
}
return request;
}
-static gpointer __zblib_request_create_alarm_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_alarm_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer alarm_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ALARM_OPS_GET_ALARM_COUNT: {
- ZigbeeAlarmGetAlarmCount_t *in_req;
- ZigbeeAlarmGetAlarmCount_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_GET_ALARM_COUNT: {
+ ZigbeeZclAlarmGetAlarmCount_t *in_req;
+ ZigbeeZclAlarmGetAlarmCount_t *req = NULL;
- in_req = (ZigbeeAlarmGetAlarmCount_t *)request_data;
+ in_req = (ZigbeeZclAlarmGetAlarmCount_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeAlarmGetAlarmCount_t *)
- g_malloc0(sizeof(ZigbeeAlarmGetAlarmCount_t));
+ req = (ZigbeeZclAlarmGetAlarmCount_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmGetAlarmCount_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALARM: {
- ZigbeeAlarmResetAlarm_t *in_req;
- ZigbeeAlarmResetAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALARM: {
+ ZigbeeZclAlarmResetAlarm_t *in_req;
+ ZigbeeZclAlarmResetAlarm_t *req = NULL;
- in_req = (ZigbeeAlarmResetAlarm_t *)request_data;
+ in_req = (ZigbeeZclAlarmResetAlarm_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeAlarmResetAlarm_t *)
- g_malloc0(sizeof(ZigbeeAlarmResetAlarm_t));
+ req = (ZigbeeZclAlarmResetAlarm_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmResetAlarm_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALL_ALARM: {
- ZigbeeAlarmResetAllAlarm_t *in_req;
- ZigbeeAlarmResetAllAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALL_ALARM: {
+ ZigbeeZclAlarmResetAllAlarm_t *in_req;
+ ZigbeeZclAlarmResetAllAlarm_t *req = NULL;
- in_req = (ZigbeeAlarmResetAllAlarm_t *)request_data;
+ in_req = (ZigbeeZclAlarmResetAllAlarm_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeAlarmResetAllAlarm_t *)
- g_malloc0(sizeof(ZigbeeAlarmResetAllAlarm_t));
+ req = (ZigbeeZclAlarmResetAllAlarm_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmResetAllAlarm_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ALARM_OPS_ALARM: {
- ZigbeeAlarmAlarm_t *in_req;
- ZigbeeAlarmAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_ALARM: {
+ ZigbeeZclAlarmAlarm_t *in_req;
+ ZigbeeZclAlarmAlarm_t *req = NULL;
- in_req = (ZigbeeAlarmAlarm_t *)request_data;
+ in_req = (ZigbeeZclAlarmAlarm_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeAlarmAlarm_t *)
- g_malloc0(sizeof(ZigbeeAlarmAlarm_t));
+ req = (ZigbeeZclAlarmAlarm_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmAlarm_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
- req->node_id = in_req->node_id;
req->endpoint = in_req->endpoint;
req->alarm_code = in_req->alarm_code;
req->cluster_id = in_req->cluster_id;
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALARM_LOG: {
- ZigbeeAlarmResetAlarmLogs_t *in_req;
- ZigbeeAlarmResetAlarmLogs_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALARM_LOG: {
+ ZigbeeZclAlarmResetAlarmLogs_t *in_req;
+ ZigbeeZclAlarmResetAlarmLogs_t *req = NULL;
- in_req = (ZigbeeAlarmResetAlarmLogs_t *)request_data;
+ in_req = (ZigbeeZclAlarmResetAlarmLogs_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeAlarmResetAlarmLogs_t *)
- g_malloc0(sizeof(ZigbeeAlarmResetAlarmLogs_t));
+ req = (ZigbeeZclAlarmResetAlarmLogs_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmResetAlarmLogs_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ALARM_OPS_GET_ALARM: {
- alarm_request_data = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_GET_ALARM: {
+ ZigbeeZclAlarmGetAlarm_t *in_req;
+ ZigbeeZclAlarmGetAlarm_t *req = NULL;
+
+ in_req = (ZigbeeZclAlarmGetAlarm_t *)request_data;
+ if (in_req) {
+ /* Allocate memory */
+ req = (ZigbeeZclAlarmGetAlarm_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmGetAlarm_t));
+
+ /* Copy data */
+ req->node_id = in_req->node_id;
+ req->endpoint = in_req->endpoint;
+ }
+
+ alarm_request_data = (gpointer)req;
}
break;
/* Copy data */
req->node_id = in_req->node_id;
- req->aps_frame_ctl = in_req->aps_frame_ctl;
+ req->aps_frame_ctrl = in_req->aps_frame_ctrl;
req->src_ep = in_req->src_ep;
req->dest_ep = in_req->dest_ep;
req->cluster_id = in_req->cluster_id;
req->profile_id = in_req->profile_id;
- req->zcl_frame_ctl = in_req->zcl_frame_ctl;
+ req->zcl_frame_ctrl = in_req->zcl_frame_ctrl;
req->mfg_code = in_req->mfg_code;
memcpy(req->payload,
in_req->payload, ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN);
req->src_ep = in_req->src_ep;
req->dest_ep = in_req->dest_ep;
req->cluster_id = in_req->cluster_id;
- req->zcl_frame_ctl = in_req->zcl_frame_ctl;
+ req->zcl_frame_ctrl = in_req->zcl_frame_ctrl;
req->cmd_id = in_req->cmd_id;
memcpy(req->payload,
in_req->payload, ZIGBEE_CUSTOM_SEND_PAYLOAD_LEN);
return custom_request_data;
}
-static gpointer __zblib_request_create_door_lock_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_door_lock_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer door_lock_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_DOOR_LOCK_OPS_SUBSCRIBE_LOCK_EVENT: {
- ZigbeeDoorLockSubscriberLockEvent_t *in_req;
- ZigbeeDoorLockSubscriberLockEvent_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SUBSCRIBE_LOCK_EVENT: {
+ ZigbeeZclDoorLockSubscriberLockEvent_t *in_req;
+ ZigbeeZclDoorLockSubscriberLockEvent_t *req = NULL;
- in_req = (ZigbeeDoorLockSubscriberLockEvent_t *)request_data;
+ in_req = (ZigbeeZclDoorLockSubscriberLockEvent_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeDoorLockSubscriberLockEvent_t *)
- g_malloc0(sizeof(ZigbeeDoorLockSubscriberLockEvent_t));
+ req = (ZigbeeZclDoorLockSubscriberLockEvent_t *)
+ g_malloc0(sizeof(ZigbeeZclDoorLockSubscriberLockEvent_t));
/* Copy data */
memcpy(req->eui64,
}
break;
- case ZBLIB_DOOR_LOCK_OPS_SET_DOOR_LOCK_PIN: {
- ZigbeeDoorLockSetDoorLockPin_t *in_req;
- ZigbeeDoorLockSetDoorLockPin_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SET_DOOR_LOCK_PIN: {
+ ZigbeeZclDoorLockSetDoorLockPin_t *in_req;
+ ZigbeeZclDoorLockSetDoorLockPin_t *req = NULL;
- in_req = (ZigbeeDoorLockSetDoorLockPin_t *)request_data;
+ in_req = (ZigbeeZclDoorLockSetDoorLockPin_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeDoorLockSetDoorLockPin_t *)
- g_malloc0(sizeof(ZigbeeDoorLockSetDoorLockPin_t));
+ req = (ZigbeeZclDoorLockSetDoorLockPin_t *)
+ g_malloc0(sizeof(ZigbeeZclDoorLockSetDoorLockPin_t));
/* Copy data */
req->uid = in_req->uid;
}
break;
- case ZBLIB_DOOR_LOCK_OPS_SET_DOOR_LOCK: {
- ZigbeeDoorLockSetDoorLock_t *in_req;
- ZigbeeDoorLockSetDoorLock_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SET_DOOR_LOCK: {
+ ZigbeeZclDoorLockSetDoorLock_t *in_req;
+ ZigbeeZclDoorLockSetDoorLock_t *req = NULL;
- in_req = (ZigbeeDoorLockSetDoorLock_t *)request_data;
+ in_req = (ZigbeeZclDoorLockSetDoorLock_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeDoorLockSetDoorLock_t *)
- g_malloc0(sizeof(ZigbeeDoorLockSetDoorLock_t));
+ req = (ZigbeeZclDoorLockSetDoorLock_t *)
+ g_malloc0(sizeof(ZigbeeZclDoorLockSetDoorLock_t));
/* Copy data */
memcpy(req->eui64,
}
break;
- case ZBLIB_DOOR_LOCK_OPS_GET_LOCK_STATE: {
- ZigbeeDoorLockGetDoorLock_t *in_req;
- ZigbeeDoorLockGetDoorLock_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_GET_LOCK_STATE: {
+ ZigbeeZclDoorLockGetDoorLock_t *in_req;
+ ZigbeeZclDoorLockGetDoorLock_t *req = NULL;
- in_req = (ZigbeeDoorLockGetDoorLock_t *)request_data;
+ in_req = (ZigbeeZclDoorLockGetDoorLock_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeDoorLockGetDoorLock_t *)
- g_malloc0(sizeof(ZigbeeDoorLockGetDoorLock_t));
+ req = (ZigbeeZclDoorLockGetDoorLock_t *)
+ g_malloc0(sizeof(ZigbeeZclDoorLockGetDoorLock_t));
/* Copy data */
memcpy(req->eui64,
return door_lock_request_data;
}
-static gpointer __zblib_request_create_fan_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_fan_control_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer fan_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_FAN_CONTROL_OPS_SET_FAN_MODE: {
- ZigbeeFanControlSetFanMode_t *in_req;
- ZigbeeFanControlSetFanMode_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_SET_FAN_MODE: {
+ ZigbeeZclFanControlSetFanMode_t *in_req;
+ ZigbeeZclFanControlSetFanMode_t *req = NULL;
- in_req = (ZigbeeFanControlSetFanMode_t *)request_data;
+ in_req = (ZigbeeZclFanControlSetFanMode_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeFanControlSetFanMode_t *)
- g_malloc0(sizeof(ZigbeeFanControlSetFanMode_t));
+ req = (ZigbeeZclFanControlSetFanMode_t *)
+ g_malloc0(sizeof(ZigbeeZclFanControlSetFanMode_t));
/* Copy data */
memcpy(req->eui64,
}
break;
- case ZBLIB_FAN_CONTROL_OPS_GET_FAN_MODE: {
- ZigbeeFanControlGetFanMode_t *in_req;
- ZigbeeFanControlGetFanMode_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_GET_FAN_MODE: {
+ ZigbeeZclFanControlGetFanMode_t *in_req;
+ ZigbeeZclFanControlGetFanMode_t *req = NULL;
- in_req = (ZigbeeFanControlGetFanMode_t *)request_data;
+ in_req = (ZigbeeZclFanControlGetFanMode_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeFanControlGetFanMode_t *)
- g_malloc0(sizeof(ZigbeeFanControlGetFanMode_t));
+ req = (ZigbeeZclFanControlGetFanMode_t *)
+ g_malloc0(sizeof(ZigbeeZclFanControlGetFanMode_t));
/* Copy data */
memcpy(req->eui64,
}
break;
- case ZBLIB_FAN_CONTROL_OPS_SET_FAN_MODE_SEQUENCE: {
- ZigbeeFanControlSetFanModeSequence_t *in_req;
- ZigbeeFanControlSetFanModeSequence_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_SET_FAN_MODE_SEQUENCE: {
+ ZigbeeZclFanControlSetFanModeSequence_t *in_req;
+ ZigbeeZclFanControlSetFanModeSequence_t *req = NULL;
- in_req = (ZigbeeFanControlSetFanModeSequence_t *)request_data;
+ in_req = (ZigbeeZclFanControlSetFanModeSequence_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeFanControlSetFanModeSequence_t *)
- g_malloc0(sizeof(ZigbeeFanControlSetFanModeSequence_t));
+ req = (ZigbeeZclFanControlSetFanModeSequence_t *)
+ g_malloc0(sizeof(ZigbeeZclFanControlSetFanModeSequence_t));
/* Copy data */
memcpy(req->eui64,
}
break;
- case ZBLIB_FAN_CONTROL_OPS_GET_FAN_MODE_SEQUENCE: {
- ZigbeeFanControlGetFanModeSequence_t *in_req;
- ZigbeeFanControlGetFanModeSequence_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_GET_FAN_MODE_SEQUENCE: {
+ ZigbeeZclFanControlGetFanModeSequence_t *in_req;
+ ZigbeeZclFanControlGetFanModeSequence_t *req = NULL;
- in_req = (ZigbeeFanControlGetFanModeSequence_t *)request_data;
+ in_req = (ZigbeeZclFanControlGetFanModeSequence_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeFanControlGetFanModeSequence_t *)
- g_malloc0(sizeof(ZigbeeFanControlGetFanModeSequence_t));
+ req = (ZigbeeZclFanControlGetFanModeSequence_t *)
+ g_malloc0(sizeof(ZigbeeZclFanControlGetFanModeSequence_t));
/* Copy data */
memcpy(req->eui64,
return fan_control_request_data;
}
-static gpointer __zblib_request_create_level_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_level_control_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer level_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL: {
- ZigbeeLevelControlMoveToLevel_t *in_req;
- ZigbeeLevelControlMoveToLevel_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL: {
+ ZigbeeZclLevelControlMoveToLevel_t *in_req;
+ ZigbeeZclLevelControlMoveToLevel_t *req = NULL;
- in_req = (ZigbeeLevelControlMoveToLevel_t *)request_data;
+ in_req = (ZigbeeZclLevelControlMoveToLevel_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlMoveToLevel_t *)
- g_malloc0(sizeof(ZigbeeLevelControlMoveToLevel_t));
+ req = (ZigbeeZclLevelControlMoveToLevel_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlMoveToLevel_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE: {
- ZigbeeLevelControlMove_t *in_req;
- ZigbeeLevelControlMove_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE: {
+ ZigbeeZclLevelControlMove_t *in_req;
+ ZigbeeZclLevelControlMove_t *req = NULL;
- in_req = (ZigbeeLevelControlMove_t *)request_data;
+ in_req = (ZigbeeZclLevelControlMove_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlMove_t *)
- g_malloc0(sizeof(ZigbeeLevelControlMove_t));
+ req = (ZigbeeZclLevelControlMove_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlMove_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STEP: {
- ZigbeeLevelControlStep_t *in_req;
- ZigbeeLevelControlStep_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STEP: {
+ ZigbeeZclLevelControlStep_t *in_req;
+ ZigbeeZclLevelControlStep_t *req = NULL;
- in_req = (ZigbeeLevelControlStep_t *)request_data;
+ in_req = (ZigbeeZclLevelControlStep_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlStep_t *)
- g_malloc0(sizeof(ZigbeeLevelControlStep_t));
+ req = (ZigbeeZclLevelControlStep_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlStep_t));
/* Copy data */
req->node_id = in_req->node_id;
req->endpoint = in_req->endpoint;
req->step_mode = in_req->step_mode;
- req->move_mode = in_req->move_mode;
+ req->step_size = in_req->step_size;
req->transition_time = in_req->transition_time;
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL_WITH_ON_OFF: {
- ZigbeeLevelControlMoveToLevelWithOnOff_t *in_req;
- ZigbeeLevelControlMoveToLevelWithOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL_WITH_ON_OFF: {
+ ZigbeeZclLevelControlMoveToLevelWithOnOff_t *in_req;
+ ZigbeeZclLevelControlMoveToLevelWithOnOff_t *req = NULL;
- in_req = (ZigbeeLevelControlMoveToLevelWithOnOff_t *)request_data;
+ in_req = (ZigbeeZclLevelControlMoveToLevelWithOnOff_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlMoveToLevelWithOnOff_t *)
- g_malloc0(sizeof(ZigbeeLevelControlMoveToLevelWithOnOff_t));
+ req = (ZigbeeZclLevelControlMoveToLevelWithOnOff_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlMoveToLevelWithOnOff_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_WITH_ON_OFF: {
- ZigbeeLevelControlMoveOnOff_t *in_req;
- ZigbeeLevelControlMoveOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_WITH_ON_OFF: {
+ ZigbeeZclLevelControlMoveWithOnOff_t *in_req;
+ ZigbeeZclLevelControlMoveWithOnOff_t *req = NULL;
- in_req = (ZigbeeLevelControlMoveOnOff_t *)request_data;
+ in_req = (ZigbeeZclLevelControlMoveWithOnOff_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlMoveOnOff_t *)
- g_malloc0(sizeof(ZigbeeLevelControlMoveOnOff_t));
+ req = (ZigbeeZclLevelControlMoveWithOnOff_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlMoveWithOnOff_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STEP_WITH_ON_OFF: {
- ZigbeeLevelControlStepWithOnOff_t *in_req;
- ZigbeeLevelControlStepWithOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STEP_WITH_ON_OFF: {
+ ZigbeeZclLevelControlStepWithOnOff_t *in_req;
+ ZigbeeZclLevelControlStepWithOnOff_t *req = NULL;
- in_req = (ZigbeeLevelControlStepWithOnOff_t *)request_data;
+ in_req = (ZigbeeZclLevelControlStepWithOnOff_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlStepWithOnOff_t *)
- g_malloc0(sizeof(ZigbeeLevelControlStepWithOnOff_t));
+ req = (ZigbeeZclLevelControlStepWithOnOff_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlStepWithOnOff_t));
/* Copy data */
req->node_id = in_req->node_id;
req->endpoint = in_req->endpoint;
req->step_mode = in_req->step_mode;
- req->move_mode = in_req->move_mode;
+ req->step_size = in_req->step_size;
req->transition_time = in_req->transition_time;
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STOP: {
- ZigbeeLevelControlStop_t *in_req;
- ZigbeeLevelControlStop_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STOP: {
+ ZigbeeZclLevelControlStop_t *in_req;
+ ZigbeeZclLevelControlStop_t *req = NULL;
- in_req = (ZigbeeLevelControlStop_t *)request_data;
+ in_req = (ZigbeeZclLevelControlStop_t *)request_data;
if (in_req) {
/* Allocate memory */
- req = (ZigbeeLevelControlStop_t *)
- g_malloc0(sizeof(ZigbeeLevelControlStop_t));
+ req = (ZigbeeZclLevelControlStop_t *)
+ g_malloc0(sizeof(ZigbeeZclLevelControlStop_t));
/* Copy data */
req->node_id = in_req->node_id;
return mfglib_control_request_data;
}
-static gpointer __zblib_request_create_on_off_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_on_off_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer on_off_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ON_OFF_OPS_SET_ON_OFF: {
- ZigbeeOnOffSetOnOff_t *in_req;
- ZigbeeOnOffSetOnOff_t *req = NULL;
+ case ZBLIB_ZCL_ON_OFF_OPS_SET_ON_OFF: {
+ ZigbeeZclOnOffSetOnOff_t *in_req;
+ ZigbeeZclOnOffSetOnOff_t *req = NULL;
- in_req = (ZigbeeOnOffSetOnOff_t *)request_data;
+ in_req = (ZigbeeZclOnOffSetOnOff_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeOnOffSetOnOff_t *)
- g_malloc0(sizeof(ZigbeeOnOffSetOnOff_t));
+ req = (ZigbeeZclOnOffSetOnOff_t *)
+ g_malloc0(sizeof(ZigbeeZclOnOffSetOnOff_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ON_OFF_OPS_GET_ON_OFF_STATE: {
- ZigbeeOnOffGetOnOffState_t *in_req;
- ZigbeeOnOffGetOnOffState_t *req = NULL;
+ case ZBLIB_ZCL_ON_OFF_OPS_GET_ON_OFF_STATE: {
+ ZigbeeZclOnOffGetOnOffState_t *in_req;
+ ZigbeeZclOnOffGetOnOffState_t *req = NULL;
- in_req = (ZigbeeOnOffGetOnOffState_t *)request_data;
+ in_req = (ZigbeeZclOnOffGetOnOffState_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeOnOffGetOnOffState_t *)
- g_malloc0(sizeof(ZigbeeOnOffGetOnOffState_t));
+ req = (ZigbeeZclOnOffGetOnOffState_t *)
+ g_malloc0(sizeof(ZigbeeZclOnOffGetOnOffState_t));
/* Copy data */
req->node_id = in_req->node_id;
break;
default:
+ Z_LOGE("Unexpected operation [%x]", ops_id);
break;
}
return service_request_data;
}
-static gpointer __zblib_request_create_thermostat_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_thermostat_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer thermostat_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_THERMOSTAT_OPS_GET_LOCAL_TEMP: {
- ZigbeeThermostatGetLocalTemp_t *in_req;
- ZigbeeThermostatGetLocalTemp_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_GET_LOCAL_TEMP: {
+ ZigbeeZclThermostatGetLocalTemp_t *in_req;
+ ZigbeeZclThermostatGetLocalTemp_t *req = NULL;
- in_req = (ZigbeeThermostatGetLocalTemp_t *)request_data;
+ in_req = (ZigbeeZclThermostatGetLocalTemp_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeThermostatGetLocalTemp_t *)
- g_malloc0(sizeof(ZigbeeThermostatGetLocalTemp_t));
+ req = (ZigbeeZclThermostatGetLocalTemp_t *)
+ g_malloc0(sizeof(ZigbeeZclThermostatGetLocalTemp_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_THERMOSTAT_OPS_GET_WEEKLY_SCHEDULE: {
- ZigbeeThermostatGetWeeklySchedule_t *in_req;
- ZigbeeThermostatGetWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_GET_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatGetWeeklySchedule_t *in_req;
+ ZigbeeZclThermostatGetWeeklySchedule_t *req = NULL;
- in_req = (ZigbeeThermostatGetWeeklySchedule_t *)request_data;
+ in_req = (ZigbeeZclThermostatGetWeeklySchedule_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeThermostatGetWeeklySchedule_t *)
- g_malloc0(sizeof(ZigbeeThermostatGetWeeklySchedule_t));
+ req = (ZigbeeZclThermostatGetWeeklySchedule_t *)
+ g_malloc0(sizeof(ZigbeeZclThermostatGetWeeklySchedule_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_THERMOSTAT_OPS_SET_WEEKLY_SCHEDULE: {
- ZigbeeThermostatSetWeeklySchedule_t *in_req;
- ZigbeeThermostatSetWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_SET_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatSetWeeklySchedule_t *in_req;
+ ZigbeeZclThermostatSetWeeklySchedule_t *req = NULL;
- in_req = (ZigbeeThermostatSetWeeklySchedule_t *)request_data;
+ in_req = (ZigbeeZclThermostatSetWeeklySchedule_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeThermostatSetWeeklySchedule_t *)
- g_malloc0(sizeof(ZigbeeThermostatSetWeeklySchedule_t));
+ req = (ZigbeeZclThermostatSetWeeklySchedule_t *)
+ g_malloc0(sizeof(ZigbeeZclThermostatSetWeeklySchedule_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_THERMOSTAT_OPS_CLEAR_WEEKLY_SCHEDULE: {
- ZigbeeThermostatClearWeeklySchedule_t *in_req;
- ZigbeeThermostatClearWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_CLEAR_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatClearWeeklySchedule_t *in_req;
+ ZigbeeZclThermostatClearWeeklySchedule_t *req = NULL;
- in_req = (ZigbeeThermostatClearWeeklySchedule_t *)request_data;
+ in_req = (ZigbeeZclThermostatClearWeeklySchedule_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeThermostatClearWeeklySchedule_t *)
- g_malloc0(sizeof(ZigbeeThermostatClearWeeklySchedule_t));
+ req = (ZigbeeZclThermostatClearWeeklySchedule_t *)
+ g_malloc0(sizeof(ZigbeeZclThermostatClearWeeklySchedule_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_THERMOSTAT_OPS_SETPOINT_RAISE_LOWER: {
- ZigbeeThermostatSetpointRaiseLower_t *in_req;
- ZigbeeThermostatSetpointRaiseLower_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_SETPOINT_RAISE_LOWER: {
+ ZigbeeZclThermostatSetpointRaiseLower_t *in_req;
+ ZigbeeZclThermostatSetpointRaiseLower_t *req = NULL;
- in_req = (ZigbeeThermostatSetpointRaiseLower_t *)request_data;
+ in_req = (ZigbeeZclThermostatSetpointRaiseLower_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeThermostatSetpointRaiseLower_t *)
- g_malloc0(sizeof(ZigbeeThermostatSetpointRaiseLower_t));
+ req = (ZigbeeZclThermostatSetpointRaiseLower_t *)
+ g_malloc0(sizeof(ZigbeeZclThermostatSetpointRaiseLower_t));
/* Copy data */
req->node_id = in_req->node_id;
return thermostat_request_data;
}
-static gpointer __zblib_request_create_zclbasic_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_basic_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zclbasic_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLBASIC_CONTROL_OPS_RESET_FACTORY_DEFAULT: {
- ZigbeeZclbasicControlResetFactoryDefault_t *in_req;
- ZigbeeZclbasicControlResetFactoryDefault_t *req = NULL;
+ case ZBLIB_ZCL_BASIC_OPS_RESET_FACTORY_DEFAULT: {
+ ZigbeeZclBasicResetFactoryDefault_t *in_req;
+ ZigbeeZclBasicResetFactoryDefault_t *req = NULL;
- in_req = (ZigbeeZclbasicControlResetFactoryDefault_t *)request_data;
+ in_req = (ZigbeeZclBasicResetFactoryDefault_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclbasicControlResetFactoryDefault_t *)
- g_malloc0(sizeof(ZigbeeZclbasicControlResetFactoryDefault_t));
+ req = (ZigbeeZclBasicResetFactoryDefault_t *)
+ g_malloc0(sizeof(ZigbeeZclBasicResetFactoryDefault_t));
/* Copy data */
req->node_id = in_req->node_id;
return zclbasic_control_request_data;
}
-static gpointer __zblib_request_create_zclglobal_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_global_control_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zclglobal_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_REQ: {
- ZigbeeZclglobalControlReadAttributesRequest_t *in_req;
- ZigbeeZclglobalControlReadAttributesRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_REQ: {
+ ZigbeeZclGlobalControlReadAttributesRequest_t *in_req;
+ ZigbeeZclGlobalControlReadAttributesRequest_t *req = NULL;
- in_req = (ZigbeeZclglobalControlReadAttributesRequest_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlReadAttributesRequest_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlReadAttributesRequest_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlReadAttributesRequest_t));
+ req = (ZigbeeZclGlobalControlReadAttributesRequest_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlReadAttributesRequest_t));
/* Copy data */
req->attribute_id = g_strdup(in_req->attribute_id);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ: {
- ZigbeeZclglobalControlWriteAttributesRequest_t *in_req;
- ZigbeeZclglobalControlWriteAttributesRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ: {
+ ZigbeeZclGlobalControlWriteAttributesRequest_t *in_req;
+ ZigbeeZclGlobalControlWriteAttributesRequest_t *req = NULL;
- in_req = (ZigbeeZclglobalControlWriteAttributesRequest_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlWriteAttributesRequest_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlWriteAttributesRequest_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlWriteAttributesRequest_t));
+ req = (ZigbeeZclGlobalControlWriteAttributesRequest_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesRequest_t));
/* Copy data */
req->write_records = g_strdup(in_req->write_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ: {
- ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *in_req;
- ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ: {
+ ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *in_req;
+ ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *req = NULL;
- in_req = (ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlWriteAttributesUndividedRequest_t));
+ req = (ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t));
/* Copy data */
req->write_records = g_strdup(in_req->write_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP: {
- ZigbeeZclglobalControlWriteAttributesNoResponse_t *in_req;
- ZigbeeZclglobalControlWriteAttributesNoResponse_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP: {
+ ZigbeeZclGlobalControlWriteAttributesNoResponse_t *in_req;
+ ZigbeeZclGlobalControlWriteAttributesNoResponse_t *req = NULL;
- in_req = (ZigbeeZclglobalControlWriteAttributesNoResponse_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlWriteAttributesNoResponse_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlWriteAttributesNoResponse_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlWriteAttributesNoResponse_t));
+ req = (ZigbeeZclGlobalControlWriteAttributesNoResponse_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesNoResponse_t));
/* Copy data */
req->write_records = g_strdup(in_req->write_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED: {
- ZigbeeZclglobalControlWriteAttributesStructed_t *in_req;
- ZigbeeZclglobalControlWriteAttributesStructed_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED: {
+ ZigbeeZclGlobalControlWriteAttributesStructed_t *in_req;
+ ZigbeeZclGlobalControlWriteAttributesStructed_t *req = NULL;
- in_req = (ZigbeeZclglobalControlWriteAttributesStructed_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlWriteAttributesStructed_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlWriteAttributesStructed_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlWriteAttributesStructed_t));
+ req = (ZigbeeZclGlobalControlWriteAttributesStructed_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesStructed_t));
/* Copy data */
req->write_records = g_strdup(in_req->write_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED: {
- ZigbeeZclglobalControlReadAttributesStructed_t *in_req;
- ZigbeeZclglobalControlReadAttributesStructed_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED: {
+ ZigbeeZclGlobalControlReadAttributesStructed_t *in_req;
+ ZigbeeZclGlobalControlReadAttributesStructed_t *req = NULL;
- in_req = (ZigbeeZclglobalControlReadAttributesStructed_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlReadAttributesStructed_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlReadAttributesStructed_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlReadAttributesStructed_t));
+ req = (ZigbeeZclGlobalControlReadAttributesStructed_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlReadAttributesStructed_t));
/* Copy data */
req->read_records = g_strdup(in_req->read_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ: {
- ZigbeeZclglobalControlConfigureReportingReq_t *in_req;
- ZigbeeZclglobalControlConfigureReportingReq_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ: {
+ ZigbeeZclGlobalControlConfigureReportingReq_t *in_req;
+ ZigbeeZclGlobalControlConfigureReportingReq_t *req = NULL;
- in_req = (ZigbeeZclglobalControlConfigureReportingReq_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlConfigureReportingReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlConfigureReportingReq_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlConfigureReportingReq_t));
+ req = (ZigbeeZclGlobalControlConfigureReportingReq_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlConfigureReportingReq_t));
/* Copy data */
req->read_records = g_strdup(in_req->read_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING: {
- ZigbeeZclglobalControlReadConfigureReporting_t *in_req;
- ZigbeeZclglobalControlReadConfigureReporting_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING: {
+ ZigbeeZclGlobalControlReadConfigureReporting_t *in_req;
+ ZigbeeZclGlobalControlReadConfigureReporting_t *req = NULL;
- in_req = (ZigbeeZclglobalControlReadConfigureReporting_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlReadConfigureReporting_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlReadConfigureReporting_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlReadConfigureReporting_t));
+ req = (ZigbeeZclGlobalControlReadConfigureReporting_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlReadConfigureReporting_t));
/* Copy data */
req->read_records = g_strdup(in_req->read_records);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES: {
- ZigbeeZclglobalControlDiscoverAttributes_t *in_req;
- ZigbeeZclglobalControlDiscoverAttributes_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES: {
+ ZigbeeZclGlobalControlDiscoverAttributes_t *in_req;
+ ZigbeeZclGlobalControlDiscoverAttributes_t *req = NULL;
- in_req = (ZigbeeZclglobalControlDiscoverAttributes_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlDiscoverAttributes_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlDiscoverAttributes_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlDiscoverAttributes_t));
+ req = (ZigbeeZclGlobalControlDiscoverAttributes_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlDiscoverAttributes_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES_EXTENDED: {
- ZigbeeZclglobalControlDiscoverAttributesExtended_t *in_req;
- ZigbeeZclglobalControlDiscoverAttributesExtended_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES_EXTENDED: {
+ ZigbeeZclGlobalControlDiscoverAttributesExtended_t *in_req;
+ ZigbeeZclGlobalControlDiscoverAttributesExtended_t *req = NULL;
- in_req = (ZigbeeZclglobalControlDiscoverAttributesExtended_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlDiscoverAttributesExtended_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlDiscoverAttributesExtended_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlDiscoverAttributesExtended_t));
+ req = (ZigbeeZclGlobalControlDiscoverAttributesExtended_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlDiscoverAttributesExtended_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_RECEIVED: {
- ZigbeeZclglobalControlDiscoverCommandsReceived_t *in_req;
- ZigbeeZclglobalControlDiscoverCommandsReceived_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_RECEIVED: {
+ ZigbeeZclGlobalControlDiscoverCommandsReceived_t *in_req;
+ ZigbeeZclGlobalControlDiscoverCommandsReceived_t *req = NULL;
- in_req = (ZigbeeZclglobalControlDiscoverCommandsReceived_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlDiscoverCommandsReceived_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlDiscoverCommandsReceived_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlDiscoverCommandsReceived_t));
+ req = (ZigbeeZclGlobalControlDiscoverCommandsReceived_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlDiscoverCommandsReceived_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_GENERATED: {
- ZigbeeZclglobalControlDiscoverCommandsGenerated_t *in_req;
- ZigbeeZclglobalControlDiscoverCommandsGenerated_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_GENERATED: {
+ ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *in_req;
+ ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *req = NULL;
- in_req = (ZigbeeZclglobalControlDiscoverCommandsGenerated_t *)request_data;
+ in_req = (ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclglobalControlDiscoverCommandsGenerated_t *)
- g_malloc0(sizeof(ZigbeeZclglobalControlDiscoverCommandsGenerated_t));
+ req = (ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *)
+ g_malloc0(sizeof(ZigbeeZclGlobalControlDiscoverCommandsGenerated_t));
/* Copy data */
req->node_id = in_req->node_id;
return zclglobal_control_request_data;
}
-static gpointer __zblib_request_create_zclias_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_ias_zone_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zclias_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLIAS_CONTROL_OPS_ENROLL_RESPONSE: {
- ZigbeeZcliasControlEnrolResponse_t *in_req;
- ZigbeeZcliasControlEnrolResponse_t *req = NULL;
+ case ZBLIB_ZCL_IAS_ZONE_OPS_ENROLL_RESPONSE: {
+ ZigbeeZclIasZoneEnrollResponse_t *in_req;
+ ZigbeeZclIasZoneEnrollResponse_t *req = NULL;
- in_req = (ZigbeeZcliasControlEnrolResponse_t *)request_data;
+ in_req = (ZigbeeZclIasZoneEnrollResponse_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZcliasControlEnrolResponse_t *)
- g_malloc0(sizeof(ZigbeeZcliasControlEnrolResponse_t));
+ req = (ZigbeeZclIasZoneEnrollResponse_t *)
+ g_malloc0(sizeof(ZigbeeZclIasZoneEnrollResponse_t));
/* Copy data */
req->node_id = in_req->node_id;
return zclias_control_request_data;
}
-static gpointer __zblib_request_create_zclidentify_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_identify_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zclidentify_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLIDENTIFY_CONTROL_OPS_IDENTIFY: {
- ZigbeeZclidentifyControlIdentify_t *in_req;
- ZigbeeZclidentifyControlIdentify_t *req = NULL;
+ case ZBLIB_ZCL_IDENTIFY_OPS_IDENTIFY: {
+ ZigbeeZclIdentifyIdentify_t *in_req;
+ ZigbeeZclIdentifyIdentify_t *req = NULL;
- in_req = (ZigbeeZclidentifyControlIdentify_t *)request_data;
+ in_req = (ZigbeeZclIdentifyIdentify_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclidentifyControlIdentify_t *)
- g_malloc0(sizeof(ZigbeeZclidentifyControlIdentify_t));
+ req = (ZigbeeZclIdentifyIdentify_t *)
+ g_malloc0(sizeof(ZigbeeZclIdentifyIdentify_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCLIDENTIFY_CONTROL_OPS_QUERY: {
- ZigbeeZclidentifyControlQuery_t *in_req;
- ZigbeeZclidentifyControlQuery_t *req = NULL;
+ case ZBLIB_ZCL_IDENTIFY_OPS_QUERY: {
+ ZigbeeZclIdentifyQuery_t *in_req;
+ ZigbeeZclIdentifyQuery_t *req = NULL;
- in_req = (ZigbeeZclidentifyControlQuery_t *)request_data;
+ in_req = (ZigbeeZclIdentifyQuery_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclidentifyControlQuery_t *)
- g_malloc0(sizeof(ZigbeeZclidentifyControlQuery_t));
+ req = (ZigbeeZclIdentifyQuery_t *)
+ g_malloc0(sizeof(ZigbeeZclIdentifyQuery_t));
/* Copy data */
req->node_id = in_req->node_id;
return zclidentify_control_request_data;
}
-static gpointer __zblib_request_create_zcl_color_request_data(guint request_type,
+static gpointer __zblib_request_create_zcl_color_control_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zcl_color_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_HUE: {
- ZigbeeZclColorMoveToHue_t *in_req;
- ZigbeeZclColorMoveToHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_HUE: {
+ ZigbeeZclColorControlMoveToHue_t *in_req;
+ ZigbeeZclColorControlMoveToHue_t *req = NULL;
- in_req = (ZigbeeZclColorMoveToHue_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveToHue_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveToHue_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveToHue_t));
+ req = (ZigbeeZclColorControlMoveToHue_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveToHue_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_HUE: {
- ZigbeeZclColorMoveHue_t *in_req;
- ZigbeeZclColorMoveHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_HUE: {
+ ZigbeeZclColorControlMoveHue_t *in_req;
+ ZigbeeZclColorControlMoveHue_t *req = NULL;
- in_req = (ZigbeeZclColorMoveHue_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveHue_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveHue_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveHue_t));
+ req = (ZigbeeZclColorControlMoveHue_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveHue_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_HUE: {
- ZigbeeZclColorStepHue_t *in_req;
- ZigbeeZclColorStepHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_HUE: {
+ ZigbeeZclColorControlStepHue_t *in_req;
+ ZigbeeZclColorControlStepHue_t *req = NULL;
- in_req = (ZigbeeZclColorStepHue_t *)request_data;
+ in_req = (ZigbeeZclColorControlStepHue_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorStepHue_t *)
- g_malloc0(sizeof(ZigbeeZclColorStepHue_t));
+ req = (ZigbeeZclColorControlStepHue_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlStepHue_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_STAURATION: {
- ZigbeeZclColorMoveToSaturation_t *in_req;
- ZigbeeZclColorMoveToSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_STAURATION: {
+ ZigbeeZclColorControlMoveToSaturation_t *in_req;
+ ZigbeeZclColorControlMoveToSaturation_t *req = NULL;
- in_req = (ZigbeeZclColorMoveToSaturation_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveToSaturation_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveToSaturation_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveToSaturation_t));
+ req = (ZigbeeZclColorControlMoveToSaturation_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveToSaturation_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_STAURATION: {
- ZigbeeZclColorMoveSaturation_t *in_req;
- ZigbeeZclColorMoveSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_STAURATION: {
+ ZigbeeZclColorControlMoveSaturation_t *in_req;
+ ZigbeeZclColorControlMoveSaturation_t *req = NULL;
- in_req = (ZigbeeZclColorMoveSaturation_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveSaturation_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveSaturation_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveSaturation_t));
+ req = (ZigbeeZclColorControlMoveSaturation_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveSaturation_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_STAURATION: {
- ZigbeeZclColorStepSaturation_t *in_req;
- ZigbeeZclColorStepSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_STAURATION: {
+ ZigbeeZclColorControlStepSaturation_t *in_req;
+ ZigbeeZclColorControlStepSaturation_t *req = NULL;
- in_req = (ZigbeeZclColorStepSaturation_t *)request_data;
+ in_req = (ZigbeeZclColorControlStepSaturation_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorStepSaturation_t *)
- g_malloc0(sizeof(ZigbeeZclColorStepSaturation_t));
+ req = (ZigbeeZclColorControlStepSaturation_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlStepSaturation_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_HUE_AND_SATURATION: {
- ZigbeeZclColorMoveToHueAndSaturation_t *in_req;
- ZigbeeZclColorMoveToHueAndSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_HUE_AND_SATURATION: {
+ ZigbeeZclColorControlMoveToHueAndSaturation_t *in_req;
+ ZigbeeZclColorControlMoveToHueAndSaturation_t *req = NULL;
- in_req = (ZigbeeZclColorMoveToHueAndSaturation_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveToHueAndSaturation_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveToHueAndSaturation_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveToHueAndSaturation_t));
+ req = (ZigbeeZclColorControlMoveToHueAndSaturation_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveToHueAndSaturation_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_COLOR: {
- ZigbeeZclColorMoveToColor_t *in_req;
- ZigbeeZclColorMoveToColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_COLOR: {
+ ZigbeeZclColorControlMoveToColor_t *in_req;
+ ZigbeeZclColorControlMoveToColor_t *req = NULL;
- in_req = (ZigbeeZclColorMoveToColor_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveToColor_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveToColor_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveToColor_t));
+ req = (ZigbeeZclColorControlMoveToColor_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveToColor_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_COLOR: {
- ZigbeeZclColorMoveColor_t *in_req;
- ZigbeeZclColorMoveColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_COLOR: {
+ ZigbeeZclColorControlMoveColor_t *in_req;
+ ZigbeeZclColorControlMoveColor_t *req = NULL;
- in_req = (ZigbeeZclColorMoveColor_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveColor_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveColor_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveColor_t));
+ req = (ZigbeeZclColorControlMoveColor_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveColor_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_COLOR: {
- ZigbeeZclColorStepColor_t *in_req;
- ZigbeeZclColorStepColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_COLOR: {
+ ZigbeeZclColorControlStepColor_t *in_req;
+ ZigbeeZclColorControlStepColor_t *req = NULL;
- in_req = (ZigbeeZclColorStepColor_t *)request_data;
+ in_req = (ZigbeeZclColorControlStepColor_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorStepColor_t *)
- g_malloc0(sizeof(ZigbeeZclColorStepColor_t));
+ req = (ZigbeeZclColorControlStepColor_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlStepColor_t));
/* Copy data */
req->node_id = in_req->node_id;
req->dest_ep = in_req->dest_ep;
- req->rate_x = in_req->rate_x;
- req->rate_y = in_req->rate_y;
+ req->step_x = in_req->step_x;
+ req->step_y = in_req->step_y;
req->transition_time = in_req->transition_time;
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_COLOR_TEMPERATURE: {
- ZigbeeZclColorMoveColorTemperature_t *in_req;
- ZigbeeZclColorMoveColorTemperature_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_COLOR_TEMPERATURE: {
+ ZigbeeZclColorControlMoveColorTemperature_t *in_req;
+ ZigbeeZclColorControlMoveColorTemperature_t *req = NULL;
- in_req = (ZigbeeZclColorMoveColorTemperature_t *)request_data;
+ in_req = (ZigbeeZclColorControlMoveColorTemperature_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZclColorMoveColorTemperature_t *)
- g_malloc0(sizeof(ZigbeeZclColorMoveColorTemperature_t));
+ req = (ZigbeeZclColorControlMoveColorTemperature_t *)
+ g_malloc0(sizeof(ZigbeeZclColorControlMoveColorTemperature_t));
/* Copy data */
req->node_id = in_req->node_id;
g_strlcpy(req->scene_name,
in_req->scene_name, ZIGBEE_ZCL_SCENE_NAME_MAX_LEN + 1);
req->ext_field_set_len = in_req->ext_field_set_len;
- req->ext_field_set = (gshort *)g_memdup(in_req->ext_field_set,
+ req->ext_field_set = (char *)g_memdup(in_req->ext_field_set,
in_req->ext_field_set_len);
}
return zcl_scene_request_data;
}
-static gpointer __zblib_request_create_zdodev_control_request_data(guint request_type,
+static gpointer __zblib_request_create_zdo_dev_control_request_data(guint request_type,
gpointer request_data, guint request_data_len)
{
gpointer zdodev_control_request_data = NULL;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_ADDR_REQ: {
- ZigbeeZdodevControlNwkAddrReq_t *in_req;
- ZigbeeZdodevControlNwkAddrReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_ADDR_REQ: {
+ ZigbeeZdoDevControlNwkAddrReq_t *in_req;
+ ZigbeeZdoDevControlNwkAddrReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlNwkAddrReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlNwkAddrReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlNwkAddrReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlNwkAddrReq_t));
+ req = (ZigbeeZdoDevControlNwkAddrReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlNwkAddrReq_t));
/* Copy data */
memcpy(req->eui64, in_req->eui64, ZIGBEE_EUI64_SIZE);
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MATCHED_DESCRIPTOR_REQ: {
- ZigbeeZdodevControlMatchedDescriptorReq_t *in_req;
- ZigbeeZdodevControlMatchedDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MATCHED_DESCRIPTOR_REQ: {
+ ZigbeeZdoDevControlMatchedDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlMatchedDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlMatchedDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlMatchedDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlMatchedDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlMatchedDescriptorReq_t));
+ req = (ZigbeeZdoDevControlMatchedDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlMatchedDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_IEEE_ADDR_REQ: {
- ZigbeeZdodevControlIeeeAddrReq_t *in_req;
- ZigbeeZdodevControlIeeeAddrReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_IEEE_ADDR_REQ: {
+ ZigbeeZdoDevControlIeeeAddrReq_t *in_req;
+ ZigbeeZdoDevControlIeeeAddrReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlIeeeAddrReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlIeeeAddrReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlIeeeAddrReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlIeeeAddrReq_t));
+ req = (ZigbeeZdoDevControlIeeeAddrReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlIeeeAddrReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_ACTIVE_EP_REQ: {
- ZigbeeZdodevControlActiveEpReq_t *in_req;
- ZigbeeZdodevControlActiveEpReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_ACTIVE_EP_REQ: {
+ ZigbeeZdoDevControlActiveEpReq_t *in_req;
+ ZigbeeZdoDevControlActiveEpReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlActiveEpReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlActiveEpReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlActiveEpReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlActiveEpReq_t));
+ req = (ZigbeeZdoDevControlActiveEpReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlActiveEpReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NODE_DESC_REQ: {
- ZigbeeZdodevControlNodeDescriptorReq_t *in_req;
- ZigbeeZdodevControlNodeDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NODE_DESC_REQ: {
+ ZigbeeZdoDevControlNodeDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlNodeDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlNodeDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlNodeDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlNodeDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlNodeDescriptorReq_t));
+ req = (ZigbeeZdoDevControlNodeDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlNodeDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_POWER_DESC_REQ: {
- ZigbeeZdodevControlPowerDescriptorReq_t *in_req;
- ZigbeeZdodevControlPowerDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_POWER_DESC_REQ: {
+ ZigbeeZdoDevControlPowerDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlPowerDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlPowerDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlPowerDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlPowerDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlPowerDescriptorReq_t));
+ req = (ZigbeeZdoDevControlPowerDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlPowerDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_COMPLEX_DESC_REQ: {
- ZigbeeZdodevControlComplexDescriptorReq_t *in_req;
- ZigbeeZdodevControlComplexDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_COMPLEX_DESC_REQ: {
+ ZigbeeZdoDevControlComplexDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlComplexDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlComplexDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlComplexDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlComplexDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlComplexDescriptorReq_t));
+ req = (ZigbeeZdoDevControlComplexDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlComplexDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_USER_DESC_REQ: {
- ZigbeeZdodevControlUserDescriptorReq_t *in_req;
- ZigbeeZdodevControlUserDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_USER_DESC_REQ: {
+ ZigbeeZdoDevControlUserDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlUserDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlUserDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlUserDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlUserDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlUserDescriptorReq_t));
+ req = (ZigbeeZdoDevControlUserDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlUserDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_USER_DESC_SET_REQ: {
- ZigbeeZdodevControlUserDescriptorSetReq_t *in_req;
- ZigbeeZdodevControlUserDescriptorSetReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_USER_DESC_SET_REQ: {
+ ZigbeeZdoDevControlUserDescriptorSetReq_t *in_req;
+ ZigbeeZdoDevControlUserDescriptorSetReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlUserDescriptorSetReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlUserDescriptorSetReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlUserDescriptorSetReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlUserDescriptorSetReq_t));
+ req = (ZigbeeZdoDevControlUserDescriptorSetReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlUserDescriptorSetReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_DEVICE_ANNOUNCE: {
- ZigbeeZdodevControlDeviceAnnounce_t *in_req;
- ZigbeeZdodevControlDeviceAnnounce_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_DEVICE_ANNOUNCE: {
+ ZigbeeZdoDevControlDeviceAnnounce_t *in_req;
+ ZigbeeZdoDevControlDeviceAnnounce_t *req = NULL;
- in_req = (ZigbeeZdodevControlDeviceAnnounce_t *)request_data;
+ in_req = (ZigbeeZdoDevControlDeviceAnnounce_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlDeviceAnnounce_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlDeviceAnnounce_t));
+ req = (ZigbeeZdoDevControlDeviceAnnounce_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlDeviceAnnounce_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_SIMPLE_DESC_REQ: {
- ZigbeeZdodevControlSimpleDescriptorReq_t *in_req;
- ZigbeeZdodevControlSimpleDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_SIMPLE_DESC_REQ: {
+ ZigbeeZdoDevControlSimpleDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlSimpleDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlSimpleDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlSimpleDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlSimpleDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlSimpleDescriptorReq_t));
+ req = (ZigbeeZdoDevControlSimpleDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlSimpleDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_LQI_REQ: {
- ZigbeeZdodevControlMgmtLqiReq_t *in_req;
- ZigbeeZdodevControlMgmtLqiReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_LQI_REQ: {
+ ZigbeeZdoDevControlMgmtLqiReq_t *in_req;
+ ZigbeeZdoDevControlMgmtLqiReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlMgmtLqiReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlMgmtLqiReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlMgmtLqiReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlMgmtLqiReq_t));
+ req = (ZigbeeZdoDevControlMgmtLqiReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlMgmtLqiReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_RTG_REQ: {
- ZigbeeZdodevControlMgmtRtgReq_t *in_req;
- ZigbeeZdodevControlMgmtRtgReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_RTG_REQ: {
+ ZigbeeZdoDevControlMgmtRtgReq_t *in_req;
+ ZigbeeZdoDevControlMgmtRtgReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlMgmtRtgReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlMgmtRtgReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlMgmtRtgReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlMgmtRtgReq_t));
+ req = (ZigbeeZdoDevControlMgmtRtgReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlMgmtRtgReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_BIND_REQ: {
- ZigbeeZdodevControlMgmtBindReq_t *in_req;
- ZigbeeZdodevControlMgmtBindReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_BIND_REQ: {
+ ZigbeeZdoDevControlMgmtBindReq_t *in_req;
+ ZigbeeZdoDevControlMgmtBindReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlMgmtBindReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlMgmtBindReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlMgmtBindReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlMgmtBindReq_t));
+ req = (ZigbeeZdoDevControlMgmtBindReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlMgmtBindReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_PERMIT_JOIN_REQ: {
- ZigbeeZdodevControlMgmtPermitJoinReq_t *in_req;
- ZigbeeZdodevControlMgmtPermitJoinReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_PERMIT_JOIN_REQ: {
+ ZigbeeZdoDevControlMgmtPermitJoinReq_t *in_req;
+ ZigbeeZdoDevControlMgmtPermitJoinReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlMgmtPermitJoinReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlMgmtPermitJoinReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlMgmtPermitJoinReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlMgmtPermitJoinReq_t));
+ req = (ZigbeeZdoDevControlMgmtPermitJoinReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlMgmtPermitJoinReq_t));
/* Copy data */
req->addr = in_req->addr;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_UPDATE_REQ: {
- ZigbeeZdodevControlNwkUpdateReq_t *in_req;
- ZigbeeZdodevControlNwkUpdateReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_UPDATE_REQ: {
+ ZigbeeZdoDevControlNwkUpdateReq_t *in_req;
+ ZigbeeZdoDevControlNwkUpdateReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlNwkUpdateReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlNwkUpdateReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlNwkUpdateReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlNwkUpdateReq_t));
+ req = (ZigbeeZdoDevControlNwkUpdateReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlNwkUpdateReq_t));
/* Copy data */
req->node_id = in_req->node_id;
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_DISC_REQ: {
- ZigbeeZdodevControlNwkDescriptorReq_t *in_req;
- ZigbeeZdodevControlNwkDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_DISC_REQ: {
+ ZigbeeZdoDevControlNwkDescriptorReq_t *in_req;
+ ZigbeeZdoDevControlNwkDescriptorReq_t *req = NULL;
- in_req = (ZigbeeZdodevControlNwkDescriptorReq_t *)request_data;
+ in_req = (ZigbeeZdoDevControlNwkDescriptorReq_t *)request_data;
if (NULL != in_req) {
/* Allocate memory */
- req = (ZigbeeZdodevControlNwkDescriptorReq_t *)
- g_malloc0(sizeof(ZigbeeZdodevControlNwkDescriptorReq_t));
+ req = (ZigbeeZdoDevControlNwkDescriptorReq_t *)
+ g_malloc0(sizeof(ZigbeeZdoDevControlNwkDescriptorReq_t));
/* Copy data */
req->node_id = in_req->node_id;
/* Fetch driver type */
driver_type = __zblib_request_get_driver_type(request_type);
switch (driver_type) {
- case ZBLIB_DRIVER_TYPE_ALARM: {
- _request_data = __zblib_request_create_alarm_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_ALARM: {
+ _request_data = __zblib_request_create_zcl_alarm_request_data(request_type,
request_data, request_data_len);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_DOOR_LOCK: {
- _request_data = __zblib_request_create_door_lock_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_DOOR_LOCK: {
+ _request_data = __zblib_request_create_zcl_door_lock_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_FAN_CONTROL: {
- _request_data = __zblib_request_create_fan_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_FAN_CONTROL: {
+ _request_data = __zblib_request_create_zcl_fan_control_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_LEVEL_CONTROL: {
- _request_data = __zblib_request_create_level_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_LEVEL_CONTROL: {
+ _request_data = __zblib_request_create_zcl_level_control_request_data(request_type,
request_data, request_data_len);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_ON_OFF: {
- _request_data = __zblib_request_create_on_off_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_ON_OFF: {
+ _request_data = __zblib_request_create_zcl_on_off_request_data(request_type,
request_data, request_data_len);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_THERMOSTAT: {
- _request_data = __zblib_request_create_thermostat_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_THERMOSTAT: {
+ _request_data = __zblib_request_create_zcl_thermostat_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLBASIC_CONTROL: {
- _request_data = __zblib_request_create_zclbasic_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_BASIC: {
+ _request_data = __zblib_request_create_zcl_basic_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLGLOBAL_CONTROL: {
- _request_data = __zblib_request_create_zclglobal_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_GLOBAL_CONTROL: {
+ _request_data = __zblib_request_create_zcl_global_control_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLIAS_CONTROL: {
- _request_data = __zblib_request_create_zclias_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_IAS_ZONE: {
+ _request_data = __zblib_request_create_zcl_ias_zone_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLIDENTIFY_CONTROL: {
- _request_data = __zblib_request_create_zclidentify_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_IDENTIFY: {
+ _request_data = __zblib_request_create_zcl_identify_request_data(request_type,
request_data, request_data_len);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCL_COLOR: {
- _request_data = __zblib_request_create_zcl_color_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZCL_COLOR_CONTROL: {
+ _request_data = __zblib_request_create_zcl_color_control_request_data(request_type,
request_data, request_data_len);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_ZDODEV_CONTROL: {
- _request_data = __zblib_request_create_zdodev_control_request_data(request_type,
+ case ZBLIB_DRIVER_TYPE_ZDO_DEV_CONTROL: {
+ _request_data = __zblib_request_create_zdo_dev_control_request_data(request_type,
request_data, request_data_len);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_NONE: /* Fallthrough */
+ case ZBLIB_DRIVER_TYPE_NONE: /* Fall through */
default: {
Z_LOGE("Unhandled driver type: [%d]", driver_type);
}
return _request_data;
}
-static void __zblib_request_free_alarm_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_alarm_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ALARM_OPS_GET_ALARM_COUNT: {
- ZigbeeAlarmGetAlarmCount_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_GET_ALARM_COUNT: {
+ ZigbeeZclAlarmGetAlarmCount_t *req = NULL;
- req = (ZigbeeAlarmGetAlarmCount_t *)request->request_data;
+ req = (ZigbeeZclAlarmGetAlarmCount_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALARM: {
- ZigbeeAlarmResetAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALARM: {
+ ZigbeeZclAlarmResetAlarm_t *req = NULL;
- req = (ZigbeeAlarmResetAlarm_t *)request->request_data;
+ req = (ZigbeeZclAlarmResetAlarm_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALL_ALARM: {
- ZigbeeAlarmResetAllAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALL_ALARM: {
+ ZigbeeZclAlarmResetAllAlarm_t *req = NULL;
- req = (ZigbeeAlarmResetAllAlarm_t *)request->request_data;
+ req = (ZigbeeZclAlarmResetAllAlarm_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ALARM_OPS_ALARM: {
- ZigbeeAlarmAlarm_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_ALARM: {
+ ZigbeeZclAlarmAlarm_t *req = NULL;
- req = (ZigbeeAlarmAlarm_t *)request->request_data;
+ req = (ZigbeeZclAlarmAlarm_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ALARM_OPS_RESET_ALARM_LOG: {
- ZigbeeAlarmResetAlarmLogs_t *req = NULL;
+ case ZBLIB_ZCL_ALARM_OPS_RESET_ALARM_LOG: {
+ ZigbeeZclAlarmResetAlarmLogs_t *req = NULL;
- req = (ZigbeeAlarmResetAlarmLogs_t *)request->request_data;
+ req = (ZigbeeZclAlarmResetAlarmLogs_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ALARM_OPS_GET_ALARM: {
+ case ZBLIB_ZCL_ALARM_OPS_GET_ALARM: {
}
break;
}
}
-static void __zblib_request_free_door_lock_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_door_lock_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_DOOR_LOCK_OPS_SUBSCRIBE_LOCK_EVENT: {
- ZigbeeDoorLockSubscriberLockEvent_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SUBSCRIBE_LOCK_EVENT: {
+ ZigbeeZclDoorLockSubscriberLockEvent_t *req = NULL;
- req = (ZigbeeDoorLockSubscriberLockEvent_t *)request->request_data;
+ req = (ZigbeeZclDoorLockSubscriberLockEvent_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_DOOR_LOCK_OPS_SET_DOOR_LOCK_PIN: {
- ZigbeeDoorLockSetDoorLockPin_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SET_DOOR_LOCK_PIN: {
+ ZigbeeZclDoorLockSetDoorLockPin_t *req = NULL;
- req = (ZigbeeDoorLockSetDoorLockPin_t *)request->request_data;
+ req = (ZigbeeZclDoorLockSetDoorLockPin_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_DOOR_LOCK_OPS_SET_DOOR_LOCK: {
- ZigbeeDoorLockSetDoorLock_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_SET_DOOR_LOCK: {
+ ZigbeeZclDoorLockSetDoorLock_t *req = NULL;
- req = (ZigbeeDoorLockSetDoorLock_t *)request->request_data;
+ req = (ZigbeeZclDoorLockSetDoorLock_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_DOOR_LOCK_OPS_GET_LOCK_STATE: {
- ZigbeeDoorLockGetDoorLock_t *req = NULL;
+ case ZBLIB_ZCL_DOOR_LOCK_OPS_GET_LOCK_STATE: {
+ ZigbeeZclDoorLockGetDoorLock_t *req = NULL;
- req = (ZigbeeDoorLockGetDoorLock_t *)request->request_data;
+ req = (ZigbeeZclDoorLockGetDoorLock_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_fan_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_fan_control_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_FAN_CONTROL_OPS_SET_FAN_MODE: {
- ZigbeeFanControlSetFanMode_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_SET_FAN_MODE: {
+ ZigbeeZclFanControlSetFanMode_t *req = NULL;
- req = (ZigbeeFanControlSetFanMode_t *)request->request_data;
+ req = (ZigbeeZclFanControlSetFanMode_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_FAN_CONTROL_OPS_GET_FAN_MODE: {
- ZigbeeFanControlGetFanMode_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_GET_FAN_MODE: {
+ ZigbeeZclFanControlGetFanMode_t *req = NULL;
- req = (ZigbeeFanControlGetFanMode_t *)request->request_data;
+ req = (ZigbeeZclFanControlGetFanMode_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_FAN_CONTROL_OPS_SET_FAN_MODE_SEQUENCE: {
- ZigbeeFanControlSetFanModeSequence_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_SET_FAN_MODE_SEQUENCE: {
+ ZigbeeZclFanControlSetFanModeSequence_t *req = NULL;
- req = (ZigbeeFanControlSetFanModeSequence_t *)request->request_data;
+ req = (ZigbeeZclFanControlSetFanModeSequence_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_FAN_CONTROL_OPS_GET_FAN_MODE_SEQUENCE: {
- ZigbeeFanControlGetFanModeSequence_t *req = NULL;
+ case ZBLIB_ZCL_FAN_CONTROL_OPS_GET_FAN_MODE_SEQUENCE: {
+ ZigbeeZclFanControlGetFanModeSequence_t *req = NULL;
- req = (ZigbeeFanControlGetFanModeSequence_t *)request->request_data;
+ req = (ZigbeeZclFanControlGetFanModeSequence_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_level_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_level_control_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL: {
- ZigbeeLevelControlMoveToLevel_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL: {
+ ZigbeeZclLevelControlMoveToLevel_t *req = NULL;
- req = (ZigbeeLevelControlMoveToLevel_t *)request->request_data;
+ req = (ZigbeeZclLevelControlMoveToLevel_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE: {
- ZigbeeLevelControlMove_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE: {
+ ZigbeeZclLevelControlMove_t *req = NULL;
- req = (ZigbeeLevelControlMove_t *)request->request_data;
+ req = (ZigbeeZclLevelControlMove_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STEP: {
- ZigbeeLevelControlStep_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STEP: {
+ ZigbeeZclLevelControlStep_t *req = NULL;
- req = (ZigbeeLevelControlStep_t *)request->request_data;
+ req = (ZigbeeZclLevelControlStep_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL_WITH_ON_OFF: {
- ZigbeeLevelControlMoveToLevelWithOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_TO_LEVEL_WITH_ON_OFF: {
+ ZigbeeZclLevelControlMoveToLevelWithOnOff_t *req = NULL;
- req = (ZigbeeLevelControlMoveToLevelWithOnOff_t *)request->request_data;
+ req = (ZigbeeZclLevelControlMoveToLevelWithOnOff_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_MOVE_WITH_ON_OFF: {
- ZigbeeLevelControlMoveOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_MOVE_WITH_ON_OFF: {
+ ZigbeeZclLevelControlMoveWithOnOff_t *req = NULL;
- req = (ZigbeeLevelControlMoveOnOff_t *)request->request_data;
+ req = (ZigbeeZclLevelControlMoveWithOnOff_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STEP_WITH_ON_OFF: {
- ZigbeeLevelControlStepWithOnOff_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STEP_WITH_ON_OFF: {
+ ZigbeeZclLevelControlStepWithOnOff_t *req = NULL;
- req = (ZigbeeLevelControlStepWithOnOff_t *)request->request_data;
+ req = (ZigbeeZclLevelControlStepWithOnOff_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_LEVEL_CONTROL_OPS_STOP: {
- ZigbeeLevelControlStop_t *req = NULL;
+ case ZBLIB_ZCL_LEVEL_CONTROL_OPS_STOP: {
+ ZigbeeZclLevelControlStop_t *req = NULL;
- req = (ZigbeeLevelControlStop_t *)request->request_data;
+ req = (ZigbeeZclLevelControlStop_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_on_off_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_on_off_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ON_OFF_OPS_SET_ON_OFF: {
- ZigbeeOnOffSetOnOff_t *req = NULL;
+ case ZBLIB_ZCL_ON_OFF_OPS_SET_ON_OFF: {
+ ZigbeeZclOnOffSetOnOff_t *req = NULL;
- req = (ZigbeeOnOffSetOnOff_t *)request->request_data;
+ req = (ZigbeeZclOnOffSetOnOff_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ON_OFF_OPS_GET_ON_OFF_STATE: {
- ZigbeeOnOffGetOnOffState_t *req = NULL;
+ case ZBLIB_ZCL_ON_OFF_OPS_GET_ON_OFF_STATE: {
+ ZigbeeZclOnOffGetOnOffState_t *req = NULL;
- req = (ZigbeeOnOffGetOnOffState_t *)request->request_data;
+ req = (ZigbeeZclOnOffGetOnOffState_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_thermostat_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_thermostat_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_THERMOSTAT_OPS_GET_LOCAL_TEMP: {
- ZigbeeThermostatGetLocalTemp_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_GET_LOCAL_TEMP: {
+ ZigbeeZclThermostatGetLocalTemp_t *req = NULL;
- req = (ZigbeeThermostatGetLocalTemp_t *)request->request_data;
+ req = (ZigbeeZclThermostatGetLocalTemp_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_THERMOSTAT_OPS_GET_WEEKLY_SCHEDULE: {
- ZigbeeThermostatGetWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_GET_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatGetWeeklySchedule_t *req = NULL;
- req = (ZigbeeThermostatGetWeeklySchedule_t *)request->request_data;
+ req = (ZigbeeZclThermostatGetWeeklySchedule_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_THERMOSTAT_OPS_SET_WEEKLY_SCHEDULE: {
- ZigbeeThermostatSetWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_SET_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatSetWeeklySchedule_t *req = NULL;
- req = (ZigbeeThermostatSetWeeklySchedule_t *)request->request_data;
+ req = (ZigbeeZclThermostatSetWeeklySchedule_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_THERMOSTAT_OPS_CLEAR_WEEKLY_SCHEDULE: {
- ZigbeeThermostatClearWeeklySchedule_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_CLEAR_WEEKLY_SCHEDULE: {
+ ZigbeeZclThermostatClearWeeklySchedule_t *req = NULL;
- req = (ZigbeeThermostatClearWeeklySchedule_t *)request->request_data;
+ req = (ZigbeeZclThermostatClearWeeklySchedule_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_THERMOSTAT_OPS_SETPOINT_RAISE_LOWER: {
- ZigbeeThermostatSetpointRaiseLower_t *req = NULL;
+ case ZBLIB_ZCL_THERMOSTAT_OPS_SETPOINT_RAISE_LOWER: {
+ ZigbeeZclThermostatSetpointRaiseLower_t *req = NULL;
- req = (ZigbeeThermostatSetpointRaiseLower_t *)request->request_data;
+ req = (ZigbeeZclThermostatSetpointRaiseLower_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zclbasic_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_basic_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLBASIC_CONTROL_OPS_RESET_FACTORY_DEFAULT: {
- ZigbeeZclbasicControlResetFactoryDefault_t *req = NULL;
+ case ZBLIB_ZCL_BASIC_OPS_RESET_FACTORY_DEFAULT: {
+ ZigbeeZclBasicResetFactoryDefault_t *req = NULL;
- req = (ZigbeeZclbasicControlResetFactoryDefault_t *)request->request_data;
+ req = (ZigbeeZclBasicResetFactoryDefault_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zclglobal_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_global_control_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_REQ: {
- ZigbeeZclglobalControlReadAttributesRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_REQ: {
+ ZigbeeZclGlobalControlReadAttributesRequest_t *req = NULL;
- req = (ZigbeeZclglobalControlReadAttributesRequest_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlReadAttributesRequest_t *)request->request_data;
if (NULL != req) {
g_free(req->attribute_id);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ: {
- ZigbeeZclglobalControlWriteAttributesRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ: {
+ ZigbeeZclGlobalControlWriteAttributesRequest_t *req = NULL;
- req = (ZigbeeZclglobalControlWriteAttributesRequest_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlWriteAttributesRequest_t *)request->request_data;
if (NULL != req) {
g_free(req->write_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ: {
- ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ: {
+ ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *req = NULL;
- req = (ZigbeeZclglobalControlWriteAttributesUndividedRequest_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t *)request->request_data;
if (NULL != req) {
g_free(req->write_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP: {
- ZigbeeZclglobalControlWriteAttributesNoResponse_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP: {
+ ZigbeeZclGlobalControlWriteAttributesNoResponse_t *req = NULL;
- req = (ZigbeeZclglobalControlWriteAttributesNoResponse_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlWriteAttributesNoResponse_t *)request->request_data;
if (NULL != req) {
g_free(req->write_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED: {
- ZigbeeZclglobalControlWriteAttributesStructed_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED: {
+ ZigbeeZclGlobalControlWriteAttributesStructed_t *req = NULL;
- req = (ZigbeeZclglobalControlWriteAttributesStructed_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlWriteAttributesStructed_t *)request->request_data;
if (NULL != req) {
g_free(req->write_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED: {
- ZigbeeZclglobalControlReadAttributesStructed_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED: {
+ ZigbeeZclGlobalControlReadAttributesStructed_t *req = NULL;
- req = (ZigbeeZclglobalControlReadAttributesStructed_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlReadAttributesStructed_t *)request->request_data;
if (NULL != req) {
g_free(req->read_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ: {
- ZigbeeZclglobalControlConfigureReportingReq_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ: {
+ ZigbeeZclGlobalControlConfigureReportingReq_t *req = NULL;
- req = (ZigbeeZclglobalControlConfigureReportingReq_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlConfigureReportingReq_t *)request->request_data;
if (NULL != req) {
g_free(req->read_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING: {
- ZigbeeZclglobalControlReadConfigureReporting_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING: {
+ ZigbeeZclGlobalControlReadConfigureReporting_t *req = NULL;
- req = (ZigbeeZclglobalControlReadConfigureReporting_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlReadConfigureReporting_t *)request->request_data;
if (NULL != req) {
g_free(req->read_records);
g_free(req);
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES: {
- ZigbeeZclglobalControlDiscoverAttributes_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES: {
+ ZigbeeZclGlobalControlDiscoverAttributes_t *req = NULL;
- req = (ZigbeeZclglobalControlDiscoverAttributes_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlDiscoverAttributes_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES_EXTENDED: {
- ZigbeeZclglobalControlDiscoverAttributesExtended_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES_EXTENDED: {
+ ZigbeeZclGlobalControlDiscoverAttributesExtended_t *req = NULL;
- req = (ZigbeeZclglobalControlDiscoverAttributesExtended_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlDiscoverAttributesExtended_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_RECEIVED: {
- ZigbeeZclglobalControlDiscoverCommandsReceived_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_RECEIVED: {
+ ZigbeeZclGlobalControlDiscoverCommandsReceived_t *req = NULL;
- req = (ZigbeeZclglobalControlDiscoverCommandsReceived_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlDiscoverCommandsReceived_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_GENERATED: {
- ZigbeeZclglobalControlDiscoverCommandsGenerated_t *req = NULL;
+ case ZBLIB_ZCL_GLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_GENERATED: {
+ ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *req = NULL;
- req = (ZigbeeZclglobalControlDiscoverCommandsGenerated_t *)request->request_data;
+ req = (ZigbeeZclGlobalControlDiscoverCommandsGenerated_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zclias_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_ias_zone_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLIAS_CONTROL_OPS_ENROLL_RESPONSE: {
- ZigbeeZcliasControlEnrolResponse_t *req = NULL;
+ case ZBLIB_ZCL_IAS_ZONE_OPS_ENROLL_RESPONSE: {
+ ZigbeeZclIasZoneEnrollResponse_t *req = NULL;
- req = (ZigbeeZcliasControlEnrolResponse_t *)request->request_data;
+ req = (ZigbeeZclIasZoneEnrollResponse_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zclidentify_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_identify_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCLIDENTIFY_CONTROL_OPS_IDENTIFY: {
- ZigbeeZclidentifyControlIdentify_t *req = NULL;
+ case ZBLIB_ZCL_IDENTIFY_OPS_IDENTIFY: {
+ ZigbeeZclIdentifyIdentify_t *req = NULL;
- req = (ZigbeeZclidentifyControlIdentify_t *)request->request_data;
+ req = (ZigbeeZclIdentifyIdentify_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCLIDENTIFY_CONTROL_OPS_QUERY: {
- ZigbeeZclidentifyControlQuery_t *req = NULL;
+ case ZBLIB_ZCL_IDENTIFY_OPS_QUERY: {
+ ZigbeeZclIdentifyQuery_t *req = NULL;
- req = (ZigbeeZclidentifyControlQuery_t *)request->request_data;
+ req = (ZigbeeZclIdentifyQuery_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zcl_color_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zcl_color_control_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_HUE: {
- ZigbeeZclColorMoveToHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_HUE: {
+ ZigbeeZclColorControlMoveToHue_t *req = NULL;
- req = (ZigbeeZclColorMoveToHue_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveToHue_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_HUE: {
- ZigbeeZclColorMoveHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_HUE: {
+ ZigbeeZclColorControlMoveHue_t *req = NULL;
- req = (ZigbeeZclColorMoveHue_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveHue_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_HUE: {
- ZigbeeZclColorStepHue_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_HUE: {
+ ZigbeeZclColorControlStepHue_t *req = NULL;
- req = (ZigbeeZclColorStepHue_t *)request->request_data;
+ req = (ZigbeeZclColorControlStepHue_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_STAURATION: {
- ZigbeeZclColorMoveToSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_STAURATION: {
+ ZigbeeZclColorControlMoveToSaturation_t *req = NULL;
- req = (ZigbeeZclColorMoveToSaturation_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveToSaturation_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_STAURATION: {
- ZigbeeZclColorMoveSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_STAURATION: {
+ ZigbeeZclColorControlMoveSaturation_t *req = NULL;
- req = (ZigbeeZclColorMoveSaturation_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveSaturation_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_STAURATION: {
- ZigbeeZclColorStepSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_STAURATION: {
+ ZigbeeZclColorControlStepSaturation_t *req = NULL;
- req = (ZigbeeZclColorStepSaturation_t *)request->request_data;
+ req = (ZigbeeZclColorControlStepSaturation_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_HUE_AND_SATURATION: {
- ZigbeeZclColorMoveToHueAndSaturation_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_HUE_AND_SATURATION: {
+ ZigbeeZclColorControlMoveToHueAndSaturation_t *req = NULL;
- req = (ZigbeeZclColorMoveToHueAndSaturation_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveToHueAndSaturation_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_TO_COLOR: {
- ZigbeeZclColorMoveToColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_TO_COLOR: {
+ ZigbeeZclColorControlMoveToColor_t *req = NULL;
- req = (ZigbeeZclColorMoveToColor_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveToColor_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_COLOR: {
- ZigbeeZclColorMoveColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_COLOR: {
+ ZigbeeZclColorControlMoveColor_t *req = NULL;
- req = (ZigbeeZclColorMoveColor_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveColor_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_STEP_COLOR: {
- ZigbeeZclColorStepColor_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_STEP_COLOR: {
+ ZigbeeZclColorControlStepColor_t *req = NULL;
- req = (ZigbeeZclColorStepColor_t *)request->request_data;
+ req = (ZigbeeZclColorControlStepColor_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZCL_COLOR_OPS_MOVE_COLOR_TEMPERATURE: {
- ZigbeeZclColorMoveColorTemperature_t *req = NULL;
+ case ZBLIB_ZCL_COLOR_CONTROL_OPS_MOVE_COLOR_TEMPERATURE: {
+ ZigbeeZclColorControlMoveColorTemperature_t *req = NULL;
- req = (ZigbeeZclColorMoveColorTemperature_t *)request->request_data;
+ req = (ZigbeeZclColorControlMoveColorTemperature_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
}
-static void __zblib_request_free_zdodev_control_request_data(ZigBeeRequest *request,
+static void __zblib_request_free_zdo_dev_control_request_data(ZigBeeRequest *request,
guint request_type)
{
guint ops_id;
/* Fetch ops ID */
ops_id = __zblib_request_get_ops_id(request_type);
switch (ops_id) {
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_ADDR_REQ: {
- ZigbeeZdodevControlNwkAddrReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_ADDR_REQ: {
+ ZigbeeZdoDevControlNwkAddrReq_t *req = NULL;
- req = (ZigbeeZdodevControlNwkAddrReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlNwkAddrReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MATCHED_DESCRIPTOR_REQ: {
- ZigbeeZdodevControlMatchedDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MATCHED_DESCRIPTOR_REQ: {
+ ZigbeeZdoDevControlMatchedDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlMatchedDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlMatchedDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req->in_cl);
g_free(req->out_cl);
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_IEEE_ADDR_REQ: {
- ZigbeeZdodevControlIeeeAddrReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_IEEE_ADDR_REQ: {
+ ZigbeeZdoDevControlIeeeAddrReq_t *req = NULL;
- req = (ZigbeeZdodevControlIeeeAddrReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlIeeeAddrReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_ACTIVE_EP_REQ: {
- ZigbeeZdodevControlActiveEpReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_ACTIVE_EP_REQ: {
+ ZigbeeZdoDevControlActiveEpReq_t *req = NULL;
- req = (ZigbeeZdodevControlActiveEpReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlActiveEpReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NODE_DESC_REQ: {
- ZigbeeZdodevControlNodeDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NODE_DESC_REQ: {
+ ZigbeeZdoDevControlNodeDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlNodeDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlNodeDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_POWER_DESC_REQ: {
- ZigbeeZdodevControlPowerDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_POWER_DESC_REQ: {
+ ZigbeeZdoDevControlPowerDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlPowerDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlPowerDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_COMPLEX_DESC_REQ: {
- ZigbeeZdodevControlComplexDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_COMPLEX_DESC_REQ: {
+ ZigbeeZdoDevControlComplexDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlComplexDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlComplexDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_USER_DESC_REQ: {
- ZigbeeZdodevControlUserDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_USER_DESC_REQ: {
+ ZigbeeZdoDevControlUserDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlUserDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlUserDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_USER_DESC_SET_REQ: {
- ZigbeeZdodevControlUserDescriptorSetReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_USER_DESC_SET_REQ: {
+ ZigbeeZdoDevControlUserDescriptorSetReq_t *req = NULL;
- req = (ZigbeeZdodevControlUserDescriptorSetReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlUserDescriptorSetReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_DEVICE_ANNOUNCE: {
- ZigbeeZdodevControlDeviceAnnounce_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_DEVICE_ANNOUNCE: {
+ ZigbeeZdoDevControlDeviceAnnounce_t *req = NULL;
- req = (ZigbeeZdodevControlDeviceAnnounce_t *)request->request_data;
+ req = (ZigbeeZdoDevControlDeviceAnnounce_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_SIMPLE_DESC_REQ: {
- ZigbeeZdodevControlSimpleDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_SIMPLE_DESC_REQ: {
+ ZigbeeZdoDevControlSimpleDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlSimpleDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlSimpleDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_LQI_REQ: {
- ZigbeeZdodevControlMgmtLqiReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_LQI_REQ: {
+ ZigbeeZdoDevControlMgmtLqiReq_t *req = NULL;
- req = (ZigbeeZdodevControlMgmtLqiReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlMgmtLqiReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_RTG_REQ: {
- ZigbeeZdodevControlMgmtRtgReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_RTG_REQ: {
+ ZigbeeZdoDevControlMgmtRtgReq_t *req = NULL;
- req = (ZigbeeZdodevControlMgmtRtgReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlMgmtRtgReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_BIND_REQ: {
- ZigbeeZdodevControlMgmtBindReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_BIND_REQ: {
+ ZigbeeZdoDevControlMgmtBindReq_t *req = NULL;
- req = (ZigbeeZdodevControlMgmtBindReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlMgmtBindReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_MGMT_PERMIT_JOIN_REQ: {
- ZigbeeZdodevControlMgmtPermitJoinReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_MGMT_PERMIT_JOIN_REQ: {
+ ZigbeeZdoDevControlMgmtPermitJoinReq_t *req = NULL;
- req = (ZigbeeZdodevControlMgmtPermitJoinReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlMgmtPermitJoinReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_UPDATE_REQ: {
- ZigbeeZdodevControlNwkUpdateReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_UPDATE_REQ: {
+ ZigbeeZdoDevControlNwkUpdateReq_t *req = NULL;
- req = (ZigbeeZdodevControlNwkUpdateReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlNwkUpdateReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
}
break;
- case ZBLIB_ZDODEV_CONTROL_OPS_NWK_DISC_REQ: {
- ZigbeeZdodevControlNwkDescriptorReq_t *req = NULL;
+ case ZBLIB_ZDO_DEV_CONTROL_OPS_NWK_DISC_REQ: {
+ ZigbeeZdoDevControlNwkDescriptorReq_t *req = NULL;
- req = (ZigbeeZdodevControlNwkDescriptorReq_t *)request->request_data;
+ req = (ZigbeeZdoDevControlNwkDescriptorReq_t *)request->request_data;
if (NULL != req) {
g_free(req);
}
/* Fetch driver type */
driver_type = __zblib_request_get_driver_type(request_type);
switch (driver_type) {
- case ZBLIB_DRIVER_TYPE_ALARM: {
- __zblib_request_free_alarm_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_ALARM: {
+ __zblib_request_free_zcl_alarm_request_data(request, request_type);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_DOOR_LOCK: {
- __zblib_request_free_door_lock_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_DOOR_LOCK: {
+ __zblib_request_free_zcl_door_lock_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_FAN_CONTROL: {
- __zblib_request_free_fan_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_FAN_CONTROL: {
+ __zblib_request_free_zcl_fan_control_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_LEVEL_CONTROL: {
- __zblib_request_free_level_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_LEVEL_CONTROL: {
+ __zblib_request_free_zcl_level_control_request_data(request, request_type);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_ON_OFF: {
- __zblib_request_free_on_off_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_ON_OFF: {
+ __zblib_request_free_zcl_on_off_request_data(request, request_type);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_THERMOSTAT: {
- __zblib_request_free_thermostat_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_THERMOSTAT: {
+ __zblib_request_free_zcl_thermostat_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLBASIC_CONTROL: {
- __zblib_request_free_zclbasic_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_BASIC: {
+ __zblib_request_free_zcl_basic_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLGLOBAL_CONTROL: {
- __zblib_request_free_zclglobal_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_GLOBAL_CONTROL: {
+ __zblib_request_free_zcl_global_control_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLIAS_CONTROL: {
- __zblib_request_free_zclias_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_IAS_ZONE: {
+ __zblib_request_free_zcl_ias_zone_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCLIDENTIFY_CONTROL: {
- __zblib_request_free_zclidentify_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_IDENTIFY: {
+ __zblib_request_free_zcl_identify_request_data(request, request_type);
}
break;
- case ZBLIB_DRIVER_TYPE_ZCL_COLOR: {
- __zblib_request_free_zcl_color_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZCL_COLOR_CONTROL: {
+ __zblib_request_free_zcl_color_control_request_data(request, request_type);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_ZDODEV_CONTROL: {
- __zblib_request_free_zdodev_control_request_data(request, request_type);
+ case ZBLIB_DRIVER_TYPE_ZDO_DEV_CONTROL: {
+ __zblib_request_free_zdo_dev_control_request_data(request, request_type);
}
break;
}
break;
- case ZBLIB_DRIVER_TYPE_NONE: /* Fallthrough */
+ case ZBLIB_DRIVER_TYPE_NONE: /* Fall through */
default: {
Z_LOGE("Unhandled driver type: [%d]", driver_type);
}
Z_LOGE("zblib_service_genrate_request_id failed!");
/* Free resources */
+ __zblib_request_free_request_data(request);
g_free(request);
return ZIGBEE_REQUEST_INVALID_REQUEST_ID;
Z_LOGE("zblib_service_ref_request_hash_table failed!");
/* Free resources */
+ __zblib_request_free_request_data(request);
g_free(request);
return ZIGBEE_REQUEST_INVALID_REQUEST_ID;
ZigBeeService *service = NULL;
ZigBeeRequest *request = NULL;
- zblib_check_null_ret_error("request", request, FALSE);
+ zblib_check_null_ret_error("service_interface", service_interface, FALSE);
/* Fetch service */
service = zblib_service_interface_ref_service(service_interface);
ZigBeeService *service = NULL;
ZigBeeRequest *request = NULL;
- zblib_check_null_ret_error("request", request, NULL);
+ zblib_check_null_ret_error("service_interface", service_interface, NULL);
/* Fetch service */
service = zblib_service_interface_ref_service(service_interface);
return request->request_data;
}
+gpointer zblib_request_ref_request_data_by_id(ZigBeeService *service,
+ guint request_id)
+{
+ ZigBeeRequest *request = NULL;
+
+ /* Fetch request based on request_id */
+ request = __zblib_request_ref_request_by_by_request_id(service, request_id);
+ if (NULL == request) {
+ Z_LOGE("No request available for request_id: [%d]", request_id);
+ return NULL;
+ }
+
+ return request->request_data;
+}
+
guint zblib_request_generate_request_type(ZblibDriverType_e driver_type,
guint ops_id)
{