High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
UUID.h@34:da2ea8cd6216, 2014-05-21 (annotated)
- Committer:
- Rohit Grover
- Date:
- Wed May 21 15:01:14 2014 +0100
- Revision:
- 34:da2ea8cd6216
- Parent:
- 27:4a83843f04b0
- Child:
- 50:9078969e80e4
white space diffs; generated using uncrustify
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ktownsend | 27:4a83843f04b0 | 1 | /* mbed Microcontroller Library |
ktownsend | 27:4a83843f04b0 | 2 | * Copyright (c) 2006-2013 ARM Limited |
ktownsend | 27:4a83843f04b0 | 3 | * |
ktownsend | 27:4a83843f04b0 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
ktownsend | 27:4a83843f04b0 | 5 | * you may not use this file except in compliance with the License. |
ktownsend | 27:4a83843f04b0 | 6 | * You may obtain a copy of the License at |
ktownsend | 27:4a83843f04b0 | 7 | * |
ktownsend | 27:4a83843f04b0 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
ktownsend | 27:4a83843f04b0 | 9 | * |
ktownsend | 27:4a83843f04b0 | 10 | * Unless required by applicable law or agreed to in writing, software |
ktownsend | 27:4a83843f04b0 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
ktownsend | 27:4a83843f04b0 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ktownsend | 27:4a83843f04b0 | 13 | * See the License for the specific language governing permissions and |
ktownsend | 27:4a83843f04b0 | 14 | * limitations under the License. |
ktownsend | 27:4a83843f04b0 | 15 | */ |
Rohit Grover |
34:da2ea8cd6216 | 16 | |
ktownsend | 27:4a83843f04b0 | 17 | |
ktownsend | 0:ace2e8d3ce79 | 18 | #ifndef __UUID_H__ |
ktownsend | 0:ace2e8d3ce79 | 19 | #define __UUID_H__ |
ktownsend | 0:ace2e8d3ce79 | 20 | |
ktownsend | 0:ace2e8d3ce79 | 21 | #include "blecommon.h" |
ktownsend | 0:ace2e8d3ce79 | 22 | |
ktownsend | 0:ace2e8d3ce79 | 23 | class UUID |
ktownsend | 0:ace2e8d3ce79 | 24 | { |
ktownsend | 0:ace2e8d3ce79 | 25 | private: |
Rohit Grover |
34:da2ea8cd6216 | 26 | |
ktownsend | 0:ace2e8d3ce79 | 27 | public: |
ktownsend | 0:ace2e8d3ce79 | 28 | enum |
ktownsend | 0:ace2e8d3ce79 | 29 | { |
ktownsend | 0:ace2e8d3ce79 | 30 | UUID_TYPE_SHORT = 0, // Short BLE UUID |
ktownsend | 0:ace2e8d3ce79 | 31 | UUID_TYPE_LONG = 1 // Full 128-bit UUID |
ktownsend | 0:ace2e8d3ce79 | 32 | }; |
Rohit Grover |
34:da2ea8cd6216 | 33 | |
ktownsend | 0:ace2e8d3ce79 | 34 | UUID(void); |
ktownsend | 0:ace2e8d3ce79 | 35 | UUID(uint8_t const[16]); |
ktownsend | 0:ace2e8d3ce79 | 36 | UUID(uint16_t const); |
ktownsend | 0:ace2e8d3ce79 | 37 | virtual ~UUID(void); |
Rohit Grover |
34:da2ea8cd6216 | 38 | |
Rohit Grover |
34:da2ea8cd6216 | 39 | uint8_t type; // UUID_TYPE_SHORT or UUID_TYPE_LONG |
Rohit Grover |
34:da2ea8cd6216 | 40 | uint8_t base[16]; // in case of custom |
Rohit Grover |
34:da2ea8cd6216 | 41 | uint16_t value; // 16 bit uuid (byte 2-3 using with base) |
Rohit Grover |
34:da2ea8cd6216 | 42 | |
ktownsend | 0:ace2e8d3ce79 | 43 | ble_error_t update(uint8_t const[16]); |
ktownsend | 0:ace2e8d3ce79 | 44 | ble_error_t update(uint16_t const); |
ktownsend | 0:ace2e8d3ce79 | 45 | }; |
ktownsend | 0:ace2e8d3ce79 | 46 | |
Rohit Grover |
34:da2ea8cd6216 | 47 | #endif // ifndef __UUID_H__ |