Build Sample

2023-12-11
No Rating

Obtain ESDK Package

Download address: https://github.com/dji-sdk/Edge-SDKopen in new window

Project Directory

The directory structure below is for reference only. Please refer to the actual software package structure for accuracy.

.
├── doc   // Doc introduction
├── examples  // demo code
│   ├── cloud_api
│   ├── common
│   │   └── data
│   │       └── tensorflow
│   ├── init
│   ├── liveview
│   ├── media_manager
│   └── test
├── include // Edge-SDK library
│   ├── cloud_api
│   ├── error_code
│   ├── init
│   ├── liveview
│   ├── logger
│   └── media_manager
├── lib // Edge-SDK static library
│   ├── aarch64
│   └── x86_64
└── third_party  // Third-party build CMake dependency

Developer Information Verification

  1. Click "App > CREATE APP" 在developer websiteopen in new window to apply ESDK application.
  2. Fill the developer information and License to the /examples/init/app_info.h file in ESDK project.

Secure Communication Key Configuration

Developers need to implement the key retrieval interface and ensure the security of the keys.

Edge SDK provides a default implementation method in the /examples/init/key_store_default.cc directory. It's important to note that after binding, the keys obtained through the key retrieval interface should remain unchanged every time the edge computing device is powered on.

The default implementation of keys provided is stored in the /tmp/ directory and will be lost upon power cycle.

// Developers need to implement the communication key retrieval interface. The interface is defined as follows:
class KeyStore {
   public:
    KeyStore() = default;
    virtual ~KeyStore() {}

    KeyStore(const KeyStore&) = delete;
    KeyStore& operator=(const KeyStore&) = delete;

    /* @brief Returns RSA2048 DER private key.
     * @return Execution result.
     */
    virtual ErrorCode RSA2048_GetDERPrivateKey(
        std::string& private_key) const = 0;

    /* @brief Returns RSA2048 DER public key.
     * @return Execution result.
     */
    virtual ErrorCode RSA2048_GetDERPublicKey(
        std::string& public_key) const = 0;
};

Build Sample Code

Execute mkdir build && cmake .. && make -j4 under the root directory of ESDK Project.

If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.