BLE mbed Endpoint network stack for mbedConnectorInterface. The stack makes use of a special BLE Socket abstraction to create socket() semantics over BLE.
Dependencies: libnsdl_m0 BLE_API Base64 nRF51822 SplitterAssembler
BLELocation.h
00001 /** 00002 * @file BLELocation.h 00003 * @brief mbed CoAP BLE BLELocation library 00004 * @author Doug Anson/Chris Paola 00005 * @version 1.0 00006 * @see 00007 * 00008 * Copyright (c) 2014 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #ifndef __BLE_LOCATION_H__ 00024 #define __BLE_LOCATION_H__ 00025 00026 // mbed API 00027 #include "mbed.h" 00028 00029 // Location base class 00030 #include "Location.h" 00031 00032 /** BLELocation class 00033 */ 00034 class BLELocation : public Connector::Location { 00035 public: 00036 /** 00037 Constructor 00038 */ 00039 BLELocation(const RawSerial *pc); 00040 00041 /** 00042 Destructor 00043 */ 00044 virtual ~BLELocation(); 00045 00046 /** 00047 Update the current location 00048 */ 00049 virtual void updateLocation(); 00050 00051 /** 00052 Process the location update response 00053 */ 00054 void processLocationUpdateResponse(char *response,int response_length); 00055 00056 /** 00057 Set the default location 00058 */ 00059 void setDefault(float latitude,float longitude,float altitude,float speed); 00060 00061 private: 00062 void dispatchUpdateRequest(); 00063 }; 00064 00065 #endif // __BLE_LOCATION_H__
Generated on Sun Jul 17 2022 05:11:06 by 1.7.2