OCConnectivityType::CT_DEFAULT,
std::bind(&NSConsumerSimulator::findResultCallback, this, std::placeholders::_1),
OC::QualityOfService::LowQos);
OCConnectivityType::CT_DEFAULT,
std::bind(&NSConsumerSimulator::findResultCallback, this, std::placeholders::_1),
OC::QualityOfService::LowQos);
- rep.setValue("providerid", providerID);
- rep.setValue("messageid", id);
- rep.setValue("state", type);
+ rep.setValue("x.org.iotivity.ns.providerid", providerID);
+ rep.setValue("x.org.iotivity.ns.messageid", id);
+ rep.setValue("x.org.iotivity.ns.state", type);
m_syncResource->post(rep, OC::QueryParamsMap(), &onPost, OC::QualityOfService::LowQos);
}
m_syncResource->post(rep, OC::QueryParamsMap(), &onPost, OC::QualityOfService::LowQos);
}
OC::QueryParamsMap(), std::bind(&NSConsumerSimulator::onGet, this,
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
resource), OC::QualityOfService::LowQos);
OC::QueryParamsMap(), std::bind(&NSConsumerSimulator::onGet, this,
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
resource), OC::QualityOfService::LowQos);
const OC::OCRepresentation &rep , const int & /*eCode*/, const int &,
std::shared_ptr<OC::OCResource> )
{
const OC::OCRepresentation &rep , const int & /*eCode*/, const int &,
std::shared_ptr<OC::OCResource> )
{
- if (rep.getUri() == "/notification/message" && rep.hasAttribute("messageid")
- && rep.getValue<int>("messageid") != 1)
+ if (rep.getUri() == "/notification/message" && rep.hasAttribute("x.org.iotivity.ns.messageid")
+ && rep.getValue<int>("x.org.iotivity.ns.messageid") != 1)
- m_messageFunc(int(rep.getValue<int>("messageid")),
- std::string(rep.getValueToString("title")),
- std::string(rep.getValueToString("contenttext")),
- std::string(rep.getValueToString("source")));
+ m_messageFunc(int(rep.getValue<int>("x.org.iotivity.ns.messageid")),
+ std::string(rep.getValueToString("x.org.iotivity.ns.title")),
+ std::string(rep.getValueToString("x.org.iotivity.ns.contenttext")),
+ std::string(rep.getValueToString("x.org.iotivity.ns.source")));
std::string("oic.if.baseline"), OC::QueryParamsMap(),
std::bind(&NSConsumerSimulator::onTopicGet, this, std::placeholders::_1,
std::placeholders::_2, std::placeholders::_3, m_topicResource),
std::string("oic.if.baseline"), OC::QueryParamsMap(),
std::bind(&NSConsumerSimulator::onTopicGet, this, std::placeholders::_1,
std::placeholders::_2, std::placeholders::_3, m_topicResource),
- postTopic.setValue("topicname", topic.getValueToString("topicname"));
- postTopic.setValue("topicstate", (int) topic.getValue<int>("topicstate"));
+ postTopic.setValue("x.org.iotivity.ns.topicname", topic.getValueToString("x.org.iotivity.ns.topicname"));
+ postTopic.setValue("x.org.iotivity.ns.topicstate", (int) topic.getValue<int>("x.org.iotivity.ns.topicstate"));
std::string("123456789012345678901234567890123456")));
m_topicResource->post(postRep, map, &onPost, OC::QualityOfService::LowQos);
}
std::string("123456789012345678901234567890123456")));
m_topicResource->post(postRep, map, &onPost, OC::QualityOfService::LowQos);
}