#include "connectivity.h"
#include "controller.h"
-#define GPIO_INFRARED_MOTION_NUM 20
#define CONNECTIVITY_KEY "opened"
-#define SENSORING_TIME_INTERVAL 1.0f
typedef struct app_data_s {
Ecore_Timer *getter_timer;
/**
* Infrared motion sensor outputs 1 if motion is detected, or 0 if motion is not detected.
*/
- if (resource_read_infrared_motion_sensor(GPIO_INFRARED_MOTION_NUM, &value) == -1)
+ /*
+ if (resource_read_infrared_motion_sensor(Pin Number, &value) == -1)
_E("Failed to get Infrared Motion value [GPIO:%d]", GPIO_INFRARED_MOTION_NUM);
+ */
/**
* Notifies specific clients that resource's attributes have changed.
*/
+ /*
if (connectivity_notify_bool(ad->resource_info, CONNECTIVITY_KEY, value) == -1)
_E("Cannot notify message");
+ */
return ECORE_CALLBACK_RENEW;
}
* No modification required!!!
* Access only when modifying internal functions.
*/
- controller_init_internal_functions();
+ //controller_init_internal_functions();
/**
* Create a connectivity resource and registers the resource in server.
*/
+ /*
ret = connectivity_set_resource("/door/1", "org.tizen.door", &ad->resource_info);
if (ret == -1) _E("Cannot broadcast resource");
+ */
/**
* Creates a timer to call the given function in the given period of time.
* In the control_sensors_cb(), each sensor reads the measured value or writes a specific value to the sensor.
*/
- ad->getter_timer = ecore_timer_add(SENSORING_TIME_INTERVAL, control_sensors_cb, ad);
+ /*
+ ad->getter_timer = ecore_timer_add(Duration, control_sensors_cb, ad);
if (!ad->getter_timer) {
_E("Failed to add infrared motion getter timer");
return false;
}
+ */
return true;
}
int i = 0;
for (i = 0; i < PIN_MAX; i++) {
if (!resource_info[i].opened) continue;
- _I("GPIO[%d] is closing...", i);
+ _I("[%d]th Resource is closing...", i);
if (resource_info[i].close)
resource_info[i].close(i);