mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: source/StaticResource.cpp
- Revision:
- 45:db754b994deb
- Parent:
- 33:1d0b855df5a5
--- a/source/StaticResource.cpp Wed Jun 15 19:40:08 2016 +0000 +++ b/source/StaticResource.cpp Wed Jun 15 20:51:13 2016 +0000 @@ -78,6 +78,9 @@ // Create our Resource this->m_res = (M2MResource *)oim->createStaticResourceInstance((char *)this->getObjName().c_str(),(char *)this->getResName().c_str(),(char *)"StaticResource",(int)type,(void *)this->getDataWrapper()->get(),(int)this->getDataWrapper()->length()); if (this->m_res != NULL) { + // Record our Instance Number + this->setInstanceNumber(oim->getLastCreatedInstanceNumber()); + // DEBUG this->logger()->log("StaticResource: [%s] value: [%s] bound",this->getFullName().c_str(),this->getDataWrapper()->get()); } @@ -86,6 +89,10 @@ // Create our Resource this->m_res = (M2MResource *)oim->createStaticResourceInstance((char *)this->getObjName().c_str(),(char *)this->getResName().c_str(),(char *)"StaticResource",(int)type,(void *)this->getValue().c_str(),(int)this->getValue().size()); if (this->m_res != NULL) { + // Record our Instance Number + this->setInstanceNumber(oim->getLastCreatedInstanceNumber()); + + // DEBUG this->logger()->log("StaticResource: [%s] value: [%s] bound",this->getFullName().c_str(),this->getValue().c_str()); } }