Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: BaseClass.cpp
- Revision:
- 135:7f3f963cd159
- Parent:
- 134:58e7537a8c5f
- Child:
- 155:582462821bd7
diff -r 58e7537a8c5f -r 7f3f963cd159 BaseClass.cpp --- a/BaseClass.cpp Fri Mar 28 16:24:12 2014 +0000 +++ b/BaseClass.cpp Fri Mar 28 17:49:10 2014 +0000 @@ -22,7 +22,7 @@ // default constructor BaseClass::BaseClass(ErrorHandler *error_handler,void *endpoint) { this->m_error_handler = error_handler; - this->m_endpoint = endpoint; + this->setEndpoint(endpoint); } // default destructor @@ -33,4 +33,11 @@ ErrorHandler *BaseClass::logger() { return this->m_error_handler; } // Endpoint accessor - void *BaseClass::endpoint() { return this->m_endpoint; } \ No newline at end of file + void *BaseClass::getEndpoint() { return this->m_endpoint; } + void BaseClass::setEndpoint(void *endpoint) { this->m_endpoint = endpoint; } + + // min function + int BaseClass::min(int value1,int value2) { + if (value1 < value2) return value1; + return value2; + } \ No newline at end of file