*/
typedef struct {
unsigned int status; /**< Sensor status 1:PRESENCE 2:ABSENCE */
- ua_sensor_h handle;
- ua_sensor_e bitmask;
- long int timestamp;
- int accuracy;
- int count;
- double *values;
+ ua_sensor_h handle; /**< Sensor handle */
+ ua_sensor_e bitmask; /**< Sensor bitmask */
+ unsigned long long timestamp; /**< Timestamp */
+ int accuracy; /**< Accuracty from sensor device */
+ int count; /**< How many sensor data included */
+ double *values; /**< Sensor data */
} ua_sensor_info_s;
/**
gboolean isadded; /**< Is the device addition completed? */
gboolean create_by_app; /**< Did app add this device information? */
gboolean discriminant; /**< Determines whether to judge PRESENCE/ABSENCE */
- long last_presence_timestamp; /**< timestamp of last presence */
+ unsigned long long last_presence_timestamp; /**< timestamp of last presence */
ua_ble_payload_s *payload; /**< BLE payload to filter device*/
} ua_dev_info_s;
* @post
*
*/
-int ua_user_get_last_presence(ua_user_h user_handle, long *timestamp);
+int ua_user_get_last_presence(ua_user_h user_handle, unsigned long long *timestamp);
/**
* @ingroup CAPI_NETWORK_UA_MODULE
*/
int ua_device_get_last_presence(
ua_device_h device_handle,
- long *timestamp);
+ unsigned long long *timestamp);
/**
* @ingroup CAPI_NETWORK_UA_MODULE
*/
int ua_sensor_get_timestamp(
ua_sensor_h sensor_handle,
- long int *timestamp);
+ unsigned long long *timestamp);
/**
* @ingroup CAPI_NETWORK_UA_MODULE
Name: capi-network-ua
Summary: User Awareness Framework CAPI
-Version: 0.12.0
+Version: 0.12.1
Release: 1
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
int ua_device_get_last_presence(
ua_device_h device_handle,
- long *timestamp)
+ unsigned long long *timestamp)
{
FUNC_ENTRY;
ua_dev_info_s *device = (ua_dev_info_s *)device_handle;
sensor_info = event_param->data;
ret_if(NULL == sensor_info);
- UA_INFO("sensor: [%u], timestamp [%ld], accuracy [%d], value [%f]",
+ UA_INFO("sensor: [%u], timestamp [%llu], accuracy [%d], value [%f]",
sensor_info->sensor_bitmask, sensor_info->timestamp,
sensor_info->accuracy, sensor_info->values[0]);
_ua_monitor_handle_user_presence_detected(sensor_info, NULL,
sensor_info = event_param->data;
ret_if(NULL == sensor_info);
- UA_INFO("sensor: [%u], timestamp [%ld], accuracy [%d], value [%f]",
+ UA_INFO("sensor: [%u], timestamp [%llu], accuracy [%d], value [%f]",
sensor_info->sensor_bitmask, sensor_info->timestamp,
sensor_info->accuracy, sensor_info->values[0]);
_ua_monitor_handle_user_absence_detected(sensor_info, NULL, NULL);
sensor_info = event_param->data;
ret_if(NULL == sensor_info);
- UA_INFO("status [%d] sensor: [%u], timestamp [%ld], accuracy [%d], value [%f]",
+ UA_INFO("status [%d] sensor: [%u], timestamp [%llu], accuracy [%d], value [%f]",
sensor_info->status, sensor_info->sensor_bitmask, sensor_info->timestamp,
sensor_info->accuracy, sensor_info->values[0]);
return UA_ERROR_NONE;
}
-int ua_user_get_last_presence(ua_user_h user_handle, long *timestamp)
+int ua_user_get_last_presence(ua_user_h user_handle, unsigned long long *timestamp)
{
FUNC_ENTRY;
ua_user_info_s *user = (ua_user_info_s *)user_handle;
int ua_sensor_get_timestamp(
ua_sensor_h sensor_handle,
- long int *timestamp)
+ unsigned long long *timestamp)
{
FUNC_ENTRY;
ua_sensor_info_s *sensor;
int ret;
char buf[MENU_DATA_SIZE] = {0, };
char final_buf[MENU_DATA_SIZE * 4] = {0, };
- long int timestamp;
+ unsigned long long timestamp;
int info_count = 0;
GSList *values = NULL;
double *value;
strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
memset(buf, 0, MENU_DATA_SIZE);
}
- msgb("[%s] information detected at timestamp [%ld] value [%s]",
+ msgb("[%s] information detected at timestamp [%llu] value [%s]",
uat_get_sensor_bitmask_str(sensor), timestamp,
final_buf);
char *wifi_bssid = NULL;
char *ipv4 = NULL;
bool required = false;
- long timestamp = 0;
+ unsigned long long timestamp = 0;
bool discriminant = false;
char service_id = 0;
char device_icon = 0;
ret_temp = ua_device_get_last_presence(handle, ×tamp);
if (UA_ERROR_NONE == ret_temp)
- msgb("Last present at : %ld", timestamp);
+ msgb("Last present at : %llu", timestamp);
ret_temp = ua_device_get_payload_service_id(handle, &service_id);
if (UA_ERROR_NONE == ret_temp)
char *ipv4 = NULL;
bool required = false;
bool discriminant = false;
- long timestamp = 0;
+ unsigned long long timestamp = 0;
char service_id = 0;
char device_icon = 0;
char purpose = 0;
ret_temp = ua_device_get_last_presence(handle, ×tamp);
if (UA_ERROR_NONE == ret_temp)
- msgb("Last present at : %ld", timestamp);
+ msgb("Last present at : %llu", timestamp);
ret_temp = ua_device_get_payload_service_id(handle, &service_id);
if (UA_ERROR_NONE == ret_temp)
int ret;
char buf[MENU_DATA_SIZE] = {0, };
char final_buf[MENU_DATA_SIZE * 4] = {0, };
- long int timestamp;
+ unsigned long long timestamp;
int info_count = 0;
GSList *values = NULL;
double *value;
strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
memset(buf, 0, MENU_DATA_SIZE);
}
- msgb("[%s] information detected at timestamp [%ld] value [%s]",
+ msgb("[%s] information detected at timestamp [%llu] value [%s]",
uat_get_sensor_bitmask_str(bitmask), timestamp,
final_buf);
int ret;
double *value;
GSList *l = 0;
- long int timestamp;
+ unsigned long long timestamp;
int info_count = 0;
ua_sensor_e sensor;
GSList *values = NULL;
strncat(final_buf, buf, sizeof(buf) - strlen(buf) - 1);
memset(buf, 0, MENU_DATA_SIZE);
}
- msgr("[%s] information detected at timestamp [%ld] value [%s]",
+ msgr("[%s] information detected at timestamp [%llu] value [%s]",
uat_get_sensor_bitmask_str(sensor), timestamp, final_buf);
g_slist_free(values);
char *account = NULL;
char *name = NULL;
- long timestamp = 0;
+ unsigned long long timestamp = 0;
if (user_handle) {
ret = ua_user_get_last_presence(user_handle, ×tamp);
if (UA_ERROR_NONE == ret)
- msgb("last present at %ld", timestamp);
+ msgb("last present at %llu", timestamp);
}
return true;