antbot - Ant Chain#

Adapted Air780E

Note

This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!

Tip

This library has its own demo,click this link to view the demo example of antbot

Example

-- Copyright (C) 2015-2023 Ant Group Holding Limited
-- This module is implemented by the ant chain and is open to users.
-- Please refer to demo for specific usage and contact ant chain for technical support.

antbot.init()#

Initialization

Parameters

None

Return Value

return value type

explanation

int

0:Success Other values are Failure

Examples

-- Initialize the underlying adaptation of the ant chain
antbot.init()

antbot.app_sta_get()#

Get Client Status

Parameters

None

Return Value

return value type

explanation

int

Status Code

Examples

None


antbot.version_get()#

Obtain the SDK version number

Parameters

None

Return Value

return value type

explanation

string

Version number, returned if the get fails nil

Examples

None


antbot.asset_register(asset_id, asset_type, asset_dataver)#

asset Resource Registration

Parameters

Incoming Value Type

Explanation

string

asset_id Resources ID

string

asset_type Resource Type

string

asset_dataver Resource Data Version

Return Value

return value type

explanation

int

0:Success Other values are Failure

Examples

None


antbot.asset_data_publish(data)#

asset Resource Publishing

Parameters

Incoming Value Type

Explanation

string

data Resource Data

Return Value

return value type

explanation

int

0:Success Other values are Failure

Examples

None


antbot.device_status_get()#

Get Device Status

Parameters

None

Return Value

return value type

explanation

int

Device Status

Examples

None


antbot.asset_status_get(asset_id)#

Get the assset status

Parameters

Incoming Value Type

Explanation

string

asset_id Resources ID

Return Value

return value type

explanation

int

Resource Status

Examples

None


antbot.channel_switch(cmd)#

Switch channel

Parameters

Incoming Value Type

Explanation

int

0 - Off, 1-On

Return Value

return value type

explanation

int

0:Success Other values are Failure

Examples

None


antbot.config_set(config)#

Configure devices

Parameters

Incoming Value Type

Explanation

string

config CONFIGURATION CONTENT

Return Value

return value type

explanation

int

0:Success Other values are Failure

Examples

None


antbot.config_get()#

Get Device Configuration

Parameters

None

Return Value

return value type

explanation

string

CONFIGURATION CONTENT

Examples

None