extern void __gcov_flush(void);
#endif
+/* LCOV_EXCL_START */
static gboolean _request_terminate(gpointer user_data)
{
NOTUSED(user_data);
return G_SOURCE_REMOVE;
}
+/* LCOV_EXCL_STOP */
int main(int arg, char **argv)
{
/* Initialize ZigBee service interface layer */
ret = zigbee_service_interface_init(service);
if (G_UNLIKELY(FALSE == ret)) {
+ /* LCOV_EXCL_START */
Z_LOGE("zigbee_service_interface_init failed!");
goto END;
+ /* LCOV_EXCL_STOP */
}
/* Initialize ZigBee service */
ret = zigbee_service_init(service);
if (G_UNLIKELY(FALSE == ret)) {
+ /* LCOV_EXCL_START */
Z_LOGE("zigbee_service_init failed!");
/* Minimum mainloop time is required to notify the result */
g_timeout_add(100, _request_terminate, NULL);
+ /* LCOV_EXCL_STOP */
}
/* Run ZigBee service */
Z_LOGI("service mainloop start");
ret = zblib_service_run(service);
if (G_UNLIKELY(FALSE == ret)) {
+ /* LCOV_EXCL_START */
Z_LOGE("Run service failed!");
ret_code = EXIT_FAILURE;
+ /* LCOV_EXCL_STOP */
}
END:
ZigBeeService *service = zblib_service_interface_ref_service(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("Unexpected invalid parameter !");
return;
+ /* LCOV_EXCL_STOP */
}
if (result) {
zigbee_manager_emit_zigbee_state(custom_data->zigbee_mgr, result);
} else {
/* ZigBee state will be emitted on bus termination */
- zblib_service_exit(service);
+ zblib_service_exit(service); // LCOV_EXCL_LINE
}
}
ZigbeeCustomData_t *custom_data = zblib_service_interface_ref_user_data(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
return TRUE;
+ /* LCOV_EXCL_STOP */
}
zigbee_manager_complete_enable(zigbee_mgr, invocation);
return TRUE;
}
+/* LCOV_EXCL_START */
static gboolean on_manager_get_zigbee_state(ZigbeeManager *zigbee_mgr,
GDBusMethodInvocation *invocation, gpointer user_data)
{
return TRUE;
}
+/* LCOV_EXCL_STOP */
static void zigbee_service_dbus_interface_initialize_interfaces(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
guint notification_id;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
/* Extract driver_type */
switch (driver_type) {
case ZBLIB_DRIVER_TYPE_ZCL_ALARM: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_alarm_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_CUSTOM: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_custom_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_DOOR_LOCK: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_door_lock_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_FAN_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_fan_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_LEVEL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_level_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_MFGLIB_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_mfglib_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_ON_OFF: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_on_off_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_SERVICE: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_service_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_THERMOSTAT: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_thermostat_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_BASIC: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_basic_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_GLOBAL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_global_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
break;
case ZBLIB_DRIVER_TYPE_ZCL_IDENTIFY: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_identify_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_COLOR_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_color_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_GROUP: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_group_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_POLL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_poll_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_SCENE: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_scene_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZDO_DEV_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zdo_dev_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZDO_BIND: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zdo_bind_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
Z_LOGD("Firmware update result : [%s]", ((*rsp) ? "Succeed" : "Failed"));
_notify_zigbee_state(service_interface, *rsp);
} else
- Z_LOGE("Unhandled notification id: [%d]", notification_id);
+ Z_LOGE("Unhandled notification id: [%d]", notification_id); // LCOV_EXCL_LINE
}
break;
case ZBLIB_DRIVER_TYPE_NONE: /* Fall through */
default: {
- Z_LOGE("Unhandled driver type: [%d]", driver_type);
+ Z_LOGE("Unhandled driver type: [%d]", driver_type); // LCOV_EXCL_LINE
}
- break;
+ break; // LCOV_EXCL_LINE
}
}
+/* LCOV_EXCL_START */
static void zigbee_on_name_lost(GDBusConnection *connection,
const gchar *name, gpointer user_data)
{
/* Bus name is 'lost' */
custom_data->name_acquired = FALSE;
}
+/* LCOV_EXCL_STOP */
static void zigbee_on_name_acquired(GDBusConnection *connection,
const gchar *name, gpointer user_data)
Z_LOGI("'%s' - [BUS Acquired]", name);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
service = zblib_service_interface_ref_service(service_interface);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
custom_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS service interface custom_data is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
/*
*/
zigbee_object = g_hash_table_lookup(custom_data->objects, path);
if (zigbee_object) {
+ /* LCOV_EXCL_START */
Z_LOGW("ZigBee D-BUS interface object already created (object: %p)", zigbee_object);
goto OUT;
+ /* LCOV_EXCL_STOP */
}
/*
gboolean ret;
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/*
service_interface = zblib_service_interface_new(service,
ZIGBEE_DBUS_SERVICE_INTERFACE_NAME);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("Create D-BUS service interface failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_interface_set_noti_cb(service_interface,
zigbee_service_dbus_interface_noti_cb, NULL);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Set service interface notification callback failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_add_service_interface(service,
service_interface);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Add D-BUS service interface failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_interface_link_user_data(service_interface,
interface_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Link D-BUS service interface data failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/* HASH table for maintaining 'objects' list */
return TRUE;
EXIT:
+ /* LCOV_EXCL_START */
g_free(interface_data);
/*
service_interface);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/**< Zigbee service dbus interface de-initialization */
gboolean ret;
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
service_interface = zblib_service_ref_service_interface(service,
ZIGBEE_DBUS_SERVICE_INTERFACE_NAME);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS service interface not found!");
return;
+ /* LCOV_EXCL_STOP */
}
interface_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
if (NULL == interface_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS interface data not found!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/* Emit zigbee_state - disabled */
ret = zblib_service_remove_service_interface(service,
service_interface);
if (FALSE == ret)
- Z_LOGE("Remove service interface failed!");
+ Z_LOGE("Remove service interface failed!"); // LCOV_EXCL_LINE
/*
* Free Service interface object
#include <zblib_driver_custom.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_custom(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeCustom should be dereferenced */
g_object_unref(custom_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_custom_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeCustom *custom_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
custom_object = zigbee_custom_skeleton_new();
#include <zblib_driver_mfglib_control.h>
+/* LCOV_EXCL_START */
static void on_mfglib_control_start_resp(ZigBeeServiceInterface *service_interface,
guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
{
NOT_USED(noti_data_len);
NOT_USED(noti_cb_data);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_mfglib_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeMfglib_control *mfglib_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
mfglib_control_object = zigbee_mfglib_control_skeleton_new();
#include <zblib_driver_service.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_service(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeService should be dereferenced */
g_object_unref(service_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_service_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeService *service_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
service_object = zigbee_service_skeleton_new();
#include <zblib_driver_zcl_alarm.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_alarm(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_alarm should be dereferenced */
g_object_unref(alarm_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_alarm_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_alarm *alarm_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
alarm_object = zigbee_zcl_alarm_skeleton_new();
#include <zblib_driver_zcl_basic.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_basic(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_basic should be dereferenced */
g_object_unref(basic_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_basic_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_basic *zclbasic_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zclbasic_control_object = zigbee_zcl_basic_skeleton_new();
#include <zblib_driver_zcl_color_control.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_color_control(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeZcl_color_control should be dereferenced */
g_object_unref(color_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_color_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_color_control *zcl_color_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zcl_color_object = zigbee_zcl_color_control_skeleton_new();
#include <zblib_driver_zcl_door_lock.h>
+/* LCOV_EXCL_START */
static void on_door_lock_subscribe_lock_event_resp(ZigBeeServiceInterface *service_interface,
guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
{
NOT_USED(noti_data_len);
NOT_USED(noti_cb_data);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_door_lock_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_door_lock *door_lock_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
door_lock_object = zigbee_zcl_door_lock_skeleton_new();
#include <zblib_driver_zcl_fan_control.h>
+/* LCOV_EXCL_START */
static void on_fan_control_set_fan_mode_resp(ZigBeeServiceInterface *service_interface,
guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
{
NOT_USED(noti_data_len);
NOT_USED(noti_cb_data);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_fan_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_fan_control *fan_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
fan_control_object = zigbee_zcl_fan_control_skeleton_new();
#include <zblib_driver_zcl_global_control.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_global_control(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_global_control should be dereferenced */
g_object_unref(global_control_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_global_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_global_control *zclglobal_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zclglobal_control_object = zigbee_zcl_global_control_skeleton_new();
#include <zblib_driver_zcl_group.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_group(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_group should be dereferenced */
g_object_unref(group_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_group_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_group *zcl_group_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zcl_group_object = zigbee_zcl_group_skeleton_new();
#include <zblib_driver_zcl_ias_zone.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_ias_zone(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_ias_zone should be dereferenced */
g_object_unref(ias_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_ias_zone_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_ias_zone *zclias_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zclias_control_object = zigbee_zcl_ias_zone_skeleton_new();
#include <zblib_driver_zcl_identify.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_identify(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZcl_identify should be dereferenced */
g_object_unref(id_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_identify_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_identify *zclidentify_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zclidentify_control_object = zigbee_zcl_identify_skeleton_new();
#include <zblib_driver_zcl_level_control.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_level_control(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeZcl_level_control should be dereferenced */
g_object_unref(level_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_level_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_level_control *level_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
level_control_object = zigbee_zcl_level_control_skeleton_new();
#include <zblib_driver_zcl_on_off.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_on_off(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
ZigbeeCustomData_t *custom_data = NULL;
ZigbeeZcl_on_off *on_off_object = NULL;
+ Z_LOGE("KSR 2");
+
custom_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
if (NULL == custom_data) {
Z_LOGE("D-BUS service interface custom_data is NULL!");
NOT_USED(service_interface);
NOT_USED(request_id);
+ Z_LOGE("KSR 1");
+
if (NULL == resp_data || 0 == resp_data_len) {
Z_LOGE("resp_data is null");
g_free(cb_data);
memset(&req, 0x0, sizeof(ZigbeeZclOnOffSetOnOff_t));
+ Z_LOGE("KSR 3");
+
/* Update request structure */
req.node_id = node_id;
req.endpoint = endpoint;
NOT_USED(service_interface);
NOT_USED(request_id);
+ Z_LOGE("KSR 4");
+
if (NULL == resp_data || 0 == resp_data_len) {
Z_LOGE("resp_data is null");
g_free(cb_data);
gboolean ret;
+ Z_LOGE("KSR 5");
+
memset(&req, 0x0, sizeof(ZigbeeZclOnOffGetOnOffState_t));
/* Update request structure */
zblib_check_null_ret("service_interface", service_interface);
+ Z_LOGE("KSR 6");
+
if (NULL == noti_data || 0 == noti_data_len) {
Z_LOGE("noti_data is NULL");
return;
/* ZigbeeZcl_on_off should be dereferenced */
g_object_unref(on_off_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_on_off_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_on_off *on_off_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
on_off_object = zigbee_zcl_on_off_skeleton_new();
#include <zblib_driver_zcl_poll_control.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_poll_control(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeZcl_poll_control should be dereferenced */
g_object_unref(poll_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_poll_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_poll_control *zcl_poll_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zcl_poll_control_object = zigbee_zcl_poll_control_skeleton_new();
#include <zblib_driver_zcl_scene.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_scene(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeZcl_scene should be dereferenced */
g_object_unref(scene_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_scene_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_scene *zcl_scene_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zcl_scene_object = zigbee_zcl_scene_skeleton_new();
#include <zblib_driver_zcl_thermostat.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zcl_thermostat(
ZigBeeServiceInterface *service_interface)
{
g_object_unref(thermo_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zcl_thermostat_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZcl_thermostat *thermostat_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
thermostat_object = zigbee_zcl_thermostat_skeleton_new();
#include <zblib_driver_zdo_bind.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zdo_bind(
ZigBeeServiceInterface *service_interface)
{
/* ZigbeeZdo_bind should be dereferenced */
g_object_unref(bind_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zdo_bind_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZdo_bind *zdo_bind_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zdo_bind_object = zigbee_zdo_bind_skeleton_new();
#include <zblib_driver_zdo_dev_control.h>
+/* LCOV_EXCL_START */
static void *_service_interface_ref_zigbee_zdo_dev_control(ZigBeeServiceInterface *service_interface)
{
ZigbeeObjectSkeleton *zigbee_object = NULL;
/* ZigbeeZdo_dev_control should be dereferenced */
g_object_unref(dev_control_object);
}
+/* LCOV_EXCL_STOP */
gboolean zigbee_service_dbus_interface_zdo_dev_control_init(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
ZigbeeZdo_dev_control *zdodev_control_object;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
zdodev_control_object = zigbee_zdo_dev_control_skeleton_new();
gboolean ret;
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/* Initialize dbus interface */
ret = zigbee_service_dbus_interface_init(service);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zigbee_service_dbus_interface_init failed!!!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
return TRUE;
void zigbee_service_interface_deinit(ZigBeeService *service)
{
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
/* De-initialize dbus interface */
char user_data[0]; /* Additional user data base pointer */
};
+/* LCOV_EXCL_START */
ZigbeeServiceInterfaceRespCbData_t *
zigbee_service_dbus_interface_create_resp_cb_data(void *interface_object,
GDBusMethodInvocation *invocation,
return TRUE;
}
+/* LCOV_EXCL_STOP */
#include <glib.h>
#define zblib_check_null_ret_error(name, value, error) do { \
+ /* LCOV_EXCL_START */ \
if (G_UNLIKELY(NULL == (value))) { \
Z_LOGE("%s is NULL", name); \
return error; \
} \
+ /* LCOV_EXCL_STOP */ \
} while (FALSE)
#define zblib_check_null_ret(name, value) do { \
+ /* LCOV_EXCL_START */ \
if (G_UNLIKELY(NULL == (value))) { \
Z_LOGE("%s is NULL", name); \
return; \
} \
+ /* LCOV_EXCL_STOP */ \
} while (FALSE)
#define zblib_check_null_free_and_ret(name, value, data) do { \
+ /* LCOV_EXCL_START */ \
if (G_UNLIKELY(NULL == (value))) { \
Z_LOGE("%s is NULL", name); \
g_free(data); \
return; \
} \
+ /* LCOV_EXCL_STOP */ \
} while (FALSE)
#endif /* __ZIGBEE_LIB_COMMON_H__ */
ZblibDriverCustomOps_t *ops; /**< Operations */
} ZblibDriverCustomPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_custom_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_custom_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_custom_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_custom_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_custom_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverMfglibControlOps_t *ops; /**< Operations */
} ZblibDriverMfglibControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_mfglib_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_mfglib_control_free_hook(ZigBeeDriver *driver)
{
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_mfglib_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_mfglib_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_mfglib_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverServiceOps_t *ops; /**< Operations */
} ZblibDriverServicePrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_service_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_service_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_service_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_service_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_START */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_service_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclAlarmOps_t *ops; /**< Operations */
} ZblibDriverZclAlarmPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_alarm_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_alarm_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_alarm_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_alarm_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_alarm_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclBasicOps_t *ops; /**< Operations */
} ZblibDriverZclBasicPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_basic_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_basic_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_basic_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_basic_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_basic_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclColorControlOps_t *ops; /**< Operations */
} ZblibDriverZclColorControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_color_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_color_control_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_color_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_color_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_color_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclDoorLockOps_t *ops; /**< Operations */
} ZblibDriverZclDoorLockPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_door_lock_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_door_lock_free_hook(ZigBeeDriver *driver)
{
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_door_lock_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_door_lock_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_door_lock_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclFanControlOps_t *ops; /**< Operations */
} ZblibDriverZclFanControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_fan_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_fan_control_free_hook(ZigBeeDriver *driver)
{
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_fan_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_fan_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_fan_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclGlobalControlOps_t *ops; /**< Operations */
} ZblibDriverZclglobalControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_global_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_global_control_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_global_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_global_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_global_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclGroupOps_t *ops; /**< Operations */
} ZblibDriverZclGroupPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_group_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_group_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_group_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_group_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
-
+/* LCOV_EXCL_START */
void zblib_driver_zcl_group_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclIasZoneOps_t *ops; /**< Operations */
} ZblibDriverZclIasZonePrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_ias_zone_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_ias_zone_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_ias_zone_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_ias_zone_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_ias_zone_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclIdentifyOps_t *ops; /**< Operations */
} ZblibDriverZclIdentifyPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_identify_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_identify_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_identify_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_identify_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_identify_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclLevelControlOps_t *ops; /**< Operations */
} ZblibDriverZclLevelControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_level_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_level_control_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_level_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_level_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_level_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclOnOffOps_t *ops; /**< Operations */
} ZblibDriverZclOnOffPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_on_off_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_on_off_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_on_off_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_on_off_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_on_off_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclPollControlOps_t *ops; /**< Operations */
} ZblibDriverZclPollControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_poll_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_poll_control_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_poll_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_poll_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_poll_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclSceneOps_t *ops; /**< Operations */
} ZblibDriverZclScenePrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_scene_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_scene_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_scene_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_scene_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_scene_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZclThermostatOps_t *ops; /**< Operations */
} ZblibDriverZclThermostatPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zcl_thermostat_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zcl_thermostat_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zcl_thermostat_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zcl_thermostat_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zcl_thermostat_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZdoBindOps_t *ops; /**< Operations */
} ZblibDriverZdoBindPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zdo_bind_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zdo_bind_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zdo_bind_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zdo_bind_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zdo_bind_free(ZigBeeDriver *driver)
{
if (NULL == driver) {
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
ZblibDriverZdoDevControlOps_t *ops; /**< Operations */
} ZblibDriverZdoDevControlPrivData_t;
+/* LCOV_EXCL_START */
static gboolean __zblib_driver_zdo_dev_control_dispatcher(ZigBeeDriver *driver, guint request_id)
{
ZigBeeService *service = NULL;
return ret;
}
+/* LCOV_EXCL_STOP */
static void __zblib_driver_zdo_dev_control_free_hook(ZigBeeDriver *driver)
{
/* Link service to driver */
service = zblib_plugin_ref_service(plugin);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_plugin_ref_service failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
zblib_driver_link_service(driver, service);
/* Link private data to driver */
ret = zblib_driver_link_object(driver, priv_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_link_object failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set operations dispatcher function */
ret = zblib_driver_set_dispatcher(driver, __zblib_driver_zdo_dev_control_dispatcher);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_dispatcher failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Set free hook function */
ret = zblib_driver_set_free_hook(driver, __zblib_driver_zdo_dev_control_free_hook);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("zblib_driver_set_free_hook failed!");
/* Free allocated resources */
g_free(driver);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return driver;
}
+/* LCOV_EXCL_START */
void zblib_driver_zdo_dev_control_free(ZigBeeDriver *driver)
{
zblib_check_null_ret("driver", driver);
/* Free driver */
zblib_driver_free(driver);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
g_free(driver);
}
+/* LCOV_EXCL_START */
ZigBeeService *zblib_driver_ref_service(ZigBeeDriver *driver)
{
zblib_check_null_ret_error("driver", driver, NULL);
return driver->service;
}
+/* LCOV_EXCL_STOP */
gboolean zblib_driver_link_service(ZigBeeDriver *driver,
ZigBeeService *service)
return TRUE;
}
+/* LCOV_EXCL_START */
ZigBeePlugin *zblib_driver_ref_plugin(ZigBeeDriver *driver)
{
zblib_check_null_ret_error("driver", driver, NULL);
return driver->plugin;
}
+/* LCOV_EXCL_STOP */
gboolean zblib_driver_link_object(ZigBeeDriver *driver,
gpointer object)
return driver->driver_type;
}
+/* LCOV_EXCL_START */
gpointer zblib_driver_ref_request_data(ZigBeeDriver *driver,
guint request_id)
{
zblib_plugin_send_notification(plugin,
driver_noti_id, noti_data, noti_data_len);
}
+/* LCOV_EXCL_STOP */
\ No newline at end of file
int next = 0;
FILE *fp = fopen("/proc/uptime", "r");
if (NULL == fp) {
+ /* LCOV_EXCL_START */
Z_LOGE("fopen() failed");
return;
+ /* LCOV_EXCL_STOP */
}
if (fscanf(fp, "%f %f", &a, &b) != 1)
next = snprintf(buf, BUFFER_SIZE, "[UPTIME] [Not Set] ");
else
- next = snprintf(buf, BUFFER_SIZE, "[UPTIME] %f ", a);
+ next = snprintf(buf, BUFFER_SIZE, "[UPTIME] %f ", a); // LCOV_EXCL_LINE
fclose(fp);
if (next < 0)
return;
if (NULL == driver)
continue;
+ /* LCOV_EXCL_START */
zblib_driver_free(driver);
list->data = NULL;
+ /* LCOV_EXCL_STOP */
}
g_slist_free(plugin->driver_list);
}
}
+/* LCOV_EXCL_START */
gboolean zblib_plugin_dispatch_request(ZigBeePlugin *plugin,
guint request_id)
{
zblib_service_send_response(service,
request_id, resp_data, resp_data_len);
}
+/* LCOV_EXCL_STOP */
void zblib_plugin_send_notification(ZigBeePlugin *plugin,
guint noti_id, gpointer noti_data, guint noti_data_len)
{
ZblibDriverType_e driver_type;
- driver_type = ((request_type & 0xFF000000) >> 24);
+ driver_type = ((request_type & 0xFF000000) >> 24); // LCOV_EXCL_LINE
return driver_type;
}
{
guint ops_id;
- ops_id = (request_type & 0x000000FF);
+ ops_id = (request_type & 0x000000FF); // LCOV_EXCL_LINE
return ops_id;
}
+/* LCOV_EXCL_START */
static ZigBeeRequest *__zblib_request_ref_request_by_by_request_id(ZigBeeService *service,
guint request_id)
{
{
return __zblib_request_get_ops_id(request_type);
}
+/* LCOV_EXCL_STOP */
Z_LOGD("Plugin [%s] succeeded async init", plugin_name);
info->is_initialized = TRUE;
} else {
- Z_LOGE("Plugin [%s] failed to init !", plugin_name);
+ Z_LOGE("Plugin [%s] failed to init !", plugin_name); // LCOV_EXCL_LINE
}
g_free(plugin_name);
(struct _zblib_async_init_info *)(list_async->data);
i++;
if (G_UNLIKELY(NULL == in)) {
+ /* LCOV_EXCL_START */
Z_LOGE("Invalid parameter !");
list_async = g_slist_next(list_async);
continue;
+ /* LCOV_EXCL_STOP */
}
if (in->is_finished)
ret = TRUE;
} else {
/* Some initializers are failed */
+ /* LCOV_EXCL_START */
Z_LOGE("There are some failed plugin initializer !");
ret = FALSE;
+ /* LCOV_EXCL_STOP */
}
/* Notify whether zigbee service is enabled or not */
zblib_plugin_send_notification(plugin,
/* Open .so */
handle = dlopen(filename, RTLD_LAZY);
if (G_UNLIKELY(NULL == handle)) {
+ /* LCOV_EXCL_START */
Z_LOGE("dlopen() failed:[%s]", filename);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Get symbol - "zigbee_plugin_descriptor" */
descriptor = dlsym(handle, "zigbee_plugin_descriptor");
if (G_UNLIKELY(NULL == descriptor)) {
+ /* LCOV_EXCL_START */
Z_LOGE("dlsym() failed:[%s]", "plugin_define_desc");
dlclose(handle);
return NULL;
+ /* LCOV_EXCL_STOP */
}
Z_LOGD("%s plugin", descriptor->name);
/* Load plug-in */
if (G_LIKELY(descriptor->load)) {
if (G_UNLIKELY(FALSE == descriptor->load())) {
+ /* LCOV_EXCL_START */
Z_LOGW("load() failed... Skip this plugin!");
dlclose(handle);
return NULL;
+ /* LCOV_EXCL_STOP */
} else {
Z_LOGI("Plug-in (%s) loaded!", descriptor->name);
}
return FALSE;
}
+ /* LCOV_EXCL_START */
if (G_UNLIKELY(FALSE == descriptor->init(plugin))) {
char *plugin_name = zblib_plugin_get_plugin_name(plugin);
if (G_UNLIKELY(NULL != plugin_name)) {
}
return FALSE;
}
+ /* LCOV_EXCL_STOP */
return TRUE;
}
plugin_name = g_strdup("NONAME");
if (G_UNLIKELY(FALSE == descriptor->init_async(plugin, callback, user_data))) {
+ /* LCOV_EXCL_START */
Z_LOGE("plugin(%s) init failed!", plugin_name);
g_free(plugin_name);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
g_free(plugin_name);
return TRUE;
}
+/* LCOV_EXCL_START */
static void __zblib_service_remove_request_table_iter(gpointer key,
gpointer value, gpointer user_data)
{
Z_LOGD("Removing request id [%d]", request_id);
zblib_request_free(service_interface, request_id);
}
+/* LCOV_EXCL_STOP */
static void __zblib_service_remove_async_list(GSList *list_async)
{
/* Create g-main loop */
service->main_loop = g_main_loop_new(NULL, FALSE);
if (G_UNLIKELY(NULL == service->main_loop)) {
+ /* LCOV_EXCL_START */
Z_LOGE("g-main loop creation failed!!!");
g_free(service);
return NULL;
+ /* LCOV_EXCL_STOP */
}
/* Create request hash table */
if (NULL == interface_objs) {
Z_LOGE("interface_objs is NULL");
} else {
+ /* LCOV_EXCL_START */
while (interface_objs) {
service_interface = (ZigBeeServiceInterface *)interface_objs->data;
g_hash_table_remove_all(service->request_table);
g_hash_table_destroy(service->request_table);
service->request_table = NULL;
+ /* LCOV_EXCL_STOP */
}
}
/* Free plug-ins */
if (service->plugins) {
+ /* LCOV_EXCL_START */
g_slist_free(service->plugins);
service->plugins = NULL;
+ /* LCOV_EXCL_STOP */
}
/* Unref 'g-main loop' */
/* Open plug-in directory */
dir = g_dir_open(plugin_path, 0, NULL);
if (G_UNLIKELY(dir == NULL)) {
+ /* LCOV_EXCL_START */
Z_LOGE("Directory open failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/* Scan through all libraries in plug-in directory */
while ((file = g_dir_read_name(dir)) != NULL) {
if ((g_str_has_prefix(file, "lib") == TRUE)
|| (g_str_has_suffix(file, ".so") == FALSE))
- continue;
+ continue; // LCOV_EXCL_LINE
filename = g_build_filename(plugin_path, file, NULL);
/* Load plug-in */
handle = __zblib_service_load_plugin(filename, &descriptor);
if (G_UNLIKELY(NULL == handle)) {
+ /* LCOV_EXCL_START */
g_free(filename);
continue;
+ /* LCOV_EXCL_STOP */
}
/* Create new plug-in */
plugin = zblib_plugin_new(service, filename, descriptor, handle);
if (G_UNLIKELY(NULL == plugin)) {
+ /* LCOV_EXCL_START */
dlclose(handle);
g_free(filename);
continue;
+ /* LCOV_EXCL_STOP */
}
/* Add new plug-in */
ret = zblib_service_add_plugin(service, plugin);
if (G_UNLIKELY(FALSE == ret))
- zblib_plugin_free(plugin);
+ zblib_plugin_free(plugin); // LCOV_EXCL_LINE
g_free(filename);
}
struct _zblib_async_init_info *info =
g_try_new0(struct _zblib_async_init_info, 1);
if (NULL == info) {
+ /* LCOV_EXCL_START */
Z_LOGE("Fatal : Failed to allocate memory");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
info->is_finished = FALSE;
info->is_initialized = FALSE;
list_async = g_slist_append(list_async, info);
} else {
+ /* LCOV_EXCL_START */
__zblib_service_remove_async_list(list_async);
Z_LOGE("Fatal : Failed to initialize plugin");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
}
list = g_slist_next(list);
(struct _zblib_async_init_info *)(list_async->data);
if (G_UNLIKELY(NULL == info)) {
+ /* LCOV_EXCL_START */
Z_LOGE("Invalid parameter !");
list_async = g_slist_next(list_async);
continue;
+ /* LCOV_EXCL_STOP */
}
if (G_UNLIKELY(FALSE == __zblib_service_init_async_plugin(
info->plugin, __on_zblib_init_async_finished, info))) {
+ /* LCOV_EXCL_START */
Z_LOGE("Fatal : Failed to initialize mandatory plugin");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
list_async = g_slist_next(list_async);
}
/* Unload each plug-in */
if (G_UNLIKELY(FALSE == __zblib_service_unload_plugin(plugin))) {
+ /* LCOV_EXCL_START */
list = g_slist_next(list);
continue;
+ /* LCOV_EXCL_STOP */
}
list = g_slist_next(list);
service_interface = tmp_service_interface;
break;
}
- g_free(object_name);
+ g_free(object_name); // LCOV_EXCL_LINE
- list = g_slist_next(list);
+ list = g_slist_next(list); // LCOV_EXCL_LINE
}
if (NULL == service_interface) {
return service_interface;
}
+/* LCOV_EXCL_START */
GHashTable *zblib_service_ref_request_hash_table(ZigBeeService *service)
{
zblib_check_null_ret_error("service", service, NULL);
zblib_service_interface_send_response(service_interface,
request_id, resp_data, resp_data_len);
}
+/* LCOV_EXCL_STOP */
void zblib_service_send_notification(ZigBeeService *service,
guint noti_id, gpointer noti_data, guint noti_data_len)
return service_interface->service;
}
+/* LCOV_EXCL_START */
gint zblib_service_interface_new_request(ZigBeeServiceInterface *service_interface,
ZblibDriverType_e driver_type, guint ops_id,
gpointer request_data, guint request_data_len,
/* Free request */
zblib_request_free(service_interface, request_id);
}
+/* LCOV_EXCL_STOP */
gboolean zblib_service_interface_set_noti_cb(ZigBeeServiceInterface *service_interface,
ZblibServiceInterfaceNotificationCb_t noti_cb, gpointer noti_cb_data)
const char *zigbee_plugin_path = ZIGBEE_DEFAULT_PLUGINS_PATH;
if (service == NULL) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/* Load ZigBee plug-ins */
if (G_UNLIKELY(TRUE != zblib_service_load_plugins(service, zigbee_plugin_path))) {
+ /* LCOV_EXCL_START */
Z_LOGE("Load plug-ins failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
Z_TIME_CHECK("Loading Plugins Complete");
/* Initialize ZigBee plug-ins */
if (G_UNLIKELY(TRUE != zblib_service_initialize_plugins(service))) {
+ /* LCOV_EXCL_START */
Z_LOGE("Initialize plug-ins failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
Z_TIME_CHECK("Initializing Plugins Complete.");
/* Initialize ZigBee plug-ins */
if (G_UNLIKELY(TRUE != zblib_service_initialize_async_plugins(service))) {
+ /* LCOV_EXCL_START */
Z_LOGE("Asynchronously initialize plug-ins failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
Z_TIME_CHECK("Asynchronous initializer launched successfully. Starting Daemon");
void zigbee_service_deinit(ZigBeeService *service)
{
if (service == NULL) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
/* Unload ZigBee plug-ins */
if (G_UNLIKELY(TRUE != zblib_service_unload_plugins(service))) {
+ /* LCOV_EXCL_START */
Z_LOGE("Unload plug-ins failed!");
return;
+ /* LCOV_EXCL_STOP */
}
Z_TIME_CHECK("Unload Plugins Complete");