Latest 0.2.4
Homepage https://github.com/GL-ZHU/DNavAssistantSDK
License MIT
Platforms ios 8.0
Dependencies BabyBluetooth
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

DNavAssistantSDK is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'DNavAssistantSDK'

用法

DNavAssistantSDK

DNavAssistantSDK是SDK中最主要的类,用来管理蓝牙的连接、断开、自动重连(内部已经实现),获取数据等。所以在使用sdk的第一步,需要使用执行类方法defaultSDK初始化默认的SDK。

初始化

DNavAssistantSDK *sdk = [DNavAssistantSDK defaultSDK];

连接蓝牙

[sdk contentBluetooth:^(NSString *buletoothName) {
    NSLog(@"连接成功的蓝牙名称%@",buletoothName);
} failed:^(NSString *reason) {
    NSLog(@"错误原因:%@",reason);
} withContentStatus:^(DNavAssistantSDKContentStatus status) {
    NSLog(@"当前连接状态:%ld",status);
}];

切换频道

注意:如果需要获取RTK转发的数据,首先需要将切换为DNavAssistantSDKChannelRTK频道;在执行切换操作前,一定要确保蓝牙处于连接状态,否则调用此函数没有任何效果。
// 切换到RTK数据接收频道
[sdk switchChannel:DNavAssistantSDKChannelRTK];

接收RTK频道数据

// 接收数据前,要确保已经将频道切换到DNavAssistantSDKChannelRTK
[sdk RTKChannelStartResponse:^(NSData *response) {
    NSLog(@"接收到RTK数据%@",response);
}];

地面站数据控制

查询经纬度、高程信息
[sdk groundStationChannelDataControl:^(DNavAssistantDataControl *dataControl) {
    dataControl.read(DNSearchPosition);
} response:^(NSDictionary *result) {
    NSLog(@"%@",result);
}];
设置经纬度、高程等信息
[sdk groundStationChannelDataControl:^(DNavAssistantDataControl *dataControl) {
    dataControl.write(DNFixPosition).longitude(120.20).latitude(20.102).height(10.21);
} response:^(NSDictionary *result) {
    NSLog(@"%@",result);
}];

DNavAssistantDataControl

DNavAssistantDataControl是地面站数据控制的管理者,可以通过链式语法直接构造自己需要的数据链。

DNavAssistantDataControl的使用注意:

该类主要有读、写两个操作;目前所有的数据操作分为以下两种:

read

读、后面不需要传入任何的参数。

DNSearchPosition
DNSearchStar
DNSearchStatus
DNGpsTimeSmart
DNGpsStandardDeviation
write

写、后面一定要传入参数,否则会导致蓝牙通讯出错

DNFixPosition
DNFixFromTimePosition

Author

GL-ZHU, [email protected]

License

DNavAssistantSDK is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DNavAssistantSDK",
    "version": "0.2.4",
    "summary": "DNavAssistantSDK.",
    "description": "TODO: u57fau4e8eBabyBluetoothu7684u5c01u88c5uff0cu7528u4e8eRTKu63a5u6536u673au6570u636eu7684u63a5u53d7uff0cu53cau6570u636eu89e3u6790",
    "homepage": "https://github.com/GL-ZHU/DNavAssistantSDK",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "GL-ZHU": "[email protected]"
    },
    "source": {
        "git": "https://github.com/GL-ZHU/DNavAssistantSDK.git",
        "tag": "0.2.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "vendored_frameworks": "DNavAssistantSDK/Classes/DNavAssistantSDK_iOS.framework",
    "dependencies": {
        "BabyBluetooth": []
    }
}

Pin It on Pinterest

Share This