std::string HOSTING_TAG = "/hosting";
size_t HOSTING_TAG_SIZE = (size_t)HOSTING_TAG.size();
std::string MULTICAST_PRESENCE_ADDRESS = std::string("coap://") + OC_MULTICAST_PREFIX;
- std::string HOSTING_RESOURSE_TYPE = "Resource.Hosting";
+ std::string HOSTING_RESOURSE_TYPE = "resource.hosting";
}
ResourceHosting * ResourceHosting::s_instance(nullptr);
void TearDown()
{
TestWithMock::TearDown();
- if(remoteObject->isCaching())
- {
- remoteObject->stopCaching();
- }
- if(remoteObject->isMonitoring())
- {
- remoteObject->stopMonitoring();
+ if(remoteObject){
+ if(remoteObject->isCaching())
+ {
+ remoteObject->stopCaching();
+ }
+ if(remoteObject->isMonitoring())
+ {
+ remoteObject->stopMonitoring();
+ }
}
testObject->destroy();
}
MULTICASTURI("/oic/res"),
HOSTED_RESOURCEURI("/a/TempHumSensor"),
RESOURCEURI("/a/TempHumSensor/hosting"),
- RESOURCETYPE("Resource.Hosting"),
+ RESOURCETYPE("resource.hosting"),
RESOURCEINTERFACE("oic.if.baseline"),
ATTR_KEY("Temperature"),
ATTR_VALUE(0)
~ResourceEncapsulationTestSimulator()
{
std::cout << "~ResourceEncapsulationTestSimulator()" << std::endl;
- // if(remoteResource->isCaching())
- // {
- // std::cout << "stop cache" << std::endl;
- // remoteResource->stopCaching();
- // }
- // if(remoteResource->isMonitoring())
- // {
- // std::cout << "stop monitoring" << std::endl;
- // remoteResource->stopMonitoring();
- // }
- //std::cout << "11111: " << remoteResource.use_count() << std::endl;
}
private:
});
discoveryTask = RCSDiscoveryManager::getInstance()->discoverResourceByType(
- RCSAddress::multicast(), "Resource.Hosting", onDiscoveryResource);
+ RCSAddress::multicast(), "resource.hosting", onDiscoveryResource);
waitForCondition(2000);
std::string mirroredUri = { testObject->getServerUri() };
}
public void findResourceCandidate() {
- nmfindResource("", "/oic/res?rt=Resource.Hosting");
+ nmfindResource("", "/oic/res?rt=resource.hosting");
current_log_result += "Finding Resource... \n";
tv_current_log_result.setText(current_log_result);
Log.i(TAG, current_log_result);
public class StringConstants {
public static final String RESOURCE_URI = "/a/TempHumSensor/hosting";
- public static final String RESOURCE_TYPENAME = "Resource.Hosting";
+ public static final String RESOURCE_TYPENAME = "resource.hosting";
public static final String RESOURCE_INTERFACE = OcPlatform.DEFAULT_INTERFACE; // resource interface
public static final String HUMIDITY = "humidity";
public static final String TEMPERATURE = "temperature";
const int SUCCESS_RESPONSE = OC_STACK_OK;
-#define OC_WELL_KNOWN_COORDINATING_QUERY "/oic/res?rt=Resource.Hosting"
+#define OC_WELL_KNOWN_COORDINATING_QUERY "/oic/res?rt=resource.hosting"
#define OBSERVE 1
#define GET 2
void createResource()
{
std::string resourceURI = "/a/TempHumSensor/hosting";
- std::string resourceTypeName = "Resource.Hosting";
+ std::string resourceTypeName = "resource.hosting";
std::string resourceInterface = DEFAULT_INTERFACE;
m_uri = resourceURI;
{
std::string resourceURI = "/a/NM/TempHumSensor1"; // URI of the resource
std::string resourceTypeName =
- "NotificationManager.Hosting"; // resource type name. In this case, it is light
+ "notificationmanager.hosting"; // resource type name. In this case, it is light
std::string resourceInterface = DEFAULT_INTERFACE; // resource interface.
// OCResourceProperty is defined ocstack.h
{
try
{
- nmfindResource("" , "coap://224.0.1.187/oc/core?rt=NotificationManager.Hosting");
+ nmfindResource("" , "coap://224.0.1.187/oc/core?rt=notificationmanager.hosting");
std::cout << "Finding Resource... " << std::endl;
}