std::mutex resourceLock;
static int TEST_CASE = 0;
-static OCConnectivityType connectivityType = OC_IPV4;
+static OCConnectivityType connectivityType = CT_ADAPTER_IP;
/**
* List of methods that can be inititated from the client
<< std::endl;
std::cout << "-t 6 : Discover Resources and Initiate Multicast Presence with two Filters"
<< std::endl;
- std::cout<<"ConnectivityType: Default IPv4" << std::endl;
- std::cout << "-c 0 : Send message with IPv4" << std::endl;
- std::cout << "-c 1 : Send message with IPv6" << std::endl;
+ std::cout<<"ConnectivityType: Default IP" << std::endl;
+ std::cout << "-c 0 : Send message with IP" << std::endl;
}
// Callback to presence
{
if(optionSelected == 0)
{
- connectivityType = OC_IPV4;
- }
- else if(optionSelected == 1)
- {
- // TODO: re-enable IPv4/IPv6 command line selection when IPv6
- // is supported
- //connectivityType = OC_IPV6;
- connectivityType = OC_IPV4;
- std::cout << "IPv6 not currently supported. Using default IPv4"
- << std::endl;
+ std::cout << "Using IP."<< std::endl;
+ connectivityType = CT_ADAPTER_IP;
}
else
{
- std::cout << "Invalid connectivity type selected. Using default IPv4"
+ std::cout << "Invalid connectivity type selected. Using default IP"
<< std::endl;
}
}
else
{
- std::cout << "Invalid connectivity type selected. Using default IPv4"
+ std::cout << "Invalid connectivity type selected. Using default IP"
<< std::endl;
}
break;
}
catch(std::exception& )
{
- std::cout << "Invalid input argument. Using IPv4 as connectivity type"
+ std::cout << "Invalid input argument. Using IP as connectivity type"
<< std::endl;
}
else
{
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI;
+ requestURI << OC_RSRVD_WELL_KNOWN_URI;
result = OCPlatform::findResource("", requestURI.str(),
- OC_ALL, &foundResource);
+ CT_DEFAULT, &foundResource);
if(result == OC_STACK_OK)
{
std::cout << "Finding Resource... " << std::endl;