Searchcitizenprinter Method - Citizen CL-S700 Programming Manual

Android label print sdk
Hide thumbs Also See for CL-S700:
Table of Contents

Advertisement

2.2.10 searchCitizenPrinter method

Syntax
CitizenPrinterInfo[] searchCitizenPrinter (int ifType, int searchTime, int[] result)
Parameters
Parameter
ifType
searchTime
result
The output parameter, result receives CLS_SUCCESS (0) on success, an error code otherwise. See
below for the error codes.
Error code
CLS_E_NOCONTEXT (1006)
CLS_E_ILLEGAL (1101)
CLS_E_NO_LIST (1106)
Description
Searches available Citizen printers and obtains a list of printer information. The connection type and
time out value must be specified.
method doesn't work on the simulator.
After the specified time of searching process, it returns an array of printer information found, receives
a result code to the output parameter, result.
In case of CLS_PORT_WiFi, the CL-S400/521/531/621/631/700/703 series and the
CL-E720/730/300/303/321/331 series can be found. It may fail to find when the time out value is
less than 3 seconds depanding on the network environment.
In case of CLS_PORT_Bluetooth or CLS_PORT_Bluetooth_Insecure as ifType, it returns addresses
which are already paired when 0 is set to searchTime, it returns addresses which are available to
connect when 1 to 30 is set to searchTime. 10 or above are recommended. It may fail to find if it
is less than 10 depending on the Bluetooth condition.
Return value
Returns a list of printer information when successful, returns empty otherwise.
The information will be stored in the CitizenPrinterInfo class type. Available information inside of the
class is depanding on the connection type.
Connection Type
CLS_PORT_WiFi
CLS_PORT_Bluetooth
[IN/OUT] Description
[IN]
Connection type
[IN]
Time out (sec)
[OUT]
Error code
"2.1 Return
value" describes all error codes.
Description
No context is specified.
Invalid parameter.
(1) The connect type is unsupported.
(2) The time out value is out of range.
No printer found.
setContext()
Property
ipAddress
macAddress
deviceName
bdAddress
ipAddress
macAddress
deviceName
CITIZEN Android Label Print SDK — Programming Manual
Setting range
CLS_PORT_WiFi
CLS_PORT_Bluetooth
CLS_PORT_Bluetooth_Insecure
0:
Get paired address in the case of
CLS_PORT_Bluetooth or
CLS_PORT_Bluetooth_Insecure.
1 - 30:
Search for a specified time.
must be called prior to searchCitizenPrinter(). This
Available information
IP Address
MAC Address
(Empty character)
(Empty character)
(Empty character)
(Empty character)
Bluetooth device name
26

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents