test code 123

Dependencies:   mbed

Fork of LinkNode-Test by Qi Yao

Committer:
youkee
Date:
Thu Sep 01 05:14:03 2016 +0000
Revision:
0:1ad0e04b1bc5
change internal time from 1s to 200ms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
youkee 0:1ad0e04b1bc5 1 /* mbed Microcontroller Library
youkee 0:1ad0e04b1bc5 2 * Copyright (c) 2006-2013 ARM Limited
youkee 0:1ad0e04b1bc5 3 *
youkee 0:1ad0e04b1bc5 4 * Licensed under the Apache License, Version 2.0 (the "License");
youkee 0:1ad0e04b1bc5 5 * you may not use this file except in compliance with the License.
youkee 0:1ad0e04b1bc5 6 * You may obtain a copy of the License at
youkee 0:1ad0e04b1bc5 7 *
youkee 0:1ad0e04b1bc5 8 * http://www.apache.org/licenses/LICENSE-2.0
youkee 0:1ad0e04b1bc5 9 *
youkee 0:1ad0e04b1bc5 10 * Unless required by applicable law or agreed to in writing, software
youkee 0:1ad0e04b1bc5 11 * distributed under the License is distributed on an "AS IS" BASIS,
youkee 0:1ad0e04b1bc5 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
youkee 0:1ad0e04b1bc5 13 * See the License for the specific language governing permissions and
youkee 0:1ad0e04b1bc5 14 * limitations under the License.
youkee 0:1ad0e04b1bc5 15 */
youkee 0:1ad0e04b1bc5 16
youkee 0:1ad0e04b1bc5 17 #ifndef __BLE_DEVICE_INSTANCE_BASE__
youkee 0:1ad0e04b1bc5 18 #define __BLE_DEVICE_INSTANCE_BASE__
youkee 0:1ad0e04b1bc5 19
youkee 0:1ad0e04b1bc5 20 #include "Gap.h"
youkee 0:1ad0e04b1bc5 21 #include "ble/SecurityManager.h"
youkee 0:1ad0e04b1bc5 22 #include "ble/BLE.h"
youkee 0:1ad0e04b1bc5 23
youkee 0:1ad0e04b1bc5 24 /* Forward declarations. */
youkee 0:1ad0e04b1bc5 25 class GattServer;
youkee 0:1ad0e04b1bc5 26 class GattClient;
youkee 0:1ad0e04b1bc5 27
youkee 0:1ad0e04b1bc5 28 /**
youkee 0:1ad0e04b1bc5 29 * The interface for the transport object to be created by the target library's
youkee 0:1ad0e04b1bc5 30 * createBLEInstance().
youkee 0:1ad0e04b1bc5 31 */
youkee 0:1ad0e04b1bc5 32 class BLEInstanceBase
youkee 0:1ad0e04b1bc5 33 {
youkee 0:1ad0e04b1bc5 34 public:
youkee 0:1ad0e04b1bc5 35 virtual ble_error_t init(BLE::InstanceID_t instanceID,
youkee 0:1ad0e04b1bc5 36 FunctionPointerWithContext<BLE::InitializationCompleteCallbackContext *> initCallback) = 0;
youkee 0:1ad0e04b1bc5 37 virtual bool hasInitialized(void) const = 0;
youkee 0:1ad0e04b1bc5 38 virtual ble_error_t shutdown(void) = 0;
youkee 0:1ad0e04b1bc5 39 virtual const char * getVersion(void) = 0;
youkee 0:1ad0e04b1bc5 40 virtual Gap& getGap() = 0;
youkee 0:1ad0e04b1bc5 41 virtual const Gap& getGap() const = 0;
youkee 0:1ad0e04b1bc5 42 virtual GattServer& getGattServer() = 0;
youkee 0:1ad0e04b1bc5 43 virtual const GattServer& getGattServer() const = 0;
youkee 0:1ad0e04b1bc5 44 virtual GattClient& getGattClient() = 0;
youkee 0:1ad0e04b1bc5 45 virtual SecurityManager& getSecurityManager() = 0;
youkee 0:1ad0e04b1bc5 46 virtual const SecurityManager& getSecurityManager() const = 0;
youkee 0:1ad0e04b1bc5 47 virtual void waitForEvent(void) = 0;
youkee 0:1ad0e04b1bc5 48 };
youkee 0:1ad0e04b1bc5 49
youkee 0:1ad0e04b1bc5 50 /**
youkee 0:1ad0e04b1bc5 51 * BLE uses composition to hide an interface object encapsulating the
youkee 0:1ad0e04b1bc5 52 * backend transport.
youkee 0:1ad0e04b1bc5 53 *
youkee 0:1ad0e04b1bc5 54 * The following API is used to create the singleton interface object. An
youkee 0:1ad0e04b1bc5 55 * implementation for this function must be provided by the device-specific
youkee 0:1ad0e04b1bc5 56 * library, otherwise there will be a linker error.
youkee 0:1ad0e04b1bc5 57 */
youkee 0:1ad0e04b1bc5 58 extern BLEInstanceBase *createBLEInstance(void);
youkee 0:1ad0e04b1bc5 59
youkee 0:1ad0e04b1bc5 60 #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__