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
MBEDToIOCResourceMap.h@25:2a001b4f7024, 2014-02-27 (annotated)
- Committer:
- ansond
- Date:
- Thu Feb 27 04:05:31 2014 +0000
- Revision:
- 25:2a001b4f7024
- Parent:
- 21:cfdaee0a2b50
- Child:
- 26:791d22d43cb4
updates
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 10:62107616fc6c | 1 | /* Copyright C2013 Doug Anson, MIT License |
ansond | 10:62107616fc6c | 2 | * |
ansond | 10:62107616fc6c | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
ansond | 10:62107616fc6c | 4 | * and associated documentation files the "Software", to deal in the Software without restriction, |
ansond | 10:62107616fc6c | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
ansond | 10:62107616fc6c | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
ansond | 10:62107616fc6c | 7 | * furnished to do so, subject to the following conditions: |
ansond | 10:62107616fc6c | 8 | * |
ansond | 10:62107616fc6c | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
ansond | 10:62107616fc6c | 10 | * substantial portions of the Software. |
ansond | 10:62107616fc6c | 11 | * |
ansond | 10:62107616fc6c | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
ansond | 10:62107616fc6c | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
ansond | 10:62107616fc6c | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
ansond | 10:62107616fc6c | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
ansond | 10:62107616fc6c | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
ansond | 10:62107616fc6c | 17 | */ |
ansond | 10:62107616fc6c | 18 | |
ansond | 10:62107616fc6c | 19 | #ifndef _MBEDTOIOCRESOURCEMAP_H_ |
ansond | 10:62107616fc6c | 20 | #define _MBEDTOIOCRESOURCEMAP_H_ |
ansond | 10:62107616fc6c | 21 | |
ansond | 20:f2dbbd852e08 | 22 | #include "ErrorHandler.h" |
ansond | 20:f2dbbd852e08 | 23 | #include "MapEntry.h" |
ansond | 10:62107616fc6c | 24 | |
ansond | 20:f2dbbd852e08 | 25 | #define NUM_MAPPINGS 16 |
ansond | 10:62107616fc6c | 26 | |
ansond | 10:62107616fc6c | 27 | class MBEDToIOCResourceMap { |
ansond | 10:62107616fc6c | 28 | private: |
ansond | 20:f2dbbd852e08 | 29 | ErrorHandler *m_error_handler; |
ansond | 20:f2dbbd852e08 | 30 | MapEntry *m_map[NUM_MAPPINGS]; |
ansond | 10:62107616fc6c | 31 | |
ansond | 10:62107616fc6c | 32 | public: |
ansond | 20:f2dbbd852e08 | 33 | MBEDToIOCResourceMap(ErrorHandler *error_handler); |
ansond | 10:62107616fc6c | 34 | ~MBEDToIOCResourceMap(); |
ansond | 10:62107616fc6c | 35 | |
ansond | 25:2a001b4f7024 | 36 | char *iocNameToEndpointName(char *ioc_name); |
ansond | 25:2a001b4f7024 | 37 | char *endpointNameToIOCName(char *mbed_name); |
ansond | 10:62107616fc6c | 38 | |
ansond | 10:62107616fc6c | 39 | private: |
ansond | 10:62107616fc6c | 40 | void createMap(); |
ansond | 21:cfdaee0a2b50 | 41 | char *convertFromNickName(char *ioc_name); |
ansond | 20:f2dbbd852e08 | 42 | ErrorHandler *logger(); |
ansond | 10:62107616fc6c | 43 | }; |
ansond | 10:62107616fc6c | 44 | |
ansond | 10:62107616fc6c | 45 | #endif // _MBEDTOIOCRESOURCEMAP_H_ |