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/ConnectorEndpoint.cpp
- Revision:
- 43:3fb57c4fba34
- Parent:
- 40:5c039dcbd7b2
- Child:
- 44:7c73baf9f4c1
--- a/source/ConnectorEndpoint.cpp Wed Jun 15 04:24:48 2016 +0000 +++ b/source/ConnectorEndpoint.cpp Wed Jun 15 19:31:55 2016 +0000 @@ -90,6 +90,13 @@ net_perform_endpoint_registration(__endpoint); } +// STATIC: Set the ConnectionStatusInterface Implementation instance +void Endpoint::setConnectionStatusInterface(ConnectionStatusInterface *csi) { + if (__endpoint != NULL) { + __endpoint->setConnectionStatusInterface(csi); + } +} + // Constructor Endpoint::Endpoint(const Logger *logger, const Options *options) : M2MInterfaceObserver() { @@ -286,7 +293,7 @@ // object registered void Endpoint::object_registered(M2MSecurity *security, const M2MServer &server) { - this->logger()->log("Endpoint registered"); + this->logger()->log("Endpoint registered..."); this->m_connected = true; this->m_registered = true; @@ -303,7 +310,7 @@ // registration updated void Endpoint::registration_updated(M2MSecurity *security, const M2MServer &server) { - this->logger()->log("Endpoint re-registered."); + this->logger()->log("Endpoint re-registered..."); this->m_connected = true; this->m_registered = true; if (this->m_csi != NULL) { @@ -323,7 +330,7 @@ // bootstrap done void Endpoint::bootstrap_done(M2MSecurity *server) { - this->logger()->log("Bootstrapped"); + this->logger()->log("Endpoint bootstrapped..."); if (this->m_csi != NULL) { this->m_csi->bootstrapped((void *)this,(void *)server); } @@ -335,14 +342,14 @@ DynamicResource *target_res = this->lookupDynamicResource(base); if (target_res != NULL) { // DEBUG - this->logger()->log("Value Updated (Custom Resource)"); + //this->logger()->log("Value Updated (Custom Resource)"); // its a custom resource... target_res->process(base->operation(),type); } else { // DEBUG - this->logger()->log("Value Updated (Device Manager)"); + //this->logger()->log("Value Updated (Device Manager)"); // let DeviceManager handle it ((DeviceManager *)this->m_device_manager)->process(base,type); @@ -461,11 +468,9 @@ return this->m_registered; } -// Set the ConnectionStatusInterface Implementation instance +// Set the ConnectionStatusInterface void Endpoint::setConnectionStatusInterfaceImpl(ConnectionStatusInterface *csi) { - if (__endpoint != NULL) { - __endpoint->setConnectionStatusInterfaceImpl(csi); - } + this->m_csi = csi; } // Set our ObjectInstanceManager