Added support for obtaining BLE device name by parsing advertising data.
Fork of BLE_BlueNRG by
BlueNRGDevice.h@7:e293b0f43dc7, 2014-07-31 (annotated)
- Committer:
- hemddabral
- Date:
- Thu Jul 31 11:09:28 2014 +0000
- Revision:
- 7:e293b0f43dc7
- Parent:
- 2:a2b623661316
Added support for parsing BLE device name from advertising data
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mridup | 2:a2b623661316 | 1 | /* mbed Microcontroller Library |
mridup | 2:a2b623661316 | 2 | * Copyright (c) 2006-2013 ARM Limited |
mridup | 2:a2b623661316 | 3 | * |
mridup | 2:a2b623661316 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
mridup | 2:a2b623661316 | 5 | * you may not use this file except in compliance with the License. |
mridup | 2:a2b623661316 | 6 | * You may obtain a copy of the License at |
mridup | 2:a2b623661316 | 7 | * |
mridup | 2:a2b623661316 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
mridup | 2:a2b623661316 | 9 | * |
mridup | 2:a2b623661316 | 10 | * Unless required by applicable law or agreed to in writing, software |
mridup | 2:a2b623661316 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
mridup | 2:a2b623661316 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mridup | 2:a2b623661316 | 13 | * See the License for the specific language governing permissions and |
mridup | 2:a2b623661316 | 14 | * limitations under the License. |
mridup | 2:a2b623661316 | 15 | */ |
mridup | 2:a2b623661316 | 16 | |
mridup | 2:a2b623661316 | 17 | #ifndef __BLUENRG_H__ |
mridup | 2:a2b623661316 | 18 | #define __BLUENRG_H__ |
mridup | 2:a2b623661316 | 19 | |
mridup | 2:a2b623661316 | 20 | #define BLUENRG |
mridup | 2:a2b623661316 | 21 | #define DEBUG_BLUENRG_USER |
mridup | 2:a2b623661316 | 22 | |
mridup | 2:a2b623661316 | 23 | #include "btle.h" |
mridup | 2:a2b623661316 | 24 | |
mridup | 2:a2b623661316 | 25 | #include "mbed.h" |
mridup | 2:a2b623661316 | 26 | #include "blecommon.h" |
mridup | 2:a2b623661316 | 27 | #include "BLEDevice.h" |
mridup | 2:a2b623661316 | 28 | #include "BlueNRGGap.h" |
mridup | 2:a2b623661316 | 29 | #include "BlueNRGGattServer.h" |
mridup | 2:a2b623661316 | 30 | |
mridup | 2:a2b623661316 | 31 | |
mridup | 2:a2b623661316 | 32 | class BlueNRGDevice : public BLEDeviceInstanceBase |
mridup | 2:a2b623661316 | 33 | { |
mridup | 2:a2b623661316 | 34 | public: |
mridup | 2:a2b623661316 | 35 | BlueNRGDevice(void); |
mridup | 2:a2b623661316 | 36 | virtual ~BlueNRGDevice(void); |
mridup | 2:a2b623661316 | 37 | |
mridup | 2:a2b623661316 | 38 | virtual Gap &getGap() { |
mridup | 2:a2b623661316 | 39 | return BlueNRGGap::getInstance(); |
mridup | 2:a2b623661316 | 40 | }; |
mridup | 2:a2b623661316 | 41 | virtual GattServer &getGattServer() { |
mridup | 2:a2b623661316 | 42 | return BlueNRGGattServer::getInstance(); |
mridup | 2:a2b623661316 | 43 | }; |
mridup | 2:a2b623661316 | 44 | virtual ble_error_t init(void); |
mridup | 2:a2b623661316 | 45 | virtual ble_error_t reset(void); |
mridup | 2:a2b623661316 | 46 | virtual void waitForEvent(void); |
mridup | 2:a2b623661316 | 47 | }; |
mridup | 2:a2b623661316 | 48 | |
mridup | 2:a2b623661316 | 49 | #endif |