[general]
-#profile = profile.Main2017_KantM
-profile = profile.tizen_phone_arm64_3_0
+profile = repo.tzmb_3.0_TM1_base
[obs.tizen_org]
url = https://api.tizen.org
url=~/GBS_ROOT_3.0/local/repos/Main2017/armv7l
[repo.product_Main2017_KantM]
url=http://10.103.211.119/releases/tizen-3.0-product-main2017/product/KantM/latest/repos/product/armv7l/packages/
-url=http://10.103.211.119/releases/tizen-3.0-product-main2017/product/KantM/TIZEN-3.0-MAIN2017-KantM-RELEASE_20170419.1/repos/product/armv7l/packages/
+#url=http://10.103.211.119/releases/tizen-3.0-product-main2017/product/KantM/TIZEN-3.0-MAIN2017-KantM-RELEASE_20170419.1/repos/product/armv7l/packages/
[profile.Main2017_KantM]
repos = repo.base_Main2017, repo.srk_Main2017, repo.product_Main2017_KantM, repo.local_Main2017
buildroot = ~/GBS_ROOT_3.0
+
############################################# Profile [profile.tzmb_3.0_TM2]
[repo.tzmb_3.0_TM2_base]
-#url = http://download.tizen.org/snapshots/tizen/base/tizen-base_20170421.1/repos/arm64/packages/
url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm64/packages/
[repo.tzmb_3.0_TM2_srk]
url = http://106.125.46.44/repo/tm2/packages/
[repo.tzmb_4.0_unified]
-#url = http://download.tizen.org/snapshots/tizen/unified/tizen-unified_20170421.1/repos/standard/packages/
url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
[profile.tzmb_3.0_TM2]
obs = obs.tizen_org
repos = repo.tzmb_3.0_TM1_base, repo.tzmb_3.0_TM1_srk, repo.tzmb_4.0_unified
buildroot = ~/GBS_ROOT_3.0_TM1
+
+############################################# KantM Tizen 4.0
+
+[repo.product_Main2017_KantM_4.0]
+url=http://10.103.211.119/220svr/releases/adv-tizen-4.0-product-migration/KantM_ATSC/latest/repos/product/armv7l/packages/
+[repo.base_Main2017_KantM_4.0]
+url=http://10.103.211.119/220svr/base/adv-tizen-4.0-base-migration/standard/latest/repos/base/armv7l/packages
+[repo.KantM_4.0_srk]
+url = http://106.125.46.44/repo/kantm4.0/packages/
+
+[profile.Main2017_KantM_4.0]
+obs = obs.tizen_org
+repos = repo.base_Main2017_KantM_4.0, repo.KantM_4.0_srk, repo.product_Main2017_KantM_4.0
+buildroot = ~/GBS_ROOT_4.0_kantm
if(resource)
{
if(resource->getResourceTypes().at(0) != OC_RSRVD_ES_RES_TYPE_PROV ||
- resource->connectivityType() & (CT_ADAPTER_TCP | CT_IP_USE_V4))
+ (resource->connectivityType() & CT_ADAPTER_TCP))
{
OIC_LOG (ERROR, EASYSETUP_TAG, "Given resource is not valid due to wrong rt or conntype");
return nullptr;
OC::QualityOfService _QoS /*= OC::QualityOfService::LowQos*/,
int _wait_for_sec /*= 3*/ )
{
- OC::OCPlatform::findResourceList( _host,
- _request_uri,
- _connectivity_type,
- [this](std::vector<std::shared_ptr<OC::OCResource>> _resources)
- {
- std::unique_lock<std::mutex> lock{vector_mtx};
- std::copy(_resources.begin(), _resources.end(), std::back_inserter(this->m_devices));
- },
- _QoS );
+ auto find_callback = [this, _connectivity_type](std::vector<std::shared_ptr<OC::OCResource>> _resources)
+ {
+ std::unique_lock<std::mutex> lock{vector_mtx};
+ for (auto resource: _resources)
+ {
+ if (_connectivity_type == CT_DEFAULT || (resource->connectivityType() & _connectivity_type))
+ {
+ this->m_devices.push_back(resource);
+ }
+ }
+ };
+
+ OC::OCPlatform::findResourceList(_host, _request_uri, CT_DEFAULT, find_callback, _QoS);
std::this_thread::sleep_for(std::chrono::seconds(_wait_for_sec));
return m_devices;
}
const IoTDevicesMap& IoTivity::getUnOwnedDevices()
{
FN_VISIT
-
- static const std::string COAP_IF{"coap:"};
-
params->unowned.clear();
-
- auto devs = IOT_DeviceFinder()();
+ IOT_DeviceFinder dev_finder;
+ auto devs = dev_finder("", "/oic/res?rt=oic.wk.prov", CT_ADAPTER_IP);
for (auto d : devs)
{
std::shared_ptr<IoTDevice> dev(new IoTDevice_impl(d));
- if (dev->getUUID().empty())
- continue;
+
+ if (dev->getUUID().empty()) continue;
auto it = params->unowned.find(dev->getUUID());
- if(it != params->unowned.end())
- {
- if(dev->getHost().compare(0, COAP_IF.length(), COAP_IF) == 0)
- it->second = dev;
- }
- else
+
+ if (it == params->unowned.end())
{
auto res = params->unowned.emplace(dev->getUUID(), dev);
- if(!res.second)
+
+ if (!res.second)
+ {
throw IoTInternalError("Out of memory");
+ }
}
}
-
return params->unowned;
}