Page 2
CITIZEN UWP POS Print SDK - Programming Manual Revision Record Date Version Description May 22 2017 1.00 New issue. - Added CT-S751/CT-S4500 to supported models. May 8, 2019 1.01 - Added “3.3 About printing UTF-8 encode characters”. - Added CT-D101/CT-E301/CT-E601 and CT-D151-L/CT-E651-L to supported models.
Page 3
Microsoft Corporation in the United States and/or other countries. (Official name for Windows is Microsoft Windows Operating System.) Company names and product names appearing on this document are trademarks and/or registered trademarks of respective companies. CITIZEN is a registered trademark of Citizen Watch Co., Ltd.
CITIZEN UWP POS Print SDK - Programming Manual 1. Introduction This document is a programming manual for the CITIZEN UWP POS Print SDK. 1.1. Document target range This document is intended for developers who integrate their UWP (Universal Windows Platform) application programs with CITIZEN POS printers.
Page 8
CITIZEN UWP POS Print SDK - Programming Manual Series of Model Object Model Interface Printer Functions CT-D101 Series CT-D101 Wired LAN Standard CT-D150 Series CT-D150 Wired LAN Standard CT-D151 Standard Wired/Wireless LAN, CT-D151 Series Bluetooth CT-D151-L Blackmark paper is supported...
CITIZEN UWP POS Print SDK - Programming Manual 1.4. Printer setting It is the prerequisite for the use of this SDK that the memory switch of the printer is set as listed below. CT-D101 Series Memory Switch Setting MSW No.
Page 10
CITIZEN UWP POS Print SDK - Programming Manual CT-D151 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receive Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 11
CITIZEN UWP POS Print SDK - Programming Manual CT-E351 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 12
CITIZEN UWP POS Print SDK - Programming Manual CT-E651 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 13
CITIZEN UWP POS Print SDK - Programming Manual CT-S281 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 14
CITIZEN UWP POS Print SDK - Programming Manual CT-S601/651/801/851 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 15
CITIZEN UWP POS Print SDK - Programming Manual CT-S751 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 16
CITIZEN UWP POS Print SDK - Programming Manual CT-S4000 Series Memory Switch Setting MSW No. Function Setting Power ON Info Valid Buffer Size 4K bytes Busy condition Full Receiving Error Print ? CR Mode Ignored Auto cutter Valid Full Col Print...
Page 17
CITIZEN UWP POS Print SDK - Programming Manual Series. The firmware of a printer with older than followings, it is necessary to update the firmware. Model Firmware Version CT-S601 DL00-2000 or newer CT-S651 DM00-2000 or newer CT-S801 DH00-2000 or newer...
CITIZEN UWP POS Print SDK - Programming Manual 1.5. Supported Peripheral Devices models The models of peripheral devices applicable for control with this service are as follows. For details on the functions of each model, refer to the instruction manual of each peripheral device.
Page 19
CITIZEN UWP POS Print SDK - Programming Manual Prohibited Actions ⚫ Connecting other than a supported peripheral device (USB hub, smartphone, etc.) to a USB port of the interface. ⚫ Inserting and removing the cable connector of the peripheral device into/from a USB port of the interface while the printer power is on.
CITIZEN UWP POS Print SDK - Programming Manual 1.6. Install instruction 1. Close Visual Studio if you are using it. 2. Open "CITIZEN_UWP_POS_SDK###.vsix" ( the installer, where ### represents its version 3. Click "Install" on the "VSIX Installer" window. 4. Click "Close"...
Page 21
CITIZEN UWP POS Print SDK - Programming Manual and the "Extensions and Updates..." dialog will be opened. If "CITIZEN UWP POS Print SDK" is listed in this dialog, UWP POS Print SDK is installed successfully.
CITIZEN UWP POS Print SDK - Programming Manual 1.7. Definition method Adding Library In your Universal Windows application project in the Solution Explorer window, right-click the "References", and click "Add Reference...". Then the Reference Manager (see below) will open.
Page 23
Click "Extensions" on the left side tree, and installed extensions are listed in the Reference Manager. Check "CITIZEN UWP POS Print SDK" in this list and click "OK". Then CITIZEN UWP POS Print SDK will be registered in the project. You can find it in the Solution Explorer.
Page 24
Open Package.appxmanifest in the Solution Explorer and open "Capabilities" tab (see below), check "Bluetooth", "Internet (Clients)" and "Private Networks (Client & Server)". Adding Namespace A reference to the name space "com.citizen.sdk" must be stated at the top of the program source code. In the case of C#: using com.citizen.sdk;...
CITIZEN UWP POS Print SDK - Programming Manual 2. Printer Control 2.1. Program structure Here is an example program in C# which uses the SDK. // Create an instance. Class definition ESCPOSPrinter printer = new ESCPOSPrinter(); // Connect printer int result = await printer.ConnectAsync ( Connect ESCPOSConst.CMP_PORT_WiFi, "192.168.123.45");...
CITIZEN UWP POS Print SDK - Programming Manual 2.2. Functions list This SDK provides the following functions. Methods list Function Detail Create class This is constructor method. (Constructor) Connect printer Connect to the printer. (ConnectAsync method) Disconnect printer Disconnect the printer connection.
Page 27
CITIZEN UWP POS Print SDK - Programming Manual Set print completed timeout Set the timeout to check the print completion notification. (SetPrintCompletedTimeout method) Log settings Set the log function. (SetLog method) Properties List Function Attribute Detail PageMode area Shows the page area of page mode.
CITIZEN UWP POS Print SDK - Programming Manual 2.3. Library interfaces The following are the interfaces of this SDK. 2.3.1. Return value Methods to be described later return the value in the list below. Return value Description CMP_SUCCESS (0) The operation is success.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.2. Constructor Syntax ESCPOSPrinter () Parameter Not exist. Description It is the constructor for this library. It creates an instance. Return value Not exist. Example ESCPOSPrinter printer = new ESCPOSPrinter();...
CITIZEN UWP POS Print SDK - Programming Manual 2.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.
Page 31
CITIZEN UWP POS Print SDK - Programming Manual (1) The cover of the printer opens. (2) The printer is out of paper. (3) Auto Cutter Error occurred due to paper jam, etc. (4) Unrecoverable error occurred due to circuit failure, etc.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.4. DisconnectAsync method Syntax Task<int> DisconnectAsync () Parameter Not exist. Description This method is used to disconnect the printer connection. When the end of the print or errors occur, please disconnect the connection by the execution of this method.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.5. SetEncoding method Syntax int SetEncoding (string charset) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range charset [IN] Encoding that is supported depends on the Character set name implementation of Windows.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.6. PrinterCheckAsync method Syntax Task<int> PrinterCheckAsync () Parameter Not exist. Description This method is used to send the command to get the status of the printer. If the result of this method is successful, you can get the status of the printer by Status method.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.7. Status method Syntax 1) int Status () 2) int Status (int type) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range type...
Page 36
CITIZEN UWP POS Print SDK - Programming Manual int status3 = printer.Status(ESCPOSConst.CMP_STS_DRAWER_LEVEL_H); if ( (ESCPOSConst.CMP_STS_DRAWER_LEVEL_H & status3) > 0 ) { // Status of pin 3 of drawer kick-out connector = H...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.8. PrintTextAsync method Syntax Task<int> PrintTextAsync (string data, int alignment, int attribute, int textSize) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.9. PrintBitmapAsync method Syntax 1) Task<int> PrintBitmapAsync (string fileName, int alignment) 2) Task<int> PrintBitmapAsync (string fileName, int width, int alignment) 3) Task<int> PrintBitmapAsync (string fileName, int width, int alignment, int mode) 4) Task<int> PrintBitmapAsync (BitmapDecoder bitmap, int alignment) 5) Task<int>...
Page 39
CITIZEN UWP POS Print SDK - Programming Manual Mode can be specified in combination with the halftone and output method. If you want to combine, please specify the logical sum. If mode is omitted, printed at CMP_BM_MODE_HT_THRESHOLD | CMP_BM_MODE_CMD_RASTER. For more information on mode is as follows.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.10. PrintNVBitmapAsync method Syntax Task<int> PrintNVBitmapAsync (int nvImageNumber) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range nvImageNumber [IN] Bitmap image number that is stored in...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.11. PrintBarCodeAsync method Syntax Task<int> PrintBarCodeAsync (string data, int symbology, int height, int width, int alignment, int textPosition) Parameter The meaning and the setting range of the parameters are as follows. Value...
Page 42
CITIZEN UWP POS Print SDK - Programming Manual Return value Return CMP_SUCCESS (0) in success. Please refer to "2.3.1. Return value" for the error code except it. Example await printer.PrintBarCodeAsync ( "123456789012", ESCPOSConst.CMP_BCS_UPCA, ESCPOSConst.CMP_ALIGNMENT_LEFT, ESCPOSConst.CMP_HRI_TEXT_ABOVE );...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.12. PrintPDF417Async method Syntax Task<int> PrintPDF417Async (string data, int digits, int steps, int moduleWidth, int stepHeight, int ECLevel, int alignment) Parameter The meaning and the setting range of the parameters are as follows.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.13. PrintQRCodeAsync method Syntax int PrintQRCodeAsync (string data, int moduleSize, int ECLevel, int alignment) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.14. PrintGS1DataBarStackedAsync method Syntax Task<int> PrintGS1DataBarStackedAsync (string data, int symbology, int moduleSize, int maxSize, int alignment) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.15. CutPaperAsync method Syntax Task<int> CutPaperAsync (int type) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range type [IN] CMP_CUT_FULL: Full cut Cut type CMP_CUT_PARTIAL: Partial cut CMP_CUT_FULL_PREFEED:...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.16. UnitFeedAsync method Syntax Task<int> UnitFeedAsync (int ufCount) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range ufCount [IN] Expressed in the unit of measure...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.17. MarkFeedAsync method Syntax Task<int> MarkFeedAsync (int type) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range type [IN] CMP_MF_TO_CUTTER: Handling type of label paper or...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.18. OpenDrawerAsync method Syntax Task<int> OpenDrawerAsync (int drawer, int pulseLen) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range drawer [IN] Cash drawer number...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.19. TransactionPrintAsync method Syntax Task<int> TransactionPrintAsync (int control) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range control [IN] Transaction control CMP_TP_TRANSACTION: Begin a transaction.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.20. RotatePrintAsync method Syntax Task<int> RotatePrintAsync (int rotation) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range rotation [IN] Direction of rotation CMP_RP_ROTATE180: Start rotated printing 180°, that is, print...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.21. PageModePrintAsync method Syntax Task<int> PageModePrintAsync (int control) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range control [IN] CMP_PM_PAGE_MODE: Page Mode control...
Page 53
CITIZEN UWP POS Print SDK - Programming Manual Example // Standard print await printer.PrintNormalAsync( "\u001b|2vCSample 2 - Print\n"); await printer.PrintTextAsync( "1234567890123456789012345678901234567890123456789012345678901234 567890123456789012345678901234567890\n", ESCPOSConst.CMP_ALIGNMENT_RIGHT, ESCPOSConst.CMP_FNT_DEFAULT, ESCPOSConst.CMP_TXT_1WIDTH | ESCPOSConst.CMP_TXT_1HEIGHT); // Start of Page Mode await printer. PageModePrintAsync( ESCPOSConst.CMP_PM_PAGE_MODE ); // Set offset of Page Mode printer.SetPageModeVerticalPosition( 0 );...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.22. ClearPrintArea method Syntax int ClearPrintArea () Parameter Not exist. Description This method is used to clear the area defined by the PageModePrintArea property. Return value Return CMP_SUCCESS (0) in success. Please refer to "2.3.1.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.23. ClearOutputAsync method Syntax Task<int> ClearOutputAsync () Parameter Not exist. Description This method is used to clear all buffered output data by TransactionPrintAsync method PageModePrintAsync method. Also, when possible, halts outputs that are in progress. At the same time, the command to clear print data on the printer is sent.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.24. PrintDataAsync method Syntax Task<int> PrintDataAsync (byte[] data) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range data [IN] Send data Description This method is used to send data bytes to the printer directly.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.25. PrintNormalAsync method Syntax Task<int> PrintNormalAsync (string data) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range data [IN] Print data (Support OPOS escape sequence) Description This method is used to print using the escape sequences that are defined in the OPOS.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.26. GetVersionCode method Syntax int GetVersionCode () Parameter Not exist. Description This method is used to get a numerical value for the version number of this SDK. Return value Return a numerical value for the version number of this SDK. (200 means Ver2.00) Example printer.GetVersionCode();...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.27. GetVersionName method Syntax string GetVersionName () Parameter Not exist. Description This method is used to get a string for the version number of this SDK. Return value Return a string for the version number of this SDK. ("2.00" means Ver2.00) Example printer.GetVersionName();...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.28. WatermarkPrintAsync method Syntax Task<int> WatermarkPrintAsync (int start, int nvImageNumber, int pass, int feed, int repeat) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.29. SetPrintCompletedTimeout method Syntax int SetPrintCompletedTimeout(int timeout) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range timeout [IN] Timeout until the end Timeout is calcurated from print data, of printing automatically.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.30. SetLog method Syntax void SetLog (int mode, string path, int maxSize) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range mode [IN]...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.31. PageModeArea property Syntax string PageModeArea Attribute Read only Description This property holds the page area. Expressed in the unit of measure given by MapMode (default dots). The string consists of two ASCII numbers separated by a comma, in the following order: horizontal size, vertical size.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.32. PageModePrintArea property Syntax string PageModePrintArea Attribute Read/Write Description This property holds the print area of Page Mode. Expressed in the unit of measure given by MapMode (default dots). The maximum print area is the page area.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.33. PageModePrintDirection property Syntax int PageModePrintDirection Attribute Read/Write Description This property holds the print direction of the Page Mode print area. The print direction values are as follows. Value Meaning CMP_PD_LEFT_TO_RIGHT Print left to right, starting at top left position of the print area, i.e., normal printing.
CITIZEN UWP POS Print SDK - Programming Manual 2.3.34. PageModeHorizontalPosition property Syntax int PageModeHorizontalPosition Attribute Read/Write Description This property holds the horizontal start position offset within the Page Mode print area. Expressed in the unit of measure given by MapMode (default dots).
CITIZEN UWP POS Print SDK - Programming Manual 2.3.35. PageModeVerticalPosition property Syntax int PageModeVerticalPosition Attribute Read/Write Description This property holds the vertical start position offset within the Page Mode print area. Expressed in the unit of measure given by MapMode (default dots).
CITIZEN UWP POS Print SDK - Programming Manual 2.3.36. RecLineSpacing property Syntax int RecLineSpacing Attribute Read/Write Description This property holds the spacing of each single-high print line, including both the printed line height plus the whitespace between each pair of lines. Expressed in the unit of measure given by...
CITIZEN UWP POS Print SDK - Programming Manual 2.3.37. MapMode property Syntax int MapMode Attribute Read/Write Description This property holds the mapping mode of the printer. The mapping mode defines the unit of measure used for other properties, such as line heights and line spacing. The map mode values are as follows.
CITIZEN UWP POS Print SDK - Programming Manual 2.4. Notes Notes of this SDK are as follows. 2.4.1. Function to detect the completion of printing In this SDK, after the printing output, the SDK waits for the printing completion reply from a printer and judge the success / failure of the method.
CITIZEN UWP POS Print SDK - Programming Manual Log file name The extension of log files is ".log". In the file name, a numeric character which means the day of week is followed to ”CSJPOSLib”. The numeric character is from 0 to 6. "0" means Sunday, "1" means Monday.
Page 72
CITIZEN UWP POS Print SDK - Programming Manual Example printer.SetEncoding( "UTF-8" ); Supported models Model Firmware Version Conditions CT-S251 EM01-0304 or newer DT00-1000 or newer CT-S310II DT10-1100 or newer CT-S601II EE00-0200 or newer CT-S651II EA00-0200 or newer CT-S801II ED00-0200 or newer...
CITIZEN UWP POS Print SDK - Programming Manual 2.4.4. List of Constants Predefined Data Type Name Value Description type Result/Error CMP_SUCCESS 0 Successfully completed CMP_E_CONNECTED 1001 Already connected CMP_E_DISCONNECT 1002 Not connected CMP_E_NOTCONNECT 1003 Failed to connect CMP_E_CONNECT_NOTFOUND 1004 Non supported model...
Page 74
CITIZEN UWP POS Print SDK - Programming Manual CMP_TXT_7HEIGHT 6 7 times height CMP_TXT_8HEIGHT 7 8 times height Side CMP_SIDE_RIGHT 0 Right side CMP_SIDE_LEFT 1 Left side Bitmap width CMP_BM_ASIS -11 One bitmap pixel per printer dot Bitmap mode CMP_BM_MODE_CMD_RASTER...
Page 75
CITIZEN UWP POS Print SDK - Programming Manual Transaction CMP_TP_TRANSACTION 11 Begin transaction control CMP_TP_NORMAL 12 End transaction Rotation CMP_RT_NORMAL 0x0001 End rotation control CMP_RT_ROTATE180 0x0103 Begin upside-down rotation CMP_RP_BARCODE 0x1000 Begin barcode rotation CMP_RP_BITMAP 0x2000 Begin bitmap rotation Page mode...
CITIZEN UWP POS Print SDK - Programming Manual 3. Linedisplay Control 3.1. Program structure Here is an example program in C# which uses the SDK // Create an instance. Class definition LineDisplay display = new LineDisplay(); // Connect Linedisplay int result = await display.ConnectAsync(LineDisplayConst.CDP_PORT_WiFi, Connect "192.168.10.1");...
CITIZEN UWP POS Print SDK - Programming Manual 3.2. Functions list This SDK provides the following functions. Methods list Function Detail Connect display This method connects to the line display (ConnectAsync method) Disconnect display This method disconnects the line display connection.
CITIZEN UWP POS Print SDK - Programming Manual 3.3. Library interfaces The following are the interfaces of this SDK. 3.3.1. Return value Methods to be described later return the value in the list below. Return value Description CDP_SUCCESS (0) The operation is success.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.2. Constructor Syntax LineDisplay () Parameter Not exist. Description It is the constructor for the library. Create an instance. Return value Not exist. Example LineDisplay display = new LineDisplay();...
CITIZEN UWP POS Print SDK - Programming Manual 3.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.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.4. DisconnectAsync method Syntax Task<int> DisconnectAsync () Parameter Not exist. Description This method is used to disconnect the line display connection. When the end of the line display or some kind of errors occurs, please disconnect the connection by the execution of this method.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.5. DisplayTextAsync method Syntax Task<int> DisplayTextAsync (String data, boolean reverseFlag) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range Data Text data String ReverseFlag Reverse specification flag...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.6. ClearDisplayAsync method Syntax await Task<int> ClearDisplayAsync (int displayArea) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range displayArea Clear area CDP_AREA_ALL(0): Entire area CDP_AREA_CURSORLINE(1):Cursor line When the argument is omitted, it is treated as CDP_AREA_ALL.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.7. BlinkDisplayAsync method Syntax Task<int> BlinkDisplayAsync (int intervalBlink) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range IntervalBlink Blink interval (msec) From 0 Description This method causes the entire display screen to blink.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.8. SetDisplayModeAsync method Syntax Task<int> SetDisplayModeAsync (int displayMode) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range DisplayMode Display mode CDP_OVERWRITE(1): Overwrite mode CDP_VERTICALSCROLL(2): Vertical scroll mode...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.9. SetDisplayConfigAsync method Syntax Task<int> SetDisplayConfigAsync (int brightness) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range Brightness Brightness (%) 0 to 100 Description This method changes the brightness of the display screen.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.10. SetCursorPositionAsync method Syntax Task<int> SetCursorPositionAsync (int x, int y) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range Digit position From 1 Line position...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.11. MoveCursorAsync method Syntax Task<int> MoveCursorAsync (int dx, int dy) Parameter The meanings and settable values of the parameters are as follows. Value Meaning Settable range Rightward/leftward -128 to 127 movement amount...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.12. SetCursorTypeAsync method Syntax Task<int> SetCursorTypeAsync (int cursorType) Parameter The meanings and settable values of the parameters are as follows. Element Meaning Settable range CursorType Cursor type specification CDP_TYPE_NONE: Hide cursor CDP_TYPE_UNDERLINE: Display cursor...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.14. DisplayDataAsync method Syntax Task<int> DisplayDataAsync (byte[] data) Parameter The meanings and settable values of the parameters are as follows. Element Meaning Settable range data Send data Description This method is used to transmit byte data as it is to the device.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.15. SetEncoding method Syntax int SetEncoding (String charset) Parameter The meanings and settable values of the parameters are as follows. Element Meaning Settable range data Send data Description This method is used to set the encoding of the send data to the display.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.16. SetCodePageAsync method Syntax Task<int> SetCodePageAsync (int codePage) Parameter The meanings and settable values of the parameters are as follows. Element Meaning Settable range 0 - 255 codePage Code page specification Description Please refer to the command reference "ESC t"...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.17. SetInternationalCharactersetAsync method Syntax Task<int> SetInternationalCharactersetAsync (int characterset) Parameter The meanings and settable values of the parameters are as follows. Element Meaning Settable range 0 - 16 codePage International character specification Description Set the following international character set.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.18. DisplayCheckAsync method Syntax Task<int> DisplayCheckAsync () Parameter Not exist. Description This method is used to check the display connection status. When the execution result of this method is successful, you can confirm that the display is connected.
CITIZEN UWP POS Print SDK - Programming Manual 3.3.19. GetVersionCode method Syntax int GetVersionCode () Parameter Not exist. Description This method is used to get a numerical value for the version number of this SDK. Return value Return a numerical value for the version number of this SDK. (Ver1.00 is 100) Example int vno = display.GetVersionCode();...
CITIZEN UWP POS Print SDK - Programming Manual 3.3.20. GetVersionName method Syntax String GetVersionName () Parameter Not exist. Description This method is used to get a string for the version number of this SDK. Return value Return a string for the version number of this SDK. (Ver1.00 is "1.00") Example String vname = display.GetVersionName();...
CITIZEN UWP POS Print SDK - Programming Manual 3.4. Notes Notes of this SDK are as follows. 3.4.1. Logging function This SDK supports the log function which records the methods and properties. When setting the log function, use the SetLog method, or placing a file "CSJPOSLibD.cfg"...
CITIZEN UWP POS Print SDK - Programming Manual 2019/12/24 13:26:33 ------------------------------------------------------- 2019/12/24 13:26:33.706 8028 008 METHOD result DisplayTextAsync() -> Success(0) * When this SDK works with logging, it performs uncomfortably because a log file will be updated at every method and accessing properties .
CITIZEN UWP POS Print SDK - Programming Manual 4. Barcode Scanner Control 4.1. Program structure Here is an example program in C# which uses the SDK // Create an instance. Class definition Scanner scanner = new Scanner(); // Data event definition.
CITIZEN UWP POS Print SDK - Programming Manual 4.2. Functions list This SDK provides the following functions. Methods list Function Detail Connect scanner This method connects to the scanner. (connectAsync method) Disconnect scanner This method disconnects the scanner connection. (DisconnectAsync method) Get version code This method gets a numerical value for the version number of this SDK.
CITIZEN UWP POS Print SDK - Programming Manual 4.3. Library interfaces The followings are the interfaces of this SDK. 4.3.1. Return value Methods to be described later return the value in the list below. Return value Description CSC_SUCCESS (0) The operation is success.
CITIZEN UWP POS Print SDK - Programming Manual 4.3.2. Constructor Syntax Scanner () Parameter Not exist. Description It is the constructor for the library. Create an instance. Return value Not exist. Example Scanner scanner = new Scanner();...
CITIZEN UWP POS Print SDK - Programming Manual 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.
CITIZEN UWP POS Print SDK - Programming Manual 4.3.4. DisconnectAsync method Syntax Task<int> DisconnectAsync () Parameter Not exist. Description This method is used to disconnect the barcode scanner connection. When the end of the scanner or some kind of errors occurs, please disconnect the connection by the execution of this method.
CITIZEN UWP POS Print SDK - Programming Manual 4.3.5. GetVersionCode method Syntax int getVersionCode () Parameter Not exist. Description This method is used to get a numerical value for the version number of this SDK. Return value Return a numerical value for the version number of this SDK. (Ver1.00 is 100) Example int vno = scanner.GetVersionCode();...
CITIZEN UWP POS Print SDK - Programming Manual 4.3.6. GetVersionName method Syntax String getVersionName () Parameter Not exist. Description This method is used to get a string for the version number of this SDK. Return value Return a string for the version number of this SDK. (Ver1.00 is "1.00") Example String vname = scanner.GetVersionName();...
CITIZEN UWP POS Print SDK - Programming Manual 4.3.8. DataEvent event Syntax void DataEventHandler(byte[] status) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range data [IN] Scan data Description This event notifies data entry from the barcode scanner.
CITIZEN UWP POS Print SDK - Programming Manual 4.3.9. StatusUpdate event Syntax void StatusUpdateEventHandler(int status) Parameter The meaning and the setting range of the parameters are as follows. Value [IN/OUT] Meaning Setting range Status [IN] Status information CSC_SUE_POWER_ONLINE(2001): Device is ready...
CITIZEN UWP POS Print SDK - Programming Manual 4.4. Notes Notes of this SDK are as follows. 4.4.1. Logging function This SDK supports the log function which records the methods and the events. When setting the log function, use the SetLog method, or placing a file "CSJPOSLibS.cfg"...
Page 113
CITIZEN UWP POS Print SDK - Programming Manual * When this SDK works with logging, it performs uncomfortably because a log file will be updated at every method and accessing properties. * Because of the following reasons or else, log data will not be stored without any notification.
Page 114
CITIZEN UWP POS Print SDK - Programming Manual CITIZEN UWP POS Print SDK - Programming Manual July 28, 2021 For Ver. 2.00 CITIZEN SYSTEMS JAPAN CO., LTD. http://www.citizen-systems.co.jp/...