use TCP to connect to mbed connector
Fork of mbedConnectorInterfaceWithDM by
Diff: source/NamedPointer.cpp
- Revision:
- 45:db754b994deb
- Parent:
- 38:bb6d2be4d54c
--- a/source/NamedPointer.cpp Wed Jun 15 19:40:08 2016 +0000 +++ b/source/NamedPointer.cpp Wed Jun 15 20:51:13 2016 +0000 @@ -24,9 +24,10 @@ #include "mbed-connector-interface/ObjectInstanceManager.h" // constructor -NamedPointer::NamedPointer(string name,void *ptr) { +NamedPointer::NamedPointer(string name,void *ptr,int index) { this->m_name = name; this->m_ptr = ptr; + this->m_index = index; this->m_list = (void *)new NamedPointerList(); } @@ -34,6 +35,7 @@ NamedPointer::NamedPointer(const NamedPointer &np) { this->m_name = np.m_name; this->m_ptr = np.m_ptr; + this->m_index = np.m_index; this->m_list = this->copyList(np.m_list); } @@ -55,6 +57,11 @@ return this->m_ptr; } +// Get the Index +int NamedPointer::index() { + return this->m_index; +} + // Get any associated list void *NamedPointer::list() { return this->m_list;