Dji | Aeroscope | User guide | dji Aeroscope User guide

dji Aeroscope User guide
Aeroscope SDK Linux
User Guide
2018.05
V1.0
Contents
Introduction
1
2
Purpose
2
Intended Audience
2
Legends
2
References
2
Abbreviations and Terms
2
Aeroscope SDK Package
3
Installation
4
Environmental Requirements
4
SDK Package Extraction and Runtime Library Deployment
4
Running Examples
4
Main Processes and APIs
5
Main Processes
5
APIs for Sending and Receiving Data
5
APIs for Managing Aeroscope's Digital Certificates
5
Data Analysis
6
MsgId
6
MsgType
7
Transmitting Packet Data Structures
7
© 2018 DJI All Rights Reserved.
Introduction
Purpose
AEROSCOPETM SDK is a software development kit that provides application programming
interfaces (APIs) to help users build a server with an Aeroscope unit.
This manual provides a simple guide for SDK users, allowing users to quickly understand the
SDK and its main processes and APIs.
Intended Audience
This document is intended for users who are building their own server with an Aeroscope unit.
Legends
i Important
! Warning
X Error
References
File Name
Description
Aeroscope SDK Reference Manual (English Version):
UavMonitorSdkLinux_Reference.chm Provides a detailed reference for all APIs.
Included in the SDK package's Help directory.
Abbreviations and Terms
Term
Description
Aeroscope
A UAV detection system to identify, track, and monitor airborne drones.
API
Application Programming Interface
SDK
Software Development Kit
SSL
Secure Sockets Layer, a network security protocol
UAV
Unmanned Aerial Vehicle
© 2018 DJI All Rights Reserved.
2
Aeroscope SDK Package
The Aeroscope SDK package is provided as a ZIP file.
The directory structure after extraction is as follows:
UavMonitorSdkLinux_V1.n.nn.nnn
├─ Help
│ └─ html
├─ lib
├─ UavMonitorSdk
└─ UavMonitorSdkExample
The detailed directory and file contents are as follows:
UavMonitorSdkLinux_V1.n.nn.nnn
├─ Help
│ │ UavMonitorSdkLinux_V1.n.nn.nnn_Reference.chm
│ │ UavMonitorSdkLinux_V1.n.nn.nnn 参考手册 .chm
│ │
│ └─ html
│
annotated.htm
│
… (More files)
│
index.htm
│
…(More files)
├─ lib
│
libcrypto.so
│
libssl.so
│
libUavMonitorSdk.so
│
openssl.lic
│
├─ UavMonitorSdk
│
build_env_ver.txt
│
UavMonitorSdkApi.h
│
UavMonitorSdkMsg.h
│
ZytPal.h
│
└─ UavMonitorSdkExample
main.cpp
UavMonitorSdkExample.pro
UavMonitorSdkExample.pro.user
3
© 2018 DJI All Rights Reserved.
Aeroscope SDK Linux
Descriptions for the main folders in the directory are as follows:
Folder
Description
Help
This folder contains Help files, including the reference manual.
lib
This folder contains the SDK's shared library files (*.so), which
need to be copied to the corresponding "lib" directory of the
Linux system.
UavMonitorSdk
This folder contains the SDK's API-defined header files.
UavMonitorSdkExample
This folder contains an SDK application example.
Installation
Environmental Requirements
Refer to the "build_env_ver.txt" file in the "lib" folder of the SDK package for details about the
Linux SDK’s production, installation, and operation environments.
The following shows an example of a "build_env_ver.txt" file:
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64
x86_64 x86_64 GNU/Linux
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Qt Creator 3.0.1 based on Qt 5.2.1
OpenSSL 1.1.0f 25 May 2017
SDK Package Extraction and Runtime Library Deployment
Extract the SDK package and copy the runtime files to the system's run directory.
For example:
Copy the SDK's shared library files (*.so) to the "/usr/lib" directory.
Running Examples
The application example source code is in the "UavMonitorSdkExample" directory of the SDK
package.
Open "UavMonitorSdkExample.pro" with QT Creator, compile, and run.
© 2018 DJI All Rights Reserved.
4
Main Processes and APIs
Main Processes
The following APIs are used for the processes described in the table:
API
InitSdk
InitUavMonitorListenerCer
StartUavMonitorListener
StopUavMonitorListener
ExitSdk
Description
Initializes the SDK.
Configures the digital certificate and CA certificate for the
receiving server of the SDK.
Specifies the server TCP port and the application's data
processing callback function, then starts the receiving server.
Turns off the receiving server.
Exits the SDK and cleans up the environment.
You can refer to the Aeroscope SDK Reference Manual for details of example source code
and further descriptions of the APIs.
APIs for Sending and Receiving Data
To send data to a specified unit, you can use the SendToDevice API.
There are two ways to receive data:
• Callback function
• Polling
If a callback function is set when calling StartUavMonitorListener, a callback function is used.
Otherwise, if StartUavMonitorListener passes a null pointer to the callback function parameter,
polling is used. To receive data from all units through polling, use the ReceiveFromDevice
API.
APIs for Managing Aeroscope's Digital Certificates
Configure the Aeroscope's digital certificate to manage whether the unit is allowed to access
the receiving server.
The following APIs can be used to manage the digital certificates of Aeroscope:
API
AddUavMonitorCer
DelUavMonitorCer
SetUavMonitorCer
5
© 2018 DJI All Rights Reserved.
Description
Add an Aeroscope certificate to allow this unit to access the
receiving server.
Delete an Aeroscope certificate, preventing this unit from
accessing the receiving server.
Modify an Aeroscope certificate, which means that the unit
must use the new certificate the next time to access the
receiving server.
Data Analysis
MsgId
enum EIoMessageId
{
eimiIdNone,
///< 0
eimiIdUavInfoInd, ///< 1, Device -> UAV Information Ind -> Server
eimiIdDeviceStatusInd,
///< 2, Device -> Device Status Ind -> Server
eimiIdReadDeviceSetting,
///< 3, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdWriteDeviceSetting,
///< 4, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdDeviceStatusLogInd, ///< 5, Device -> Device Status Log Ind -> Server
eimiIdScanFreqResultInd,
///< 6, Device -> ScanFreq Result Status Ind ->
Server
eimiIdDeviceBistInd,
///< 7, Device -> Device Bist Ind -> Server
eimiIdDevMacSetting,
///< 8, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdDevVersion, / / / < 9 , S e r v e r - > S e r v e r T o D e v i c e R e q - > D e v i c e - >
ServerToDeviceAck -> Server
eimiId2DeviceHeartBeatInd,
///< 10, Server -> ServerToDeviceReq -> Device
eimiIdEnterUpgradeMode,
///< 11, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdReceiveFirmwareDataTransferMode,
/ / / < 1 2 , S e r v e r - >
ServerToDeviceReq -> Device -> ServerToDeviceAck -> Server
eimiIdFirmwareDataTransfer, ///< 13, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdFirmwareTransferDone, ///< 14, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdDevReboot, / / / < 1 5 , S e r v e r - > S e r v e r T o D e v i c e R e q - > D e v i c e - >
ServerToDeviceAck -> Server
eimiIdFirmwareUpgradeControl,
///< 16, Server -> ServerToDeviceReq ->
Device -> ServerToDeviceAck -> Server
eimiIdFirmwareUpgradeStatusInd,
///< 17, Device -> Device Firmware
Upgrade Status Ind -> Server
eimiIdClientCertValidInd,
///< 18, Device -> Device Cert Valid Ind -> Server
eimiIdClientSnInvalidInd,
///< 19, Device -> Device SN Invalid Ind -> Server
eimiIdClientNotMatchInd,
///< 20, Device -> Device SN Not Match Ind -> Server
eimiIdGetVersionOrLog,
///< 21, Server -> ServerToDeviceReq -> Device ->
ServerToDeviceAck -> Server
eimiIdDeviceFirwareConsUpgradeInd,
///< 22, Device -> Device Firmware
consistency upgrade Ind -> Server
eimiIdNum
///< maximum
};
© 2018 DJI All Rights Reserved.
6
Aeroscope SDK Linux
MsgType
enum EIoMessageType
{
eimtTypeNone,
///< 0
/// Request from Server to Device
eimtTypeServerToDeviceReq, ///< 1, Server -> Req -> Device
eimtTypeServerToDeviceAck, ///< 2, Server <- Ack <- Device
eimtTypeServerToDeviceTimeout,
///< 3, Server <- ServerToDeviceReq
Timeout <- SDK
eimtTypeServerToDeviceError,
///< 4, Server <- ServerToDeviceReq Error
<- SDK
/// Request from Device to Server
eimtTypeDeviceToServerReq, ///< 5, Device -> Req -> Server
eimtTypeDeviceToServerAck, ///< 6, Device <- Ack <- Server
eimtTypeDeviceToServerError,
///< 7, SDK <- Error <- Server
/// Indication from Device to Server
eimtTypeDeviceToServerInd, ///< 8, Device -> Ind -> Server
// Indication from Server to Device
eimtTypeServerToDeviceInd, ///< 9, Server -> Ind -> Device
/// Device Management from SDK to Server
eimtTypeDeviceArrival,
///< 10, SDK -> Device Arrival -> Server
eimtTypeDeviceRemoval,
///< 11, SDK -> Device Removal -> Server
eimtTypeDeviceFailure,
///< 12, SDK -> Device Failure -> Server
eimtTypeDeviceRecovery,
///< 13, SDK -> Device Recovery -> Server
};
/// SDK Management from Server to Device
eimtTypeSdkError, ///< 14, SDK -> Error -> Server
eimtTypeSdkIoControlReq, ///< 15, Server -> IO Control Req -> SDK
eimtTypeSdkIoControlAck,
///< 16, Server <- IO Control Ack <- SDK
eimtTypeNum
///< maximum
Transmitting Packet Data Structures
Not yet available.
7
© 2018 DJI All Rights Reserved.
This content is subject to change.
Download the latest version from
http://www.dji.com/aeroscope
If you have any questions about this document, please contact DJI by
sending a message to DocSupport@dji.com.
© 2018 DJI All Rights Reserved.
Printed in China.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising