Updated on 2022-02-24 GMT+08:00

Before You Start

1. Overview

The IoT AgentLite (AgentLite for short) provides standard capabilities for intelligent devices to access the IoT platform in smart home, industrial IoT, connected vehicles, and other fields. These intelligent devices, such as IP cameras (IPCs), lightweight gateways, industrial gateways, and head units, have strong computing capabilities.

2. API Overview

The following table lists the functions provided by the AgentLite, the APIs for implementing these functions, and the relationship between the APIs. It helps you quickly locate APIs that are used to develop specific services.

Function

API

Description

Access of directly connected devices

BaseService.init

Initializes AgentLite resources.

BaseService.destroy

Releases AgentLite resources.

BindConfig.setConfig

Configures device binding.

BindService.bind

Binds devices.

HubService.TOPIC_UNBINDDEVICE

Receives device unbinding commands.

LoginConfig.setConfig

Configures login information.

LoginService.login

Connects devices to the IoT platform.

LoginService.logout

Disconnects devices from the IoT platform.

Management of non-directly connected devices on a gateway

HubService.addDevice

Adds devices.

HubService.updateDeviceStatus

Updates device status.

HubService.rmvDevice

Deletes devices.

Reporting device service data

DataTransService.dataReport

Reports device service data.

Receiving device service commands

DataTransService.TOPIC_COMMAND_RECEIVE

Receives device service commands.