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

Binding the Configuration

API Function

This API is used to configure AgentLite parameters.

API Description

1
2
HW_INT IOTA_ConfigSetStr(HW_INT iItem, HW_CHAR *pValue) 
HW_INT IOTA_ConfigSetUint(HW_INT iItem, HW_UINT uiValue)

Parameter Description

Parameter

Mandatory or Optional

Type

Description

key

Mandatory

HW_UINT

Specifies the configuration item bound to the device.

  • Platform IP address: EN_IOTA_CFG_IOCM_ADDR
  • Platform port number: EN_IOTA_CFG_IOCM_PORT

value

Mandatory

HW_CHAR *

Specifies the value of the configuration item.

  • Platform IP address: IP address of the AgentLite for interworking with the platform.
  • Platform port number: 8943

Return Value

For details, see 4.2 Function Return Values.

Example

1
2
3
//Developers call this API to configure parameters.
IOTA_ConfigSetStr (EN_IOTA_CONFIG_IOCM_ADDR, "10.0.0.1");
IOTA_ConfigSetUint(EN_IOTA_CFG_IOCM_PORT, 8943);