//string length of "/a/light/" + std::numeric_limits<int>::digits10 + '\0'"
// 9 + 9 + 1 = 19
const int URI_MAXSIZE = 19;
//string length of "/a/light/" + std::numeric_limits<int>::digits10 + '\0'"
// 9 + 9 + 1 = 19
const int URI_MAXSIZE = 19;
res = OCCreateResource(&presenceNotificationHandles[i],
presenceNotificationResources.at(i).c_str(),
OC_RSRVD_INTERFACE_DEFAULT,
presenceNotificationUris.at(i).c_str(),
OCNOPEntityHandlerCb,
NULL,
res = OCCreateResource(&presenceNotificationHandles[i],
presenceNotificationResources.at(i).c_str(),
OC_RSRVD_INTERFACE_DEFAULT,
presenceNotificationUris.at(i).c_str(),
OCNOPEntityHandlerCb,
NULL,
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
{
cout << "\nOCStack init error";
if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
{
cout << "\nOCStack init error";