Fork of ble-x-nucleo-idb0xa1 with changes required by BleStarMbed
source/BlueNRGDiscoveredCharacteristic.cpp@0:ac0b0725c6fa, 2018-02-20 (annotated)
- Committer:
- lorevee
- Date:
- Tue Feb 20 11:07:16 2018 +0000
- Revision:
- 0:ac0b0725c6fa
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lorevee | 0:ac0b0725c6fa | 1 | /* mbed Microcontroller Library |
lorevee | 0:ac0b0725c6fa | 2 | * Copyright (c) 2006-2013 ARM Limited |
lorevee | 0:ac0b0725c6fa | 3 | * |
lorevee | 0:ac0b0725c6fa | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
lorevee | 0:ac0b0725c6fa | 5 | * you may not use this file except in compliance with the License. |
lorevee | 0:ac0b0725c6fa | 6 | * You may obtain a copy of the License at |
lorevee | 0:ac0b0725c6fa | 7 | * |
lorevee | 0:ac0b0725c6fa | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
lorevee | 0:ac0b0725c6fa | 9 | * |
lorevee | 0:ac0b0725c6fa | 10 | * Unless required by applicable law or agreed to in writing, software |
lorevee | 0:ac0b0725c6fa | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
lorevee | 0:ac0b0725c6fa | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
lorevee | 0:ac0b0725c6fa | 13 | * See the License for the specific language governing permissions and |
lorevee | 0:ac0b0725c6fa | 14 | * limitations under the License. |
lorevee | 0:ac0b0725c6fa | 15 | */ |
lorevee | 0:ac0b0725c6fa | 16 | |
lorevee | 0:ac0b0725c6fa | 17 | #include "BlueNRGDiscoveredCharacteristic.h" |
lorevee | 0:ac0b0725c6fa | 18 | #include "BlueNRGGattClient.h" |
lorevee | 0:ac0b0725c6fa | 19 | |
lorevee | 0:ac0b0725c6fa | 20 | void BlueNRGDiscoveredCharacteristic::setup(BlueNRGGattClient *gattcIn, |
lorevee | 0:ac0b0725c6fa | 21 | Gap::Handle_t connectionHandleIn, |
lorevee | 0:ac0b0725c6fa | 22 | DiscoveredCharacteristic::Properties_t propsIn, |
lorevee | 0:ac0b0725c6fa | 23 | GattAttribute::Handle_t declHandleIn, |
lorevee | 0:ac0b0725c6fa | 24 | GattAttribute::Handle_t valueHandleIn, |
lorevee | 0:ac0b0725c6fa | 25 | GattAttribute::Handle_t lastHandleIn) |
lorevee | 0:ac0b0725c6fa | 26 | { |
lorevee | 0:ac0b0725c6fa | 27 | gattc = gattcIn; |
lorevee | 0:ac0b0725c6fa | 28 | connHandle = connectionHandleIn; |
lorevee | 0:ac0b0725c6fa | 29 | declHandle = declHandleIn; |
lorevee | 0:ac0b0725c6fa | 30 | valueHandle = valueHandleIn; |
lorevee | 0:ac0b0725c6fa | 31 | lastHandle = lastHandleIn; |
lorevee | 0:ac0b0725c6fa | 32 | |
lorevee | 0:ac0b0725c6fa | 33 | props._broadcast = propsIn.broadcast(); |
lorevee | 0:ac0b0725c6fa | 34 | props._read = propsIn.read(); |
lorevee | 0:ac0b0725c6fa | 35 | props._writeWoResp = propsIn.writeWoResp(); |
lorevee | 0:ac0b0725c6fa | 36 | props._write = propsIn.write(); |
lorevee | 0:ac0b0725c6fa | 37 | props._notify = propsIn.notify(); |
lorevee | 0:ac0b0725c6fa | 38 | props._indicate = propsIn.indicate(); |
lorevee | 0:ac0b0725c6fa | 39 | props._authSignedWrite = propsIn.authSignedWrite(); |
lorevee | 0:ac0b0725c6fa | 40 | } |
lorevee | 0:ac0b0725c6fa | 41 | |
lorevee | 0:ac0b0725c6fa | 42 | void BlueNRGDiscoveredCharacteristic::setup(BlueNRGGattClient *gattcIn, |
lorevee | 0:ac0b0725c6fa | 43 | Gap::Handle_t connectionHandleIn, |
lorevee | 0:ac0b0725c6fa | 44 | UUID uuidIn, |
lorevee | 0:ac0b0725c6fa | 45 | DiscoveredCharacteristic::Properties_t propsIn, |
lorevee | 0:ac0b0725c6fa | 46 | GattAttribute::Handle_t declHandleIn, |
lorevee | 0:ac0b0725c6fa | 47 | GattAttribute::Handle_t valueHandleIn, |
lorevee | 0:ac0b0725c6fa | 48 | GattAttribute::Handle_t lastHandleIn) |
lorevee | 0:ac0b0725c6fa | 49 | { |
lorevee | 0:ac0b0725c6fa | 50 | gattc = gattcIn; |
lorevee | 0:ac0b0725c6fa | 51 | connHandle = connectionHandleIn; |
lorevee | 0:ac0b0725c6fa | 52 | uuid = uuidIn; |
lorevee | 0:ac0b0725c6fa | 53 | declHandle = declHandleIn; |
lorevee | 0:ac0b0725c6fa | 54 | valueHandle = valueHandleIn; |
lorevee | 0:ac0b0725c6fa | 55 | lastHandle = lastHandleIn; |
lorevee | 0:ac0b0725c6fa | 56 | |
lorevee | 0:ac0b0725c6fa | 57 | props._broadcast = propsIn.broadcast(); |
lorevee | 0:ac0b0725c6fa | 58 | props._read = propsIn.read(); |
lorevee | 0:ac0b0725c6fa | 59 | props._writeWoResp = propsIn.writeWoResp(); |
lorevee | 0:ac0b0725c6fa | 60 | props._write = propsIn.write(); |
lorevee | 0:ac0b0725c6fa | 61 | props._notify = propsIn.notify(); |
lorevee | 0:ac0b0725c6fa | 62 | props._indicate = propsIn.indicate(); |
lorevee | 0:ac0b0725c6fa | 63 | props._authSignedWrite = propsIn.authSignedWrite(); |
lorevee | 0:ac0b0725c6fa | 64 | } |
lorevee | 0:ac0b0725c6fa | 65 | |
lorevee | 0:ac0b0725c6fa | 66 | void BlueNRGDiscoveredCharacteristic::setLastHandle(GattAttribute::Handle_t lastHandleIn) { |
lorevee | 0:ac0b0725c6fa | 67 | lastHandle = lastHandleIn; |
lorevee | 0:ac0b0725c6fa | 68 | } |