Table of Contents

Control API

executeOutputAction

Controls the output signal (relay) of the device.

int executeOutputAction(Channel channel, Relay relay)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


executeLedAction

Controls the LED of the device.

int executeLedAction(LedColor color)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


setEthernetConfig

Sets the Ethernet information.

int setEthernetConfig(boolean enableDHCP, String ip, String subnet, String gateway, String dnsServer)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

The API will return immediately upon starting the Ethernet setting, the result will be passed on to the onActivityResult.


openRS232

Open RS-232 serial port.

int openRS232(int baudrate)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.

closeRS232

Close RS-232 serial port.

int closeRS232()

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


readRS232

Read RS-232 data.

int readRS232(RS232Data data)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.


writeRS232

Send RS-232 data.

int writeRS232(RS232Data data)

Parameters

Return Code

Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.