#include <zblib.h>
#include <zblib_driver.h>
+#include <zblib_request.h>
#include "zblib_driver_on_off.h"
ZblibDriverOnOffOps_t *ops; /**< Operations */
} ZblibDriverOnOffPrivData_t;
-static gboolean __zblib_driver_on_off_dispatcher(ZigBeeDriver *driver)
+static gboolean __zblib_driver_on_off_dispatcher(ZigBeeDriver *driver, guint request_id)
{
+ ZigBeeService *service = NULL;
+ guint request_type;
+ guint ops_id;
+
if (NULL == driver) {
Z_LOGE("driver is NULL");
return FALSE;
}
+ service = zblib_driver_ref_service(driver);
+ if (NULL == service) {
+ Z_LOGE("service is NULL");
+ return FALSE;
+ }
+
+ /* Fetch request_type using request_id */
+ request_type = zblib_request_ref_request_type_by_request_id(service, request_id);
+
+ /* Fetch ops ID */
+ ops_id = zblib_request_get_ops_id(request_type);
+ switch (ops_id) {
+ case ZBLIB_ON_OFF_OPS_SET_ON_OFF: {
+ }
+ break;
+
+ case ZBLIB_ON_OFF_OPS_GET_ON_OFF_STATE: {
+ }
+ break;
+
+ default:
+ break;
+ }
+
return TRUE;
}