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
MBEDrssi.cpp@135:7f3f963cd159, 2014-03-28 (annotated)
- Committer:
- ansond
- Date:
- Fri Mar 28 17:49:10 2014 +0000
- Revision:
- 135:7f3f963cd159
- Parent:
- 126:3e63174bcbc6
- Child:
- 192:54b758a8eaaa
updates
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 126:3e63174bcbc6 | 1 | /* Copyright C2013 Doug Anson, MIT License |
ansond | 126:3e63174bcbc6 | 2 | * |
ansond | 126:3e63174bcbc6 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
ansond | 126:3e63174bcbc6 | 4 | * and associated documentation files the "Software", to deal in the Software without restriction, |
ansond | 126:3e63174bcbc6 | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
ansond | 126:3e63174bcbc6 | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
ansond | 126:3e63174bcbc6 | 7 | * furnished to do so, subject to the following conditions: |
ansond | 126:3e63174bcbc6 | 8 | * |
ansond | 126:3e63174bcbc6 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
ansond | 126:3e63174bcbc6 | 10 | * substantial portions of the Software. |
ansond | 126:3e63174bcbc6 | 11 | * |
ansond | 126:3e63174bcbc6 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
ansond | 126:3e63174bcbc6 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
ansond | 126:3e63174bcbc6 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
ansond | 126:3e63174bcbc6 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
ansond | 126:3e63174bcbc6 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
ansond | 126:3e63174bcbc6 | 17 | */ |
ansond | 126:3e63174bcbc6 | 18 | |
ansond | 126:3e63174bcbc6 | 19 | #include "mbed.h" |
ansond | 126:3e63174bcbc6 | 20 | |
ansond | 126:3e63174bcbc6 | 21 | #include "MBEDrssi.h" |
ansond | 126:3e63174bcbc6 | 22 | |
ansond | 126:3e63174bcbc6 | 23 | #include "MBEDEndpoint.h" |
ansond | 126:3e63174bcbc6 | 24 | |
ansond | 126:3e63174bcbc6 | 25 | // default constructor |
ansond | 126:3e63174bcbc6 | 26 | MBEDrssi::MBEDrssi(ErrorHandler *error_handler,Resource *resource) : MBEDio(error_handler,resource) { |
ansond | 126:3e63174bcbc6 | 27 | } |
ansond | 126:3e63174bcbc6 | 28 | |
ansond | 126:3e63174bcbc6 | 29 | // destructor |
ansond | 126:3e63174bcbc6 | 30 | MBEDrssi::~MBEDrssi() { |
ansond | 126:3e63174bcbc6 | 31 | } |
ansond | 126:3e63174bcbc6 | 32 | |
ansond | 126:3e63174bcbc6 | 33 | // update our value |
ansond | 126:3e63174bcbc6 | 34 | void MBEDrssi::update() { |
ansond | 135:7f3f963cd159 | 35 | if (this->resource() != NULL && this->resource()->getValuePointer() != NULL) strcpy(this->resource()->getValuePointer(),"-76"); // fixed RSSI for now... |
ansond | 126:3e63174bcbc6 | 36 | } |