The SDK for Edge Function Compute mainly includes interfaces for device operations, message publishing, and function calls.


The following sections describe the functions of the SDK for Edge Function Compute.

  • Device operations

    Device operations are the most common requirements in IoT scenarios. To facilitate reading and writing device information, the Edge Function Compute SDK provides the following four types of API operations:

    • Obtain a device property on IoT Platform
    • Configure properties of a device
    • Invoke a service on a device
    • Obtain a device list based on tags
  • Message publishing

    The SDK provides functions that publishes messages to a specified topic. You can also use the message routing feature to forward messages to other functions that have subscribed to the topic and forward messages to the cloud.

  • Function calls

    A Function Compute-based application is a type of event-driven programming. Event sources can be device messages and timers, or calls to other functions. Each Function Compute-based application exists as an independent program. You can also invoke a Function Compute-based application the way you invoke a function. The application can accept input parameters and return processed results.

Install the SDK

The Edge Function Compute SDK provides the Node.js version and the Python version. Both versions have been integrated into the Link IoT Edge software package and can be directly used.

  1. Obtain the SDK Library.
  2. Import the SDK.
    • Import the SDK for Node.js.
      const leSdk = require('linkedge-core-sdk');
    • Import the SDK for Python.
      import lecoresdk