FILE(GLOB CTRL_APP_SUPPORT_SRCS ctrl_app/src/*.cpp)
+FILE(GLOB IOT_SRC IoT/src/*.cpp IoT/src/*.c)
+
if(NOT "${FLAVOR}" STREQUAL "UBUNTU")
FILE(GLOB DPM_SRCS dpm/src/*.cpp)
endif()
REST/src/rest_helper.cpp
${DPM_SRCS}
${CTRL_APP_SUPPORT_SRCS}
+ ${IOT_SRC}
)
add_library(${PROJECT_NAME} SHARED ${LIB_SOURCES})
std::string type;
std::string uuid;
std::string spec_ver;
+ std::string host;
std::mutex mtx;
std::condition_variable cond_var;
IoTDevice_impl::IoTDevice_impl(std::shared_ptr<OCResource> device_resource)
: dev(device_resource), name("unknown"), model("unknown"), type("unknown"), uuid("unknown"), spec_ver("unknown")
{
+ host = device_resource->host();
OCPlatform::getDeviceInfo(device_resource->host(),
dev_info_uri,
device_resource->connectivityType(),
const std::string& IoTDevice_impl::getHost()
{
- return dev->host();
+ return host;
}
bool IoTDevice_impl::isOnline()
gbs --conf ${SCRIPT_DIR}/gbs.conf build -P ${PROFILE} -A ${TARGET_ARCH} --include-all --threads 1 \
--define '__debug_install_post %{nil}' --define 'debug_package %{nil}' \
- --define 'DEBUG '$DEBUG_ON --define 'GTEST '$GTEST_TYPE
+ --define 'DEBUG '$DEBUG_ON --define 'GTEST_TYPE '$GTEST_TYPE
#remove temporary files
cleanup
FILE(GLOB SRCS *.cpp)
-add_executable (${PROJECT_NAME} ${SRCS} ${NETWORK_MANAGER_LIB}/IoT/src/IOT_DeviceFinder.cpp ${NETWORK_MANAGER_LIB}/IoT/src/IOT_EasySetup.c)
+add_executable (${PROJECT_NAME} ${SRCS})
target_link_libraries(${PROJECT_NAME}
${GTEST_LIB}
(void) path;
return fopen("oic_svr_db_server.dat", mode);
}
-TEST(test_IoT, IOT_Enrollee)
+TEST(DISABLED_test_IoT, IOT_Enrollee)
{
try
{
ASSERT_EQ(EC_NULL_POINTER, NM_getUnownedDevices(ctx, nullptr));
ASSERT_EQ(EC_OK, NM_getUnownedDevices(ctx, &dev_list));
- ASSERT_NO_THROW(NM_getListSize(dev_list));
+ std::cout << "Devices found: " << NM_getListSize(dev_list) << std::endl;
ASSERT_EQ(EC_NULL_POINTER, NM_deviceListForEach(nullptr, each_callback, nullptr));
ASSERT_EQ(EC_OK, NM_deviceListForEach(dev_list, each_callback, nullptr));
NM_freeDeviceList(nullptr);