__uam_send_event(event, result, &sensor_info,
event_info->cb, event_info->user_data);
} else if (0 == strcasecmp(signal_name, UAM_SIGNAL_ABSENCE_DETECTED)) {
+ uam_sensor_info_s sensor_info;
unsigned int sensor_bitmask;
- g_variant_get(parameters, "(u)", &sensor_bitmask);
+ long int timestamp;
+ int accuracy, count;
+ double values[UAM_SENSOR_MAX_VALUES];
+ g_variant_get(parameters, "(uxiidddd)", &sensor_bitmask, ×tamp,
+ &accuracy, &count, &values[0], &values[1],
+ &values[2], &values[3]);
+ memset(&sensor_info, 0, sizeof(uam_sensor_info_s));
event = UAM_EVENT_ABSENCE_DETECTED;
+ sensor_info.sensor_bitmask = sensor_bitmask;
+ sensor_info.timestamp = timestamp;
+ sensor_info.accuracy = accuracy;
+ sensor_info.count = count;
+ for (int i = 0; i < UAM_SENSOR_MAX_VALUES; i++) {
+ sensor_info.values[i] = values[i];
+ }
- __uam_send_event(event, result, &sensor_bitmask,
+ UAM_DBG("sensor bitmask [%u] timestamp [%ld] accuracy [%d] count [%d] " \
+ "value0 [%f] value1 [%f] value2 [%f] value3 [%f]",
+ sensor_info.sensor_bitmask, sensor_info.timestamp,
+ sensor_info.accuracy, sensor_info.count, sensor_info.values[0],
+ sensor_info.values[1], sensor_info.values[2], sensor_info.values[3]);
+ __uam_send_event(event, result, &sensor_info,
event_info->cb, event_info->user_data);
} else if (0 == strcasecmp(signal_name, UAM_SIGNAL_SENSOR_STATE_READY)) {
unsigned int sensor;
if (UAM_SENSOR_BITMASK_LIGHT != sensor) {
_uam_manager_send_event(NULL, UAM_EVENT_ABSENCE_DETECTED,
- g_variant_new("(u)", sensor));
+ g_variant_new("(uxiidddd)", sensor, sensor_info->timestamp,
+ sensor_info->accuracy, sensor_info->count, sensor_info->values[0],
+ sensor_info->values[1], sensor_info->values[2], sensor_info->values[3]));
UAM_DBG("Sent UAM_EVENT_ABSENCE_DETECTED for 0x%8.8X", sensor);
FUNC_EXIT;
return;
continue;
_uam_manager_send_event(mon->name, UAM_EVENT_ABSENCE_DETECTED,
- g_variant_new("(u)", sensor));
+ g_variant_new("(uxiidddd)", sensor, sensor_info->timestamp,
+ sensor_info->accuracy, sensor_info->count, sensor_info->values[0],
+ sensor_info->values[1], sensor_info->values[2], sensor_info->values[3]));
UAM_DBG("Sent UAM_EVENT_ABSENCE_DETECTED for 0x%8.8X", sensor);
}
}