Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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
--- 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