最新revisionだとなんかerrorになるので、暫定的に rev 111にrevert。ごめんなさい。こういうときどういうふうにcommitすればいいのか分からなかったので。

Dependents:   MiniSteer_BLE

Fork of BLE_API by Bluetooth Low Energy

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BLEDeviceInstanceBase.h Source File

BLEDeviceInstanceBase.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef __BLE_DEVICE_INSTANCE_BASE__
00018 #define __BLE_DEVICE_INSTANCE_BASE__
00019 
00020 /**
00021  *  The interface for the transport object to be created by the target library's
00022  *  createBLEDeviceInstance().
00023  */
00024 class BLEDeviceInstanceBase
00025 {
00026 public:
00027     virtual const char *getVersion(void)           = 0;
00028     virtual Gap&        getGap()                   = 0;
00029     virtual GattServer& getGattServer()            = 0;
00030     virtual ble_error_t init(void)                 = 0;
00031     virtual ble_error_t reset(void)                = 0;
00032     virtual ble_error_t setTxPower(int8_t txPower) = 0;
00033     virtual void        waitForEvent(void)         = 0;
00034 };
00035 
00036 /**
00037  * BLEDevice uses composition to hide an interface object encapsulating the
00038  * backend transport.
00039  *
00040  * The following API is used to create the singleton interface object. An
00041  * implementation for this function must be provided by the device-specific
00042  * library, otherwise there will be a linker error.
00043  */
00044 extern BLEDeviceInstanceBase *createBLEDeviceInstance(void);
00045 
00046 #endif // ifndef __BLE_DEVICE_INSTANCE_BASE__