Native App Print for Windows
API Download
SDK Download for WindowsReference Guide
mPOS Controller Devices
1 OverviewMPosControllerDevices Class provides basic functions with regards to the device, and the events and functions included in this class can be used in the classes of all devices.
2 Common Events
The event methods used in each SDK are as follows.
Event name |
iOS SDK |
Android SDK |
Windows SDK |
DataEvent |
NSNotification |
DataListener |
Callback function |
StatusUpdateEvent |
NSNotification |
StatusUpdateListener |
Callback function |
1) DataEvent
If data entry occurs in B-gate or a device connected to B-gate, the data will be sent to the application through the registered event.
If the status of a device changes, the new status will be sent to the application through the registered event. The data transmission and processing status of each host will be sent from the multi-host environment. The sent value is an integer type constant value that has been defined in advance.
Code |
Value |
Description |
MPOS_STATUS_NORMAL |
0 |
Printing is possible |
MPOS_STATUS_PRINTER_COVEROPEN |
1006 |
Cover is open |
MPOS_STATUS_PRINTER_PAPEREMPTY |
1007 |
No paper |
MPOS_STATUS_PRINTER_PAPER_NEAREND |
1004 |
Insufficient paper |
MPOS_STATUS_PRINTER_ERROR |
1000 |
Error |
MPOS_STATUS_BUSY |
1200 |
Communicating with another host |
MPOS_STATUS_PROGRESS |
1201 |
Transmitting |
MPOS_STATUS_COMPLETED |
1202 |
Transmission complete |
MPOS_STATUS_REQUIRE_RESET |
1203 |
B-gate reset required |
MPOS_STATUS_FAIL |
1204 |
Transmission failed |
3 Data Types
The data type defined in the manual is defined as follows according to the SDK.
Data Types |
iOS SDK |
Android SDK |
Windows SDK |
int |
NSInteger |
Int |
int |
long |
long |
long |
long |
boolean |
BOOL |
Boolean |
BOOL |
string |
NSString* |
String |
LPCTSTR |
RawData |
NSData* |
byte[] |
char* |
ImageData |
UIImage* |
Bitmap |
char* |
char |
char |
String |
LPCTSTR |
list |
NSArray |
Set |
- |
4 Methods
Configures the interface type and address of the B-gate you wish to connect.
This function must be used before calling the openService function.
[Syntax]
long selectInterface(int interfaceType, string address);
[Parameters]
Select the interface typr of int interfaceType: B-gate.
Code |
Value |
Description |
MPOS_INTERFACE_WIFI |
1 |
Use when connecting to Wi-Fi. |
MPOS_INTERFACE_ETHERNET |
2 |
Use when connecting to Ethernet. |
MPOS_INTERFACE_BLUETOOTH |
4 |
Use when connecting to Bluetooth. |
MPOS_INTERFACE_USB |
16 |
Use when connecting to USB. Only supports Windows SDK. |
string address: Enter the interface address value of B-gate.
For Ethernet, use the “IP address [:tcp port number]” format. The tcp port number can be omitted, and the default value is 9100. If the tcp port number of B-gate has been changed, the new number must be used. For a Bluetooth interface, the appropriate value according to the type of SDK must be entered.
SDK Types |
Address value |
iOS SDK |
Serial number of B-gate |
Android SDK |
Bluetooth MAC Address |
Windows SDK |
Paired COM port number |
For a USB interface, it can be used only in Windows SDK and it will automatically search for connected devices.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_OPENED |
1010 |
Called after openService function |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Parameter is invalid |
MPOS_FAIL |
1000 |
Failed |
Configures whether the host and the relevant device will communicate directly or through B-gate. This function must be used before the calling the openService function.
If this function is not used, it will be configured as the default value. If communicating with the device directly, make sure to call this function.
Caution |
The products that can communicate with the device directly are SRP-Q300/Q302 and BCD-2000/3000. |
[Syntax]
long selectCommandMode(int commandMode);
[Parameters]
int commandMode: Select the mode to communicate with B-gate or a device.
Code |
Value |
Description |
MPOS_COMMAND_MODE_DEFAULT |
0 |
Communicate through B-gate (default value) |
MPOS_COMMAND_MODE_BYPASS |
1 |
Direct communication |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_OPENED |
1010 |
Called after openService function |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Parameter is invalid |
MPOS_FAIL |
1000 |
Failed |
3) setTimeout
Configures the timeout value (unit: seconds) when the openService function is running.
The default value of the timeout will be applied if this function is not used. This function must be used before calling the openService function.
[Syntax]
long setTimeout(int timeout);
[Parameters]
int timeout: Use only values larger than 0 (default value: 3 seconds)
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_OPENED |
1010 |
Called after openService function |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Initializes the device with the smallest Device Id value out of the relevant devices connected to B-gate.
[Syntax]
long openService(void);
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_ALREADY_OPEN |
1 |
It is already connected |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_NO_RESPONSE |
1005 |
No response |
MPOS_FAIL |
1000 |
Failed |
5) openService(int openDeviceId)
Initializes the usable relevant device by having the openDeviceId value as the smallest
value. For Windows SDK, the openServiceById function must be used instead of the
openService function.
[Syntax]
long openService(int openDeviceId);
long openServiceById(int openDeviceId); // only Windows SDK applies
[Parameters]
int openDeviceId: The smallest value within the Id range of each device. Only a value that lies within the range of each device can be used.
Device types |
Id range |
Label Printer |
1~9 |
POS Printer |
10~19 (number 10 is B-gate solid type printer) |
HID |
20~29 |
MSR |
30~39 |
Barcode Scanner |
40~49 |
RFID |
60~69 |
Dallas Key |
70~79 |
NFC |
80~89 |
Customer Display |
110~119 |
USB-to-Serial |
120~129 |
Scale |
130~139 |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_ALREADY_OPEN |
1 |
It is already connected |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_NO_RESPONSE |
1005 |
No response |
MPOS_FAIL |
1000 |
Failed |
6) closeService(int closeTimeout)
Ends the use of a device.
[Syntax]
long closeService (int closeTimeout);
[Parameters]
int closeTimeout: Use a value (unit: seconds) larger than or use the constant value below.
Code |
Value |
Description |
MPOS_CLOSE_TIMEOUT_IMMEDIATELY |
0 |
End immediately when function is called |
MPOS_CLOSE_TIMEOUT_INFINITE |
-1 |
End after sending transmission buffer data |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_ALREADY_OPEN |
1 |
It is already connected |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_NO_RESPONSE |
1005 |
No response |
MPOS_FAIL |
1000 |
Failed |
Returns the usable status of the relevant device.
[Syntax]
long isOpen(void);
[Return Values]
Return value |
Description |
true |
Device can be used |
false |
Device cannot be used |
Returns the Device Id of the relevant device.
[Syntax]
long getDeviceId(void);
[Return Values]
Code |
Value |
Description |
Device Id of the relevant device |
# |
Device Id value of the device |
MPOS_FAIL_NO_OPEN |
1002 |
Device cannot be used |
MPOS_FAIL |
1000 |
Failed |
Instantly sends data to the relevant device.
[Syntax]
long directIO(RawData data);
long directIO(RawData data, int dataLength); //only Windows SDK applies
For Windows SDK, the data and dataLength must be used together in the parameter.
[Parameters]
RawData data: Data to be sent to device.
int dataLength: Length of the data to be sent to device. Only Windows SDK applies
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NO_OPEN |
1002 |
Device cannot be used |
MPOS_FAIL |
1000 |
Failed |
Configures the Transaction mode or cancels it after sending Transaction data to B-gate.
Using the Transaction mode in a multi-host environment will guarantee data integrity between hosts. If another host is communicating with B-gate, the transmission and processing of sent data may be delayed, while the processing results of data in B-gate can be checked through StatusUpdateEvent.
Caution |
It is recommended to use the Transaction mode in multi-host environments when using output devices such as printers, Customer displays, label printers, etc. |
[Syntax]
long setTransaction(int mode);
[Parameters]
int mode: Configure the transaction mode
Code |
Value |
Description |
MPOS_TRANSACTION_IN |
1 |
Enter transaction mode |
MPOS_TRANSACTION_OUT |
0 |
Cancel transaction mode after data transmission |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
The Function has been succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_TRANSACTION_ALREADY_IN |
1015 |
Already in transaction mode |
MPOS_FAIL |
1000 |
Failed |
Configures the read data mode of the input device. If this function is not called, it will be configured to the ‘always receive data’ mode. It can only be used in the input device.
[Syntax]
long setReadMode(int mode);
[Parameters]
int mode: Configure the read data mode. The constants defined below must be used.
Code |
Value |
Description |
MPOS_READMODE_ALWAYS |
0 |
Always receive data (default value) |
MPOS_READMODE_ONCE |
1 |
Receive data only once |
MPOS_READMODE_NONE |
2 |
Do not receive data |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
12) convertHID(int newDeviceType)
You can use the HID device by changing it to a different input device.
[Syntax]
long convertHID(int newDeviceType);
[Parameters]
int newDeviceType: The device type to change the HID device into the constant values of device types that can be used are as follows.
Code |
Value |
Description |
MPOS_DEVICE_LABEL_PRINTER |
1 |
Label Printer |
MPOS_DEVICE_PRINTER |
10 |
POS Printer |
MPOS_DEVICE_MSR |
30 |
MSR |
MPOS_DEVICE_SCANNER |
40 |
Barcode Scanner |
MPOS_DEVICE_RFID |
60 |
RFID |
MPOS_DEVICE_DALLAS_KEY |
70 |
Dallas Key |
MPOS_DEVICE_NFC |
80 |
NFC |
MPOS_DEVICE_DISPLAY |
110 |
Customer Display |
MPOS_DEVICE_USB_TO_SERIAL |
120 |
USB-to-Serial |
MPOS_DEVICE_SCALE |
130 |
Scale |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NO_OPEN |
1002 |
Device cannot be used |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Changes the status value of the current SDK.
[Syntax]
long getResult(void);
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
There are currently no errors |
MPOS_FAIL_NO_OPEN |
1002 |
Failed |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL_NO_RESPONSE |
1005 |
No response |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_NO_FILE |
1008 |
There is no file |
MPOS_FAIL_OPENED |
1010 |
Invalid parameter |
MPOS_PAGEMODE_ALREADY_IN |
1014 |
Already in pagemode |
MPOS_TRANSACTION_ALREADY_IN |
1015 |
Already in transation mode |
MPOS_FAIL_2D_BARCODE |
1016 |
Symbology is a 2-D barcode |
MPOS_FAIL_NOT_SUPPORT_ESCSEQ |
1017 |
An unsupported ESC Sequence has been included |
mPOS Controller Printer
1 OverviewMPosControllerPrinter Class provides functions regarding Thermal Printer out of the devices connected to B-gate.
Caution |
- Dot printers must use the MPosControllerDotPrinter Class. - Label printers must use the MPosControllerLabelPrinter Class. |
2 Events
Printer statuses can be received through events. The values defined for each status are as follows.
Code |
Value |
Description |
MPOS_STATUS_NORMAL |
0 |
Printing is possible |
MPOS_STATUS_PRINTER_PAPEREMPTY |
1002 |
No paper |
MPOS_STATUS_PRINTER_PAPER_ NEAREND |
1004 |
Insufficient paper |
MPOS_STATUS_PRINTER_COVEROPEN |
1005 |
Cover is open |
MPOS_STATUS_PRINTER_ERROR |
1006 |
Error |
3 Methods
This is a function that prints character strings. The attributes of the character string to be printed can be configured using FontAttribute or ESC Sequence. If using FontAttribute, you cannot use ESC Sequence. If using ESC Sequence, FontAttribute must be configured as ‘NULL’.
[Syntax]
long printText(string data, FontAttribute attr);
[Parameters]
string data: Character string to be printed
FontAttribute attr: Attributes of the character string to be printed
FontAttribute is an object that can define font attributes.
The defined types according to SDK are as follows.
SDK type |
FontAttribute object type |
iOS SDK |
struct |
Android SDK |
Class |
Windows SDK |
struct |
Properties that can be configured as FontAttribute are as follows.
Attribute name |
Value type |
Attribute Description |
fontType |
int |
Configures font type |
fontSize |
int |
Configures font size as scale unit |
bold |
boolean |
Configures font as bold |
underline |
boolean |
Configures font as underlined |
reverse |
boolean |
Configures font as reversed |
alignment |
int |
Alignment value of character string to be printed |
textEncoding |
int |
Value to be used when Encoding the character string to be printed |
Character string attributes that can be configured in FontAttribute can be substituted by ESC Sequence. Please refer to [ESC Sequence] for details on ESC Sequence.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
MPOS_FAIL_NOT_SUPPORT_ESCSEQ |
1017 |
Unsupported ESC Sequence is included |
ESC Sequences
These are commands that begin with the characters ESC(0x1B) + ‘|’(0x7C).
Out of the commands below, “#” represents a decimal number value, and a range value exists for each command. “[]” indicates commands that can be omitted. If a number value is omitted, it will become “0”. “!” is a command that cancels the relevant configuration.
An ESC Sequence command that is unsupported by the printer will be ignored.
Escape Sequence |
Supported or unsupported, and configuration value range |
Description |
[#]P |
O (# : 0~100) |
Cutting |
[#]fP |
O (# : 0~100) |
Cutting after feed |
[#]lF |
O (# : 0~50) |
Line feeding as much as # number |
#fT |
O (# : 0~3) |
Configures font types according to # value 0: Default font (A), 1 = Font B, 2 = Font C |
[!]bC |
O |
Bold |
[!][#]uC |
O (# : 1~2) |
Underline |
[!]rvC |
O |
Reverse |
1C |
O |
Font size 1 times width, 1 times height |
2C |
O |
Font size 2 times width, 1 times height |
3C |
O |
Font size 1 times width, 2 times height |
4C |
O |
Font size 2 times width, 2 times height |
#hC |
O |
# times font width proportion |
#vC |
O |
# times font height proportion |
cA |
O |
Align center |
rA |
O |
Align right |
lA |
O |
Align left |
N |
O |
Initialize value that is configurable as ESC Sequence Font type A, font size 1 times width, 1 times height Cancel bold, cancel underline, cancel reverse |
This is the value used when Encoding character strings within SDK.
If you enter a character string that does not exist in the Codepage that corresponds to the Encoding value, incorrect characters such as “?” may be printed in accordance with the default settings of the OS. To change the printer’s codepage settings, you must call the setCharacterset function.
[Syntax]
long setTextEncoding(int textEncoding);
[Parameters]
int textEncoding: The codepage value used when Encoding a character string
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
The Function has been succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL |
1000 |
Failed |
Configures the printer’s codepage. The appropriate codepage value must be used in each printer. If the printer’s codepage has already been configured with the printer configuration utility, this function does not need to be used.
[Syntax]
long setCharacterset(int characterset);
[Parameters]
int characterset: The printer’s codepage value
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL |
1000 |
Failed |
4) setInternationalCharacterset
Configures the printer’s international characterset.
[Syntax]
long setInternationalCharacterset(int internationalCharset);
[Parameters]
int internationalCharset: The printer’s international characterset value
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
Cuts the paper.
[Syntax]
long cutPaper(int cutType);
[Parameters]
int cutType: Cutting type. The defined constant values are listed below.
Code |
Value |
Description |
MPOS_PRINTER_CUTPAPER |
1 |
Cut in place |
MPOS_PRINTER_FEEDCUT |
65 |
Cut after feeding |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures pagemode or cancels it after printing.
Caution |
- Pagemode cannot be used simultaneously with transaction mode. - Printing with pagemode will guarantee data integrity in a multi-host environment. |
[Syntax]
long setPagemode (int mode);
[Parameters]
int mode: Configure pagemode. The defined constant values are listed below.
Code |
Value |
Description |
MPOS_PRINTER_PAGEMODE_IN |
1 |
Enter Pagemode |
MPOS_PRINTER_PAGEMODE_OUT |
0 |
Cancel Pagemode after printing |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_PAGEMODE_ALREADY_IN |
1014 |
Already in pagemode |
MPOS_FAIL |
1000 |
Failed |
Configures the printing area of pagemode.
[Syntax]
long setPagemodePrintArea(int x, int y, int width, int height);
[Parameters]
int x: The starting x value of the pagemode printing area
int y: The starting y value of the pagemode printing area
int width: Width value of pagemode printing area
int height: Height value of pagemode printing area
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the printing direction in pagemode.
[Syntax]
long setPagemodeDirection(int direction);
[Parameters]
int direction: Printing direction
Code |
Value |
Description |
MPOS_PRINTER_PD_0 |
0 |
0 degree turn |
MPOS_PRINTER_PD_LEFT90 |
1 |
90 degree turn counter-clockwise |
MPOS_PRINTER_PD_180 |
2 |
180 degree turn |
MPOS_PRINTER_PD_RIGHT90 |
3 |
90 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the coordinates of the printing target in pagemode.
[Syntax]
long setPagemodePosition(int x, int y);
[Parameters]
int x: x axis coordinate value of object to be printed
int y: y axis coordinate value of object to be printed
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Prints an image file.
[Syntax]
long printBitmapFile(string filename, long width, long alignment, long brightness,
boolean isDithering, boolean isCompress);
[Parameters]
string filename: The path of the image file to be printed
long width: The width of the printed image. Use a value larger than 0 or a constant value below.
Code |
Value |
Description |
MPOS_IMAGE_WIDTH_ASIS |
-2 |
Print as original image size |
long alignment: Alignment.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align to the left |
MPOS_ALIGNMENT_CENTER |
1 |
Align at the center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align to the right |
long brightness: The brightness of the image when printing. Can use a number between 0 and 100
boolean isDithering: Whether or not to apply dithering when printing image
boolean isCompress: Whether or not to compress when sending data
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL_NO_FILE |
1000 |
There is no file |
MPOS_FAIL |
1000 |
Failed |
Prints an image data. Windows SDK does not support this.
[Syntax]
long printBitmapFile(ImageData data, long width, long alignment, long brightness,
boolean isDithering, boolean isCompress);
[Parameters]
ImageData data: The image data to be printed
long width: The width of the printed image. Use a value larger than 0 or a constant value below.
Code |
Value |
Description |
MPOS_IMAGE_WIDTH_ASIS |
-2 |
Print as original image size |
long alignment: Alignment. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align to the left |
MPOS_ALIGNMENT_CENTER |
1 |
Align at the center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align to the right |
long brightness: Image brightness. Can use a number between 0 and 100
boolean isDithering: Whether or not to apply dithering when printing image
boolean isCompress: Whether or not to compress when sending data
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Prints a 1-D barcode.
[Syntax]
long print1DBarcode(string data, int symbology, int height, int barWidth, int alignment, int textPosition);
[Parameters]
string data: Data of the barcode to be printed
int symbology: The type of 1-D barcode. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_UPCA |
101 |
UPC A barcode |
MPOS_BARCODE_UPCE |
102 |
UPC E barcode |
MPOS_BARCODE_EAN8 MPOS_BARCODE_JAN8 |
103 |
EAN 8/JAN 8 barcode |
MPOS_BARCODE_EAN13 MPOS_BARCODE_JAN13 |
104 |
EAN 13/JAN 13 barcode |
MPOS_BARCODE_ITF |
106 |
ITF barcode |
MPOS_BARCODE_CODABAR |
107 |
CODABAR barcode |
MPOS_BARCODE_CODE39 |
108 |
CODE39 barcode |
MPOS_BARCODE_CODE93 |
109 |
CODE93 barcode |
MPOS_BARCODE_CODE128 |
110 |
CODE128 barcode |
int height: Barcode height. Can use a number between 1 and 255
int barWidth: Width of barcode bars. Can use a number between 2 and 8 (default value: 2)
int alignment: Alignment value. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_ALIGNMENT_CENTER |
1 |
Align center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align right |
int textPosition: The printing position of the HRI (Human Readable Interface). You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below barcode |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL_2D_BARCODE |
1016 |
Symbology is a 2-D barcode |
MPOS_FAIL |
1000 |
Failed |
Prints the QR Code.
[Syntax]
long printQRCode (string data, int model, int alignment, int moduleSize, int eccLevel);
[Parameters]
string data: The QR Code data to be printed
int model: The model type of the QR Code. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_QRCODE_MODEL1 |
204 |
MODEL 1 |
MPOS_BARCODE_QRCODE_MODEL2 |
205 |
MODEL 2 |
int alignment: Alignment value. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_ALIGNMENT_CENTER |
1 |
Align center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align right |
int moduleSize: The module size of the QR Code. Can use a number between 1 and 8 (default value: 3)
int eccLevel: Error correction level. You must use a constant defined below.
Code |
Value |
Description |
MPOS_QRCODE_ECC_LEVEL_L |
48 |
Error correction 10% |
MPOS_QRCODE_ECC_LEVEL_M |
49 |
Error correction 10% |
MPOS_QRCODE_ECC_LEVEL_Q |
50 |
Error correction 10% |
MPOS_QRCODE_ECC_LEVEL_H |
51 |
Error correction 10% |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Prints the PDF417 barcode.
[Syntax]
long printPDF417(string data, int symbol, int alignment, int columnNumber, int rowNumber,
int moduleWidth, int moduleHeight, int eccLevel);
[Parameters]
string data: The PDF417 barcode to be printed
int symbol: The type of the PDF417 barcode. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_PDF417 |
201 |
PDF417 Standard |
MPOS_BARCODE_PDF417_SIMPLIFIED |
202 |
PDF417 Simplified |
int alignment: Alignment value. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_ALIGNMENT_CENTER |
1 |
Align center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align right |
int columnNumber: The number of barcode Columns. Can use a number between 0 and 30 (0 is the automatic setting)
int rowNumber: The number of barcode rows. Can use a number between 3 and 90 (0 is the automatic setting)
int moduleWidth: The width of the module. Can use a number between 1 and 4
int moduleHeight: The height of the module. Can use a number between 2 and 8
int eccLevel: The error correction level. Can use a number between 0 and 8
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Prints the GS1Databar.
[Syntax]
long printGS1Databar(string data, int symbol, int alignment, int moduleSize);
[Parameters]
string data: The GS1Databar data to be printed
int symbol: The type of the GS1Databar barcode. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_GS1_RSS14STACKEDOMNIDIRECTIONAL |
133 |
GS1 DataBar Stacked Omnidirectional |
MPOS_BARCODE_GS1_RSS14STACKED |
134 |
GS1 DataBar Stacked |
int alignment: Alignment value. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_ALIGNMENT_CENTER |
1 |
Align center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align right |
int moduleSize: The size of the module. Can use a number between 1 and 8
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Prints the DataMatrix.
[Syntax]
long printDataMatrix(string data, int alignment, int moduleSize);
[Parameters]
string data: The DataMatrix’s data to be printed
int alignment: Alignment value. You must use a constant defined below.
Code |
Value |
Description |
MPOS_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_ALIGNMENT_CENTER |
1 |
Align center |
MPOS_ALIGNMENT_RIGHT |
2 |
Align right |
int moduleSize: The size of the module. Can use 2 or 3
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Checks the printer’s status.
[Syntax]
long checkPrinterStatus(void);
[Return Values]
Code |
Value |
Description |
MPOS_STATUS_NORMAL |
0 |
Printing is possible |
MPOS_STATUS_PRINTER_COVEROPEN |
1006 |
Cover is open |
MPOS_STATUS_PRINTER_PAPEREMPTY |
1007 |
No paper |
MPOS_STATUS_PRINTER_PAPER_NEAREND |
1004 |
Insufficient paper |
MPOS_STATUS_PRINTER_ERROR |
1000 |
Error |
Configures the Automatic Status Back function. If the printer’s status changes while using this function, the printer’s new status will be sent to the application through StatusUpdateEvent.
[Syntax]
long asbEnable(boolean enable);
[Parameters]
boolean enable: Determines whether or not to configure
If the printer status changes while this is set to true, the printer’s status will be sent through StatusUpdateEvent.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Opens the CashDrawer that is connected to the printer.
[Syntax]
long openDrawer(int pinNumber);
[Parameters]
int pinNumber: The PIN of the Cashdrawer. You must use a constant defined below.
Code |
Value |
Description |
MPOS_CASHDRAWER_PIN2 |
0 |
The Cashdrawer’s PIN is 2 |
MPOS_CASHDRAWER_PIN5 |
1 |
The Cashdrawer’s PIN is 5 |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
mPOS Controller Dot Printer
1 OverviewMPosControllerDotPrinter Class provides functions regarding DotPrinter out of the devices connected to the B-gate. The action of a function is identical to MPosControllerPrinter Class.
2 Events
Please refer to the details in 6-3-3-2 MPosControllerPrinter Reference - 2 Events.
3 Methods
Please refer to 6-3-3-2 MPosControllerPrinter Reference - 3 Methods for the details of each function.
Supported methods list
Function names |
printText |
setTextEncoding |
setCharacterset |
setInternationalCharacterset |
cutPaper |
setTransaction |
printBitmapFile |
printBitmap |
checkPrinterStatus |
asbEnable |
openDrawer |
mPOS Controller MSR
1 OverviewMPosControllerMSR Class provides functions regarding MSR devices out of those connected to B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Controller Scanner
1 OverviewMPosControllerScanner Class provides functions regarding Barcode Scanner out of the devices connected to the B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Controller HID
1 Overview• MPosControllerHID Class provides functions regarding HID devices out of those connected to the B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Controller BCD
1 OverviewMPosControllerBCD Class provides functions regarding Customer Display out of the devices connected to the B-gate.
Caution |
If connecting BCD-2000/3000 directly to the Host, the selectCommandMode function must be called. |
2 Events
A device’s data can be received through DataEvent
Displays the character string on Customer Display. The previously displayed data will be deleted.
[Syntax]
long displayString(string data);
[Parameters]
string data: The data to be displayed on Customer Display
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Displays a character string in a specific line of Customer Display. The previously displayed data will be deleted. If the length of the entered data exceeds 1 line, the displayed result will change according to the configuration of Customer Display. Only the Bixolon Customer Display is supported.
[Syntax]
long displayStringAtLine(int line, string data);
[Parameters]
int line: The line that will display the character string. Starts from 1
string data: The character string to be displayed
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Deletes the screen’s contents. The cursor will appear on the first row of the first line.
[Syntax]
long clearScreen();
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
This is the value used when Encoding a character string within SDK.
If you enter a character string that does not exist in the codepage that corresponds to the Encoding value, incorrect characters such as “?” may be printed in accordance with the default settings of the OS. To change the codepage settings of Customer Display, you must call the setCharacterset function.
[Syntax]
long setTextEncoding(int textEncoding);
[Parameters]
int textEncoding: The codepage value used when Encoding a character string.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
Configures the codepage of Customer Display. The appropriate codepage value must be used in each Customer Display. If the codepage has already been configured with the Customer Display configuration utility, this function does not need to be used.
[Syntax]
long setCharacterset(int characterset);
[Parameters]
int characterset: The codepage value of Customer Display.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
6) setInternationalCharacterset
Configures the international characterset of Customer Display.
[Syntax]
long setInternationalCharacterset(int internationalCharset);
[Parameters]
int internationalCharset: The international characterset value of Customer Display.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL |
1000 |
Failed |
Saves the image data of Customer Display.
Only supported by BIXOLON Customer Displays. Windows SDK does not support this.
[Syntax]
long storeImage(ImageData data, int width, int imageNumber);
[Parameters]
ImageData data: Image data to be saved
int width: Image width
int imageNumber: Number that will save an image. Can use a number between 1 and 5
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
Customer Display saves an image file. Only supported by BIXOLON Customer Displays.
[Syntax]
long storeImageFile(string filename, int width, int imageNumber);
[Parameters]
string filename: File path of image to be saved
int width: Image width
int imageNumber: Number that will save an image. Can use a number between 1 and 5
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL |
1000 |
Failed |
Displays a saved image on Customer Display.
[Syntax]
long displayImage(int imageNumber, int xPos, int yPos);
[Parameters]
int imageNumber: Image number to be displayed
int xPos: x axis coordinates of the top left of the image
int yPos: y axis coordinates of the top left of the image
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL |
1000 |
Failed |
Deleted the imaged saved in Customer Display and deletes the image displayed on the screen. Only supported by BIXOLON Customer Displays.
[Syntax]
long clearImage(boolean isAll, int imageNumber);
[Parameters]
boolean isAll: Determines whether or not to delete all saved images
If true, all saved images will be deleted regardless of imageNumber
This must be configured to false if you wish to only delete an image of a specific number.
int imageNumber: Deletes the image saved to the imageNumber value.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
mPOS Controller TTYUSB
1 OverviewMPosControllerTTYUSB Class provides functions regarding USB-to-Serial devices out of those connected to the B-gate.
2 Events
• A device’s data can be received through DataEvent
mPOS Controller Label Printer
1 OverviewMPosControllerLabelPrinter Class provides functions regarding label printers out of the
devices connected to the B-gate. The LabelPrinter must call the printBuffer function for
the actual printing to work.
2 Events
A device’s status can be received through StatusUpdateEvent.
Code |
Value |
Description |
MPOS_LABEL_STATUS_IDLE |
0 |
Printing is possible |
MPOS_LABEL_STATUS_PRINTER_PAPEREMPTY |
1 |
No paper |
MPOS_LABEL_STATUS_PRINTER_COVEROPEN |
2 |
Cover is open |
MPOS_LABEL_STATUS_PRINTER_CUTTER_JAMMED |
3 |
Cutter error |
MPOS_LABEL_STATUS_PRINTER_TPH_OVERHEAT |
4 |
TPH overheating |
MPOS_LABEL_STATUS_PRINTER_GAP_ERROR |
5 |
GAP sensor error |
MPOS_LABEL_STATUS_PRINTER_RIBBON_END |
6 |
No ribbon |
MPOS_LABEL_STATUS_PRINTER_ON_BUILDING_LABEL_TO_BE_PRINTED |
7 |
Building label buffer |
MPOS_LABEL_STATUS_PRINTER_ON_PRINTING_LABEL |
8 |
Printing |
MPOS_LABEL_STATUS_PRINTER_ISSUED_LABEL_ISPAUSED |
9 |
Paper stuck to filler |
3 Methods
• This is the value used when Encoding character strings within SDK.
If you enter a character string that does not exist in the Codepage that corresponds to the Encoding value, incorrect characters such as “?” may be printed in accordance with the default settings of the OS. To change the label printer’s codepage settings, you must call the setCharacterset function.
[Syntax]
long setTextEncoding(int textEncoding);
[Parameters]
int textEncoding: The codepage value used when encoding a character string
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_OPENED |
1010 |
Called after openService function |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Changes the label printer’s codepage and International characterset.
[Syntax]
long setCharacterset(int characterset, int internationalCharset);
[Parameters]
int characterset: The codepage value of the label printer
int internationalCharset: The International Characterset value of the label printer
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_OPENED |
1010 |
Called after openService function |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Returns the status value of the current label printer.
[Syntax]
long checkPrinterStatus(void);
[Return Values]
Code |
Value |
Description |
MPOS_LABEL_STATUS_IDLE |
0 |
Printing is possible |
MPOS_LABEL_STATUS_PRINTER_PAPEREMPTY |
1 |
No paper |
MPOS_LABEL_STATUS_PRINTER_COVEROPEN |
2 |
Cover is open |
MPOS_LABEL_STATUS_PRINTER_CUTTER_JAMMED |
3 |
Cutter error |
MPOS_LABEL_STATUS_PRINTER_TPH_OVERHEAT |
4 |
TPH overheating |
MPOS_LABEL_STATUS_PRINTER_GAP_ERROR |
5 |
GAP sensor error |
MPOS_LABEL_STATUS_PRINTER_RIBBON_END |
6 |
No ribbon |
MPOS_LABEL_STATUS_PRINTER_ON_BUILDING_LABEL_TO_BE_PRINTED |
7 |
Building label buffer |
MPOS_LABEL_STATUS_PRINTER_ON_PRINTING_LABEL |
8 |
Printing |
MPOS_LABEL_STATUS_PRINTER_ISSUED_LABEL_ISPAUSED |
9 |
Paper stuck to filler |
Prints the label printer buffer.
[Syntax]
long printBuffer(int numberOfCopies);
[Parameters]
int numberOfCopies: Number of prints. Can use from 1
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Sends data to the label printer.
[Syntax]
long printRawData(Datatype rawData);
[Parameters]
Datatype rawData: Data to be sent
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL |
1000 |
Failed |
Saves a character string to the label printer buffer using Device font.
[Syntax]
long drawTextDeviceFont(String data, int xPos, int yPos, char fontSelection, int fontWidth, int fontHeight, int rightSpace, int rotation, boolean reverse, boolean bold, boolean rightToLeft, int alignment);
[Parameters]
String data: Character string to be printed.
int xPos: x axis coordinates of the character string to be printed
int yPos: y axis coordinates of the character string to be printed
char fontSelection: Font configuration. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_DEVICE_FONT_6PT |
‘0’ |
9 X 15 (dots) |
MPOS_LABEL_DEVICE_FONT_8PT |
‘1’ |
12 X 20 (dots) |
MPOS_LABEL_DEVICE_FONT_10PT |
‘2’ |
16 X 25 (dots) |
MPOS_LABEL_DEVICE_FONT_12PT |
‘3’ |
19 X 30 (dots) |
MPOS_LABEL_DEVICE_FONT_15PT |
‘4’ |
24 X 38 (dots) |
MPOS_LABEL_DEVICE_FONT_20PT |
‘5’ |
32 X 40 (dots) |
MPOS_LABEL_DEVICE_FONT_30PT |
‘6’ |
48 X 76 (dots) |
MPOS_LABEL_DEVICE_FONT_14PT |
‘7’ |
22 X 34 (dots) |
MPOS_LABEL_DEVICE_FONT_18PT |
‘8’ |
28 X 44 (dots) |
MPOS_LABEL_DEVICE_FONT_24PT |
‘9’ |
37 X 58 (dots) |
MPOS_LABEL_DEVICE_FONT_KOREAN1 |
‘a’ |
16 X 16 (dots) (English. Numbers 9 X 15) |
MPOS_LABEL_DEVICE_FONT_KOREAN2 |
‘b’ |
24 X 24 (dots) (English. Numbers 12 X 24) |
MPOS_LABEL_DEVICE_FONT_KOREAN3 |
‘c’ |
20 X 20 (dots) (English. Numbers 12 X 20) |
MPOS_LABEL_DEVICE_FONT_KOREAN4 |
‘d’ |
26 X 26 (dots) (English. Numbers 16 X 30) |
MPOS_LABEL_DEVICE_FONT_KOREAN5 |
‘e’ |
20 X 26 (dots) (English. Numbers 16 X 30) |
MPOS_LABEL_DEVICE_FONT_KOREAN6 |
‘f’ |
38 X 38 (dots) (English. Numbers 22 X 34) |
MPOS_LABEL_DEVICE_FONT_GB2312 |
‘m’ |
24 X 24 (dots) (English. Numbers 12 X 24) |
MPOS_LABEL_DEVICE_FONT_BIG5 |
‘n’ |
24 X 24 (dots) (English. Numbers 12 X 24) |
MPOS_LABEL_DEVICE_FONT_SHIFT_JIS |
‘j’ |
24 X 24 (dots) (English. Numbers 12 X 24) |
int fontWidth: Configures the width expansion ratio of a character. Can use a number between 1 and 4
int fontHeight: Configures the height expansion ratio of a character. Can use a number between 1 and 4
int rightSpace: Configures the space on the right of a character (default value: 0)
int rotation: The printing direction of a character string
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
boolean reverse: Sets to reverse
boolean bold: Sets to bold
boolean rightToLeft: Changes the order of the character string from right to left
Alignment will not be applied if the rightToLeft is configured to true.
int alignment: Alignment value when printing character string
Code |
Value |
Description |
MPOS_LABEL_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_LABEL_ALIGNMENT_RIGHT |
1 |
Align right |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves character strings to the label printer buffer using Vector font.
[Syntax]
long drawTextVectorFont (String data, int xPos, int yPos, char fontSelection, int fontWidth, int fontHeight, int rightSpace, int rotation, boolean reverse, boolean bold, boolean italic, boolean rightToLeft, int alignment)
[Parameters]
String data: Character string to be printed
int xPos: x axis coordinates of character string to be printed
int yPos: y axis coordinates of character string to be printed
char fontSelection: Font configuration. Configurable values are listed below.
Code |
Value |
Description |
MPOS_LABEL_VECTOR_FONT_ASCII |
‘U’ |
Ascii (1Byte code) |
MPOS_LABEL_VECTOR_FONT_KS5601 |
‘K’ |
KS5601 (2Byte code) |
MPOS_LABEL_VECTOR_FONT_BIG5 |
‘B’ |
BG5 (2Byte code) |
MPOS_LABEL_VECTOR_FONT_GB2312 |
‘G’ |
GB2312 (2Byte code) |
MPOS_LABEL_VECTOR_FONT_SHIFT_JIS |
‘J’ |
Shift-JIS (2Byte code) |
MPOS_LABEL_VECTOR_FONT_OCR_A |
‘a’ |
OCR-A (1Byte code) |
MPOS_LABEL_VECTOR_FONT_OCR_B |
‘b’ |
OCR-B (1Byte code) |
int fontWidth: Configures width size of character
int fontHeight: Configures height size of character
int rightSpace: Configures right space of character
int rotation: Configures character string printing direction
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
boolean reverse: Sets to reverse
boolean bold: Sets font as bold
boolean italic: Sets to italic
boolean rightToLeft: Changes the order of the character string from right to left
Alignment will not be applied if the rightToLeft is configured to true.
int alignment: Alignment value when printing character string
Code |
Value |
Description |
MPOS_LABEL_ALIGNMENT_LEFT |
0 |
Align left |
MPOS_LABEL_ALIGNMENT_RIGHT |
1 |
Align right |
MPOS_LABEL_ALIGNMENT_CENTER |
2 |
Align center |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves a 1-D barcode to the label printer buffer.
[Syntax]
long drawBarcode1D(String data, int xPos, int yPos, int barcodeType, int widthNarrow, int widthWide, int height, int hri, int quietZoneWidth, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int barcodeType: Type of barcode to be printed
int widthNarrow: Narrow bar width.
int widthWide: Wide bar width
int height: Barcode height
int hri: HRI (Human Readable Interface) printing position.
You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below barcode |
MPOS_BARCODE_TEXTABOVE_FONTSIZE2 |
3 |
Print above barcode (font size 2) |
MPOS_BARCODE_TEXTBELOW_FONTSIZE2 |
4 |
Print below barcode (font size 2) |
MPOS_BARCODE_TEXTABOVE_FONTSIZE3 |
5 |
Print above barcode (font size 3) |
MPOS_BARCODE_TEXTBELOW_FONTSIZE3 |
6 |
Print below barcode (font size 3) |
MPOS_BARCODE_TEXTABOVE_FONTSIZE4 |
7 |
Print above barcode (font size 4) |
MPOS_BARCODE_TEXTBELOW_FONTSIZE4 |
8 |
Print below barcode (font size 4) |
int quietZoneWidth: Configures Quiet zone. Can use a number between 0 and 20
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves MaxiCode to the label printer buffer.
[Syntax]
long drawBarcodeMaxiCode(String data, int xPos, int yPos, int mode)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int mode: Maxicode mode configuration. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_MAXICODE_MODE_0 |
0 |
MaxiCode Mode is configured to 0 |
MPOS_LABEL_MAXICODE_MODE_2 |
2 |
MaxiCode Mode is configured to 2 |
MPOS_LABEL_MAXICODE_MODE_3 |
3 |
MaxiCode Mode is configured to 3 |
MPOS_LABEL_MAXICODE_MODE_4 |
4 |
MaxiCode Mode is configured to 4 |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves a 1-D barcode to the label printer buffer.
[Syntax]
long drawBarcodePDF417(String data, int xPos, int yPos, int rowCount,int columnCount, int eccLevel, int dataCompression, boolean hri,int startPosition, int moduleWidth, int barHeight, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int rowCount: Number of barcode Rows. Can use a number between 3 and 90
int columnCount: Number of barcode Columns. Can use a number between 1 and 30
int eccLevel: Error correction level. Recognition rate when a part of a barcode is damagedYou must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_ERROR_CORRECTION_LEVEL0 |
0 |
Error correction level 0 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL1 |
1 |
Error correction level 1 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL2 |
2 |
Error correction level 2 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL3 |
3 |
Error correction level 3 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL4 |
4 |
Error correction level 4 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL5 |
5 |
Error correction level 5 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL6 |
6 |
Error correction level 6 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL7 |
7 |
Error correction level 7 |
MPOS_LABEL_ERROR_CORRECTION_LEVEL8 |
8 |
Error correction level 8 (Highest recognition rate) |
int dataCompression: Select data compression method
Code |
Value |
Description |
MPOS_LABEL_PDF417_DATA_COMPRESSION_TEXT |
0 |
2 characters per codeword |
MPOS_LABEL_PDF417_DATA_COMPRESSION_ NUMERIC |
1 |
2.93 characters per codeword |
MPOS_LABEL_PDF417_DATA_COMPRESSION_BINARY |
2 |
1.2 characters per codeword |
int hri: Select the HRI (Human Readable Interface) printing position. You must use a constant that is defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below barcode |
int startPosition: Configures the starting point of a barcode (default value: 1)
Code |
Value |
Description |
MPOS_LABEL_BARCODE_ORIGIN_POINT_CENTER |
0 |
Coordinate value based on middle of barcode |
MPOS_LABEL_BARCODE_ORIGIN_POINT_UPPER |
1 |
Coordinate value based on top left of barcode |
int moduleWidth: Configures the width of the barcode module. Can use a number between 2 and 9
int barHeight: Configures the height of the bar. Can use a number between 4 and 99
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the QRCode to the label printer buffer.
[Syntax]
long drawBarcodeQRCode(String data, int xPos, int yPos, int size, int model, int eccLevel, int rotation)
[Parameters]
String data: Data of barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int size: Configures the size of the QR Code. Can use a number between 1 and 4
int model: Configures the QRCode Model. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_QRCODE_MODEL_1 |
1 |
QR Code Model is configured to 1 |
MPOS_LABEL_QRCODE_MODEL_2 |
2 |
QR Code Model is configured to 2 |
int eccLevel : Error correction level. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_QRCODE_ECCLEVEL_L |
‘L’ |
Error correction rate is configured to 7% |
MPOS_LABEL_QRCODE_ECCLEVEL_M |
‘M’ |
Error correction rate is configured to 15% |
MPOS_LABEL_QRCODE_ECCLEVEL_Q |
‘Q’ |
Error correction rate is configured to 25% |
MPOS_LABEL_QRCODE_ECCLEVEL_H |
‘H’ |
Error correction rate is configured to 35% |
int rotation: Configures the printing direction of the barcode
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the DataMatrix to the label printer buffer.
[Syntax]
long drawBarcodeDataMatrix(String data, int xPos, int yPos, int size, boolean reverse, int rotation);
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int size: Configures the size of the DataMatrix. Can use a number between 1 and 4
int reverse: Does not currently use
int rotation: y axis coordinate of the barcode to be printed
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the Aztec barcode to the label printer buffer.
[Syntax]
long drawBarcodeAztec(String data, int xPos, int yPos, int size, boolean extendedChannel, int eccLevel, boolean menuSymbol, int numberOfSymbols, string optionalID, int rotation)
[Parameters]
String data: Barcode data
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int size: Barcode size. Can use a number between 1 and 10
boolean extendedChannel: Extended channel interpretation code
int eccLevel: Error correction level
Code |
Value |
0 |
Automatically configures the error correction level. |
1~99 |
Directly enter the error correction level. |
101~104 |
1~4 layer compact symbol |
201~232 |
1~32 layer compact symbol |
300 |
Simple Aztec ”Rune” |
boolean menuSymbol: Configures the menu symbol
int numberOfSymbols: Number of symbols for structured append. Can use a number between 1 and 26
string optionalID: Optional ID field for structured append: ID field string. Maximum 24 letters
int rotation: Printing direction of the barcode
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves Code49 to the label printer buffer.
[Syntax]
long drawBarcodeCode49(String data, int xPos, int yPos, int widthNarrow, int widthWide, int height, int hri, int startingMode, int rotation)
[Parameters]
String data: Barcode data
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int widthNarrow: Width of Narrow Bar
int widthWide: Width of Wide Bar
int height: Barcode height
int hri: HRI (Human Readable Interface) printing position.
You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above the barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below the barcode |
int startingMode: Configures the Starting Mode of a barcode
Code |
Value |
Description |
MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMERIC |
0 |
Regular Alphanumeric Mode |
MPOS_LABEL_STARTINGMODE_MULTIPLE_READ_ALPHANUMERIC |
1 |
Multiple Read Alphanumeric |
MPOS_LABEL_STARTINGMODE_REGULAR_NUMERIC |
2 |
Regular Numeric Mode |
MPOS_LABEL_STARTINGMODE_GROUP_ALPHANUMERIC |
3 |
Group Alphanumeric Mode |
MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMRIC_SHIFT1 |
4 |
Regular Alphanumeric Shift 1 |
MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMRIC_SHIFT2 |
5 |
Regular Alphanumeric Shift 2 |
MPOS_LABEL_STARTINGMODE_AUTOMATIC |
7 |
Automatic Mode |
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves CodaBlock to the label printer buffer.
[Syntax]
long drawBarcodeCodaBlock(String data, int xPos, int yPos, int widthNarrow, int widthWide, int height, boolean securityLevel, int dataColumns, char mode, int encode)
[Parameters]
String data: Data of barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int widthNarrow: Width of Narrow Bar
int widthWide: Width of Wide Bar
int height: Barcode height
boolean securityLevel: Barcode security level
int dataColumns: Number of characters per row. Can use a number between 2 and 62
char mode: Configures the Codablock mode
Code |
Value |
Description |
MPOS_LABEL_CODABLOCK_MODE_A |
‘A’ |
Creates a code that uses the Code 39 character set |
MPOS_LABEL_CODABLOCK_MODE_E |
‘E’ |
Creates a code that uses the Code 128 character set |
MPOS_LABEL_CODABLOCK_MODE_F |
‘F’ |
Creates a code that uses the Code 128 character set and that automatically has func1 added to |
int encode: The following values can be used for each mode.
Mode |
Usable value |
‘A’ |
Can use a number between 1 and 18 |
‘E’ |
Can use a number between 2 and 4 |
‘F’ |
Can use a number between 2 and 4 |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the MicroPDF to the label printer buffer.
[Syntax]
long drawBarcodeMicroPDF(String data, int xPos, int yPos, int moduleWidth, int height, int mode, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int moduleWidth: Configures module width. Can use a number between 2 and 8
int height: Configures barcode height. Can use a number between 1 and 99
int mode: Configures barcode mode. Can use a number between 0 and 33
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the IMB barcode to the label printer buffer.
[Syntax]
long drawBarcodeIMB(String data, int xPos, int yPos, boolean hri, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
Boolean hri: Determines whether or not to print HRI (Human Readable Interface)
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the MSI barcode to the label printer buffer.
[Syntax]
long drawBarcodeMSI(String data, int xPos, int yPos, int widthNarrow, int widthWide, int height, int checkDigit, boolean printCheckDigit, int hri, int rotation);
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int widthNarrow: Width of Narrow Bar
int widthWide: Width of Wide Bar
int height: Barcode height
int checkDigit: Check digit mode
Code |
Value |
Description |
MPOS_LABEL_CHECKDIGIT_NONE |
0 |
Check digit not configured |
MPOS_LABEL_CHECKDIGIT_1MOD10 |
1 |
1 Mod 10 |
MPOS_LABEL_CHECKDIGIT_2MOD10 |
2 |
2 Mode 10 |
MPOS_LABEL_CHECKDIGIT_1MOD11_AND_1MOD_10 |
3 |
1 Mod 11 and Mod 10 |
boolean printCheckDigit: Determines whether or not to print check digit
int hri: HRI (Human Readable Interface) printing position. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above the barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below the barcode |
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the Plessey barcode to the label printer buffer.
[Syntax]
long drawBarcodePlessey(String data, int xPos, int yPos, int widthNarrow, int widthWide, int height, boolean printCheckDigit, int hri, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int widthNarrow: Width of Narrow Bar
int widthWide: Width of Wide Bar
int height: Barcode height
boolean printCheckDigit: Determines whether or not to print check digit
int hri: HRI (Human Readable Interface) printing position.
You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above the barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below the barcode |
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the TLC39 barcode to the label printer buffer.
[Syntax]
long drawBarcodeTLC39(String data, int xPos, int yPos, int widthNarrow, int widthWide, int height, int rowHeightOfMicroPDF417, int narrowWidthOfMicroPDF417, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int widthNarrow: Width of Narrow Bar
int widthWide: Width of Wide Bar
int height: Barcode height
int rowHeightOfMicroPDF417: Height of Micro PDF417’s row. Can use a number between 1 and 255
int narrowWidthOfMicroPDF417: Width of Micro PDF417’s Narrow bar. Can use a number between 1 and 10
int hri: Selects the HRI (Human Readable Interface) printing position. You must use a constant defined below.
Code |
Value |
Description |
MPOS_BARCODE_TEXTNONE |
0 |
Does not print |
MPOS_BARCODE_TEXTABOVE |
1 |
Print above the barcode |
MPOS_BARCODE_TEXTBELOW |
2 |
Print below the barcode |
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves the RSS barcode to the label printer buffer.
[Syntax]
long drawBarcodeRSS(String data, int xPos, int yPos, int barcodeType, int magnification, int separatorHeight, int height, int segmentWidth, int rotation)
[Parameters]
String data: Data of the barcode to be printed
int xPos: x axis coordinates of barcode to be printed
int yPos: y axis coordinates of barcode to be printed
int barcodeType: Configures the barcode type. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS14 |
0 |
RSS14 |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_TRUNCATED |
1 |
RSS14 truncated |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_STACKED |
2 |
RSS14 stacked |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_STACKED_OMNIDIRECTIONAL |
3 |
RSS14 Stacked omnidirectional |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS_LIMITED |
4 |
RSS limited |
MPOS_LABEL_RSS_BARCODE_TYPE_RSS_EXPANDED |
5 |
RSS Expanded |
MPOS_LABEL_RSS_BARCODE_TYPE_UPC_A |
6 |
RSS UPC A |
MPOS_LABEL_RSS_BARCODE_TYPE_UPC_E |
7 |
RSS UPC E |
MPOS_LABEL_RSS_BARCODE_TYPE_EAN13 |
8 |
EAN13 |
MPOS_LABEL_RSS_BARCODE_TYPE_EAN8 |
9 |
EAN 8 |
MPOS_LABEL_RSS_BARCODE_TYPE_UCC_EAN128_CC_A_B |
10 |
EAN128 CC-A/B |
MPOS_LABEL_RSS_BARCODE_TYPE_UCC_EAN128_CC_C |
11 |
EAN128 CC-C |
int magnification: Can use a number between 1 and 10
int separatorHeight: Configures the height of an RSS barcode identifier. Can use a number between 0 and 22
int height: Configures the barcode height
int segmentWidth: Configures segment width. Can use only an even number between 0 and 22
int rotation: Printing direction of barcode to be printed
Code |
Value |
Description |
MPOS_LABEL_ROTATION_DEGREES_0 |
0 |
0 degree turn |
MPOS_LABEL_ROTATION_DEGREES_90 |
1 |
90 degree turn clockwise |
MPOS_LABEL_ROTATION_DEGREES_180 |
2 |
180 degree turn |
MPOS_LABEL_ROTATION_DEGREES_270 |
3 |
270 degree turn clockwise |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves a quadrangle or line to the label printer buffer.
[Syntax]
long drawBlock(int startPosX, int startPosY, int endPosX, int endPosY, string option, int thickness)
[Parameters]
int startPosX: x axis coordinates of top left of Block
int startPosY: y axis coordinates of top left of Block
int endPosX: x axis coordinates of bottom right of Block
int endPosY: y axis coordinates of bottom right of Block
string option: Option to draw a quadrangle. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_OVERWRITING |
‘O’ |
Repeat drawing on places where lines overlap |
MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_EXCLUSIVE_OR |
‘E’ |
Do not draw on places where lines overlap |
MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_DELETE |
‘D’ |
Delete line |
MPOS_LABEL_DRAW_BLOCK_OPTION_SLOPE |
‘S’ |
Diagonal line |
MPOS_LABEL_DRAW_BLOCK_OPTION_BOX |
‘B’ |
Quadrangle edge |
int thickness: Selects line thickness. This only applies if the ‘option’ value is ‘S’ or ‘B’.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves a circle to the label printer buffer.
[Syntax]
long drawCircle(int startPosX, int startPosY, int size, int multiplier)
[Parameters]
int startPosX: x axis coordinates of starting point* of circle region
* Starting point: Intersection point of tangent of left and top(ex. 100)
int startPosY: y axis coordinates of starting point* of circle region
* Starting point: Intersection point of tangent of left and top(ex. 200)
• int size: Configures size of circle. You must use a constant defined below.
Code |
Value |
Diameter (mm) |
Width x Hegith(Dots) |
MPOS_LABEL_DRAW_CIRCLE_SIZE_40X40 |
1 |
5 |
40 ´ 40 |
MPOS_LABEL_DRAW_CIRCLE_SIZE_56X56 |
2 |
7 |
56 ´ 56 |
MPOS_LABEL_DRAW_CIRCLE_SIZE_72X72 |
3 |
9 |
72 ´ 72 |
MPOS_LABEL_DRAW_CIRCLE_SIZE_88X88 |
4 |
11 |
88 ´ 88 |
MPOS_LABEL_DRAW_CIRCLE_SIZE_104X104 |
5 |
13 |
104 ´ 104 |
MPOS_LABEL_DRAW_CIRCLE_SIZE_168X168 |
6 |
21 |
168 ´ 168 |
int multiplier: Expands a circle by the scaling unit. Can use a number between 1 and 4
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves an image to the label printer buffer.
[Syntax]
long drawImage(ImageDataType image, int startPosX, int startPosY, int width)
[Parameters]
ImageDataType image: Data of image to be printed
int startPosX: x axis coordinates of top left of image to be printed
int startPosY: y axis coordinates of top left of image to be printed
int width: Width of printed image
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Saves an image file to the label printer buffer.
[Syntax]
long drawImageFile(String filename, int startPosX, int startPosY, int width)
[Parameters]
String filename: File path of image to be printed
int startPosX: x axis coordinates of top left of image to be printed
int startPosY: y axis coordinates of top left of image to be printed
int width: Width of printed image
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the printing type of the label printer.
For BIXOLON label printers, printers using the Direct Thermal method cannot be configured to the Transfer Thermal method.
[Syntax]
long setPrintingType(char printingType)
[Parameters]
char printingType: Configures the printing type. You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_PRINTING_TYPE_DIRECT_THERMAL |
‘d’ |
Direct Thermal type |
MPOS_LABEL_PRINTING_TYPE_THERMAL_TRANSFER |
‘t’ |
Transfer Thermal type |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the margins in the printing area of the label printer buffer.
[Syntax]
long setMargin(int horizontalMargin, int verticalMargin)
[Parameters]
int horizontalMargin: Configures the left margin
int verticalMargin: Configures the top margin
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the Backfeed.
[Syntax]
long setBackFeedOption(boolean bEnable, int stepQuantity)
[Parameters]
boolean bEnable: Configures whether or not to use Backfeed.
int stepQuantity: Configures the Backfeed length. This applies only when the bEnable parameter is true.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the paper length, gap, type, and offset of the label printer.
[Syntax]
long setLength(int labelLength, int gapLength, string mediaType, int offsetLength)
[Parameters]
int labelLength: Label paper length
int gapLength: Gap length of label paper
char mediaType: Configures the type of label paper.
You must use a constant defined below.
Code |
Value |
Description |
MPOS_LABEL_MEDIA_TYPE_GAP |
‘G’ |
Gap paper |
MPOS_LABEL_MEDIA_TYPE_CONTINUOUS |
‘C’ |
Continuous paper |
MPOS_LABEL_MEDIA_TYPE_BLACK_MARK |
‘B’ |
Black mark paper |
int offsetLength: Configures the offset length
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the width of printing papers of the label printer.
[Syntax]
long setWidth(int labelWidth)
[Parameters]
int labelWidth: Configures the width of papers
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the buffer mode of the label printer.
[Syntax]
long setBufferMode(boolean doubleBuffer)
[Parameters]
boolean doubleBuffer: Configures the buffer mode
Uses the double buffer mode when configured to true
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the printing speed of the label printer.
[Syntax]
long setSpeed(int speed)
[Parameters]
int speed: Configures the printing speed. Can use a number between 1 and 6
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the print density of the label printer.
[Syntax]
long setDensity(int density)
[Parameters]
int density: Configures the print density. Can use a number between 1 and 20
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the printing orientation of the label printer.
[Syntax]
long setOrientation(char orientation)
[Parameters]
char orientation: Printing orientation
Code |
Value |
Description |
MPOS_LABEL_PRINTING_DIRECTION_TOP_TO_BOTTOM |
‘T’ |
Print from the top |
MPOS_LABEL_PRINTING_DIRECTION_BOTTOM_TO_TOP |
‘B’ |
Print from the bottom |
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the offset of the label printer.
[Syntax]
long setOffset(int offset)
[Parameters]
int offset: offset value
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures the cutting position of the label printer.
[Syntax]
long setCuttingPosition(int position)
[Parameters]
int position: Cutting position value. Can use a number between -100 and 100 (default value: 0)
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Configures whether or not to use auto cutter of the label printer.
This only runs if an auto cutter is installed in the label printer.
[Syntax]
long setAutoCutter(boolean enableAutoCutter, int cuttingPeriod)
[Parameters]
boolean enableAutoCutter: Determines whether or not to use auto cutter
int cuttingPeriod: Configures the cutting cycle. When configured to 2, it will cut every second paper.
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_NOT_CONNECT |
1006 |
The B-gate has failed to connect |
MPOS_FAIL_NO_DEVICE |
1007 |
No device connected to the B-gate |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
Returns the model name of the label printer
[Syntax]
string getModelName();
[Return Values]
string: Model name
Returns the firmware version of the label printer
[Syntax]
string getFirmwareVersion();
[Return Values]
string: Firmware version
mPOS Controller Dallas Key
1 OverviewMPosControllerDallasKey Class provides functions regarding DallasKey devices out of those connected to the B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Controller RFID
1 OverviewMPosControllerRFID Class provides functions regarding RFID devices out of those connected to the B-gate.
A device’s data can be received through DataEvent.
mPOS Controller NFC
1 OverviewMPosControllerNFC Class provides functions regarding NFC devices out of those connected to the B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Controller Scale
1 OverviewMPosControllerScale Class provides functions regarding Scale devices out of those connected to the B-gate.
2 Events
A device’s data can be received through DataEvent.
mPOS Lookup
1 OverviewThe MPosLookupe Class provides a function that searches the B-gate devices that are connected to the host. This class is not provided in Windows SDK.
2 Events
None
3 Methods
1) initWithTimeout(float timeout, float retry)
Configures the time and the number of repetitions in order to search for devices connected to the host.
[Syntax]
long initWithTimeout (float timeout, float retry)
[Parameters]
float timeout: Use only values larger than 0 (unit: seconds)
float retry: Number of repetitions. Use only values larger than 0
[Return Values]
Code |
Value |
Description |
MPOS_SUCCESS |
0 |
Function has succeeded |
MPOS_FAIL_INVALID_PARAMETER |
1004 |
Invalid parameter |
MPOS_FAIL |
1000 |
Failed |
iOS returns created objects.
Refreshes the list of Wi-Fi devices connected to the host.
[Syntax]
list refreshWifiDevicesList (void)
[Return Values]
list: List of searched devices
3) refreshEthernetDevicesList ()
Refreshes the list of Ethernet devices connected to the host.
[Syntax]
list refreshEthernetDevicesList (void)
[Return Values]
list: List of searched devices
4) refreshBluetoothDevicesList ()
Refreshes the list of Bluetooth devices paired with the host.
[Syntax]
list refreshBluetoothDevicesList (void)
[Return Values]
list: List of searched devices
Returns the list of Wi-Fi devices connected to the host.
[Syntax]
list getWifiDevicesList (void)
[Return Values]
list: List of searched devices
Returns the list of Ethernet devices connected to the host
[Syntax]
list getEthernetDevicesList (void)
[Return Values]
list: List of searched devices
Returns the list of Bluetooth devices connected to the host
[Syntax]
list getBluetoothDevicesList (void)
[Return Values]
list: List of searched devices