Hi Devs
I met a problem while coding OCF app.
I created resources using C language with attached file Server.c .
But, I can’t find the resource created by Server with C++ code with attached
file Client.cpp.
If I using C++ language to write the Server and create resource with API
OCPlatform::registerResource, I can find the resource.
Could you explain this?
Thanks
Jason Sun
requestURI << OC_RSRVD_WELL_KNOWN_URI;// << "?rt=core.light";
OCPlatform::findResource("", requestURI.str(),
CT_DEFAULT, &foundResource);
char* AC_POWER_RESOURCE_URL = (char*)"/ACPower";
#define AC_POWER_RESOURCE_TYPE "ac.power"
#define RESOURCE_INTERFACE "core.ac.resources"
result = OCCreateResource(&m_powerResource.handle,
AC_POWER_RESOURCE_TYPE,
RESOURCE_INTERFACE,
AC_POWER_RESOURCE_URL,
ACPowerEntityHandler, NULL,
OC_DISCOVERABLE | OC_OBSERVABLE );
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev