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.
Fork of BLE_API by
common/GattService.cpp@259:a95264ad705c, 2015-01-21 (annotated)
- Committer:
- rgrover1
- Date:
- Wed Jan 21 09:32:48 2015 +0000
- Revision:
- 259:a95264ad705c
- Parent:
- 106:a20be740075d
- Child:
- 260:ea7f9f14cc15
Synchronized with git rev 580f31d8
Author: marcuschang
Added chained callbacks for onDataSent.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Rohit Grover |
106:a20be740075d | 1 | /* mbed Microcontroller Library |
| Rohit Grover |
106:a20be740075d | 2 | * Copyright (c) 2006-2013 ARM Limited |
| Rohit Grover |
106:a20be740075d | 3 | * |
| Rohit Grover |
106:a20be740075d | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| Rohit Grover |
106:a20be740075d | 5 | * you may not use this file except in compliance with the License. |
| Rohit Grover |
106:a20be740075d | 6 | * You may obtain a copy of the License at |
| Rohit Grover |
106:a20be740075d | 7 | * |
| Rohit Grover |
106:a20be740075d | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| Rohit Grover |
106:a20be740075d | 9 | * |
| Rohit Grover |
106:a20be740075d | 10 | * Unless required by applicable law or agreed to in writing, software |
| Rohit Grover |
106:a20be740075d | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| Rohit Grover |
106:a20be740075d | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| Rohit Grover |
106:a20be740075d | 13 | * See the License for the specific language governing permissions and |
| Rohit Grover |
106:a20be740075d | 14 | * limitations under the License. |
| Rohit Grover |
106:a20be740075d | 15 | */ |
| Rohit Grover |
106:a20be740075d | 16 | |
| Rohit Grover |
106:a20be740075d | 17 | |
| Rohit Grover |
106:a20be740075d | 18 | #include <stdio.h> |
| Rohit Grover |
106:a20be740075d | 19 | #include <string.h> |
| Rohit Grover |
106:a20be740075d | 20 | |
| Rohit Grover |
106:a20be740075d | 21 | #include "GattService.h" |
| Rohit Grover |
106:a20be740075d | 22 | |
| Rohit Grover |
106:a20be740075d | 23 | /**************************************************************************/ |
| Rohit Grover |
106:a20be740075d | 24 | /*! |
| Rohit Grover |
106:a20be740075d | 25 | @brief Creates a new GattService using the specified 128-bit UUID |
| Rohit Grover |
106:a20be740075d | 26 | |
| Rohit Grover |
106:a20be740075d | 27 | @note The UUID value must be unique on the device |
| Rohit Grover |
106:a20be740075d | 28 | |
| Rohit Grover |
106:a20be740075d | 29 | @param[in] uuid |
| Rohit Grover |
106:a20be740075d | 30 | The 16 byte (128-bit) UUID to use for this characteristic |
| Rohit Grover |
106:a20be740075d | 31 | |
| Rohit Grover |
106:a20be740075d | 32 | @section EXAMPLE |
| Rohit Grover |
106:a20be740075d | 33 | |
| Rohit Grover |
106:a20be740075d | 34 | @code |
| Rohit Grover |
106:a20be740075d | 35 | |
| Rohit Grover |
106:a20be740075d | 36 | @endcode |
| Rohit Grover |
106:a20be740075d | 37 | */ |
| Rohit Grover |
106:a20be740075d | 38 | /**************************************************************************/ |
| Rohit Grover |
106:a20be740075d | 39 | GattService::GattService(const UUID &uuid, GattCharacteristic *characteristics[], unsigned numCharacteristics) : |
| Rohit Grover |
106:a20be740075d | 40 | _primaryServiceID(uuid), _characteristicCount(numCharacteristics), _characteristics(characteristics), _handle(0) |
| Rohit Grover |
106:a20be740075d | 41 | { |
| Rohit Grover |
106:a20be740075d | 42 | /* empty */ |
| Rohit Grover |
106:a20be740075d | 43 | } |
