Connectasync Method - Citizen CT-D101 Series Programming Manual

Hide thumbs Also See for CT-D101 Series:
Table of Contents

Advertisement

4.3.3. ConnectAsync method

Syntax
1) Task<int> ConnectAsync (int connectType, String addr)
2) Task<int> ConnectAsync (int connectType, String addr, int port)
3) Task<int> ConnectAsync (int connectType, String addr, int port, int timeout)
Parameter
The meaning and the setting range of the parameters are as follows.
Value
connectType
addr
port
timeout
Description
This method is used to connect the barcode scanner. Please specify the type and address of the printer
to which the barcode scanner is connected.
Connection port number is valid only if you specify the connection type CSC_PORT_WiFi. If it is omitted,
you connected with number 9210.
Timeout is gives the maximum number of milliseconds to connect scanner. If it is omitted, you
connected with 4000 milliseconds when using WiFi.
When communication with the scanner is not necessary, must execute the
disconnect the scanner connection. When not disconnect, the next connection will be an error.
Return value
Return CSC_SUCCESS (0) in success. Please check the description of the error codes below in the case
of failure. Please refer to
Error codes
CSC_E_NOTCONNECT (1003)
Example
await scanner.ConnectAsync(ScannerConst.CSC_PORT_WiFi, "192.168.0.10");
[IN/OUT]
Meaning
[IN]
Connection type of the
printer
[IN]
IP address or BD address to
connect
[IN]
Connection port number
[IN]
Timeout (msec)
"4.3.1 Return
value" for the error code except it.
Description
Failed connection to the scanner.
(1) The scanner is under none-connection status.
(2) The printer is not turned ON.
(3) Cannot obtain handle of interface board.
CITIZEN UWP POS Print SDK - Programming Manual
Setting range
CSC_PORT_WiFi
CSC_PORT_Bluetooth
WiFi:
Bluetooth: 00:00:00:00:00:00~
105
0.0.0.0~255.255.255.255
FF:FF:FF:FF:FF:FF
DisconnectAsync method
to

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents