Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:control_api [2018/12/14 16:36]
simba created
en:control_api [2019/09/20 11:29] (current)
jbkim
Line 29: Line 29:
 Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs. Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.
  
 +\\
 +=====setEthernetConfig=====
 +Sets the Ethernet information.
 +<code java>
 +int setEthernetConfig(boolean enableDHCP, String ip, String subnet, String gateway, String dnsServer)
 +</​code>​
 +===Parameters===
 +  * ''​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.
 +===Return Code===
 +Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.
 +<callout type="​info"​ icon="​true">​
 +The API will return immediately upon starting the Ethernet setting, the result will be passed on to the onActivityResult.
 +</​callout>​
 +
 +\\
 +=====openRS232=====
 +Open RS-232 serial port. 
 +<code java>
 +int openRS232(int baudrate)
 +</​code>​
 +===Parameters===
 +  * ''​baudrate'':​ The RS-232 communication speed.
 +===Return Code===
 +Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.
 +\\
 +=====closeRS232=====
 +Close RS-232 serial port. 
 +<code java>
 +int closeRS232()
 +</​code>​
 +===Return Code===
 +Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.
 +
 +\\
 +=====readRS232=====
 +Read RS-232 data.
 +<code java>
 +int readRS232(RS232Data data)
 +</​code>​
 +===Parameters===
 +  * ''​data'':​ RS-232 data.
 +<callout type="​info">​
 +[[references#​RS232Data|Refer to RS232Data Class]]
 +</​callout>​
 +===Return Code===
 +Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.
 +
 +\\
 +=====writeRS232=====
 +Send RS-232 data.
 +<code java>
 +int writeRS232(RS232Data data)
 +</​code>​
 +===Parameters===
 +  * ''​data'':​ RS-232 data.
 +<callout type="​info">​
 +[[references#​RS232Data|Refer to RS232Data Class]]
 +</​callout>​
 +===Return Code===
 +Returns "​SUCCESS"​ if successfully launched; returns the corresponding error code if an error occurs.