Controls the output signal (relay) of the device.
int executeOutputAction(Channel channel, Relay relay)
channel: relay channel (0–1)relay: output signal informationReturns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Controls the LED of the device.
int executeLedAction(LedColor color)
color: LED colorReturns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Sets the Ethernet information.
int setEthernetConfig(boolean enableDHCP, String ip, String subnet, String gateway, String dnsServer)
enableDHCP: Decides whether to use DHCP.ip: IP address assigned to the device.subnet: Subnet mask of the device.gateway: IP address of the gateway.dnsServer: DNS server address.Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Open RS-232 serial port.
int openRS232(int baudrate)
baudrate: The RS-232 communication speed.
Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Close RS-232 serial port.
int closeRS232()
Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Read RS-232 data.
int readRS232(RS232Data data)
data: RS-232 data.Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.
Send RS-232 data.
int writeRS232(RS232Data data)
data: RS-232 data.Returns “SUCCESS” if successfully launched; returns the corresponding error code if an error occurs.