*/
ua_sensor_type_e _ua_dev_type_to_sensor(ua_mac_type_e type);
+/**
+ * @ingroup CAPI_NETWORK_UA_MODULE
+ * @internal
+ * @brief Converts sensor bitmask enum to device tech type enum.
+ * @since_tizen 6.5
+ *
+ * @remarks The returned value can be used until return call function is valid.
+ *
+ * @param[in] type sensor code to be converted.
+ *
+ * @return Mac type
+ *
+ * @exception
+ * @pre
+ * @post
+ *
+ */
+ ua_mac_type_e _ua_sensor_to_dev_type(ua_sensor_type_e type);
+
/**
* @ingroup CAPI_NETWORK_UA_MODULE
* @internal
user_state->sensor_bitmask |= bitmask;
- ret = ua_device_get_by_device_id(device_id, bitmask, &device_handle);
+ ret = ua_device_get_by_device_id(device_id,
+ _ua_sensor_to_dev_type(bitmask), &device_handle);
UA_INFO("ua_device_get_by_device_id returned %s",
_ua_get_error_string(ret));
if (device_handle)
FUNC_EXIT;
}
+ua_mac_type_e _ua_sensor_to_dev_type(ua_sensor_type_e type)
+{
+ FUNC_ENTRY;
+
+ switch (type) {
+ case UA_SENSOR_BT:
+ return UA_MAC_TYPE_BT;
+ case UA_SENSOR_BLE:
+ return UA_MAC_TYPE_BLE;
+ case UA_SENSOR_WIFI:
+ return UA_MAC_TYPE_WIFI;
+ default:
+ UA_WARN("Uncompatible to convert. sensor [%u]", type);
+ return UA_MAC_TYPE_INVALID;
+ }
+ FUNC_EXIT;
+}
+
ua_sensor_type_e _uam_to_ua_sensor(uam_sensor_bitmask_e bitmask)
{
FUNC_ENTRY;