자산 2

Native App Print for iOS

API Download

SDK Download for iOS

Reference Guide

Setting SDK Project

Registration with the Apple Developer Program is required to develop iOS applications. Refer to the Apple Developer’s Website (http://developer.apple.com/devcenter/ios) for detail.

1 Adding ExternalAccessory.framework



1) Select project file

2) Select [Info] tab

3) Ctrl-click in the Area 3

4) Select [Add Row] from the pop up menu



5) Enter “Supported external accessory protocols”.

6) Enter “com.bixolon.protocol” in the Items field.



2 Adding Bluetooth Protocol

1) Select Project, Info, and + in the order shown below.



2) Search “ExternalAccessory.framework” and click the [Add] to add it.



3 Adding Library to Project
Drag the library folder and drop it to the project.

mPOS Controller Devices

Inherits from

NSObject

Framework

MPosSDK.a

Declared

MPosControllerDevices .h


1 Overview

MPosControllerDevices class is an object that provides the most basic functions related to the target control device.

2 Instance Methods
 

1) selectInterface:address:

This method configures the interface connected to mPOS Thermal Printer.


[Syntax]

-(__MPOS_RESULTS_) selectInterface:(__MPOS_INTERACE_TYPE_)interfaceType

                           address:(NSString*)address;
 

[Return Value]

_MPOS_SUCCESS returns if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

This method may fail if any of the devices in the list that are connected to mPOS are open when checked with the isOpen method.
Interface must be selected with this method before calling OpenService method of any device class.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if(_MPOS_SUCCESS ==

 [_devices selectInterface:_MPOS_INTERFACE_BLUETOOTH

address:@”74:F0:7D:12:34:56”])

{

    //  Success

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_devices release];


2) getCurrentDeviceID

mPOS that are assigned to the current class returns the deviceID of the device.


[Syntax]

-(NSInteger) getCurrentDeviceID;


[Return Value]

(NSInteger) Device ID of the current device


[Discussion]

This method may fail if any of the devices in the list that are connected to mPOS is open when checked with the isOpen method.
Interface must be selected with this method before calling OpenService method of any device class.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

NSInteger myID = [_devices getCurrentDeviceID];

 NSLog(@”myID : %d”, myID);

[_devices release];


3) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer.
 

[Syntax]

-(__MPOS_RESULTS_) openService;

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if(_MPOS_SUCCESS ==

 [_devices openService])

{

    //  Success

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_devices release];


4) OpenService:(NSInteger)DeviceID

This method initializes communication if there is a device with the given DeviceID in the list of devices connected to the mPOS Thermal Printer.


[Syntax]

-(__MPOS_RESULTS_) openService:(NSInteger)DeviceID


[Discussion]

Failure code will be returned if the given DeviceID is not associated with this class or if it is not connected.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

5) closeService

This method terminates the use of the corresponding device.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if(_MPOS_SUCCESS ==

 [_devices closeService])

{

    //  Success

}

else

{

    //  Fail

}

[_devices release];


6) isOpen

This method checks whether a device is connected using this class.


[Syntax]

-(BOOL) isOpen;


[Return Value]

If a device is connected: YES


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if( YES ==  [_devices isOpen])

{

    //  If device is open

}

else

{

//  If device is closed.

}

[_devices release];


7) directIO:(NSData*) data

This method sends or reads user-defined data.


[Syntax]

-(__MPOS_RESULTS_) directIO:(NSData*) data;


[Parameters]

data

              It contains the ANSI CODE data to send to printer.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if( MPOS_SUCCESS ==  [_devices directIO: [NSData dataWithBytes:"\n\n\n" length:3]])

{

    //  Success.

}

else

{

//  Fail.

}

[_devices release];


8) selectForceConvertHIDInputDeviceTo:

Assigns a device which is recognized as HID Input device to a certain device by force, and then make it work.


[Syntax]

-(__MPOS_RESULTS_) selectForceConvertHIDInputDeviceTo:(__MPOS_DEVICE_TYPE_)deviceType;


[Return Value]

MPOS_SUCCESS returns if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

[Discussion]

If any of the devices connected to mPOS is identified as Open through isOpen Method, it may not operate.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if(_MPOS_SUCCESS ==

 [_devices selectForceConvertHIDInputDeviceTo:_MPOS_DEVICE_SCANNER ];

{

    //  Success

}

else

{

    //  Fail

}

//  ……. Do other process you want.

[_devices release];

 

9) selectCommandMode:

Selects a device which is connected with mPOS or a device which is directly connected with iDevice for data communications.


[Syntax]

-(__MPOS_RESULTS_) selectCommandMode:(__MPOS_COMMAND_MODE_)commandMode;


[Return Value]

MPOS_SUCCESS returns if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

This method may fail if any of the devices in the list that are connected to mPOS is open when checked with the isOpen method.


[Example]

MPosControllerDevices _devices = [MPosControllerDevices new];

if(_MPOS_SUCCESS ==

 [_devices selectCommandMode:_MPOS_COMMAND_MODE_BYPASS ];

{

    //  Success

}

else

{

    //  Fail

}

//  ……. Do other process you want.

[_devices release];


10) 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 Value]

MPOS_SUCCESS returns if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.

mPOS Controller Printer

Inherits from

MPosControllerDevices

Framework

MPosSDK.a

Declared

MPosControllerPrinter .h


1 Overview

MPosControllerPrinter class is an object that provides various functions of the printer among the devices connected to the mPOS Thermal Printer.


2 Notification
 

1) Notification Name

This is for the registration of Notification about the data that can be obtained from the device corresponding to this class.

[Notification Name]

_MPOS_NOTIFICATION_NAME_PRINTER_DATA_IN


[Example]

//  Registration

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceivePrinterData:) name:_MPOS_NOTIFICATION_NAME_PRINTER_DATA_IN

object:nil];

    }

//   Removal of registration

        [[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_PRINTER_DATA_IN

object:nil];


2) Notification Key - _MPOS_NOTIFICATION_KEY_PRINTER_MODELNAME

To read the corresponding data if there is a Printer Model Name in the notified data. It occurs when calling.

[Example]

-(void) didReceivePrinterData:(NSNotification *)notification

{

  if([_printer isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSString * strPrinterName   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_PRINTER_MODELNAME];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received] "];

  }

}


3) Notification Key - _MPOS_NOTIFICATION_KEY_PRINTER_FWVersion

It is for reading the corresponding data if there is a Printer Fw Version in the notified data.

It occurs when calling.


[Example]

-(void) didReceivePrinterData:(NSNotification *)notification

{

  if([_printer isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSString * strPrinterName   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_PRINTER_FwVersion];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received..] "];

  }

}


3 Instance Methods

1) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer Thermal Printer.


[Syntax]

-(__MPOS_RESULTS_) openService;
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

[Example]

MPosControllerPrinter* _printer = [MPosControllerPrinter new];

if(_MPOS_SUCCESS ==

 [_printer openService])

{

    //  Success

if([_printer isOpen])

    {

        //  Notification setting

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceivePrinterData:)

name:_MPOS_NOTIFICATION_NAME_PRINTER_DATA_IN

object:nil];

    }

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_printer release];


2) closeService

This method closes the device corresponding to this class.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerPrinter* _printer = [MPosControllerPrinter new];

if(_MPOS_SUCCESS ==

 [_printer closeService])

{

    //  Success

[[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_PRINTER_DATA_IN

object:nil];

}

else

{

    //  Fail

}

[_printer release];


3) PrintText

This method prints text.


[Syntax]

-(__MPOS_RESULTS_) printText:(NSString *)string


[Parameters]

string

Target text string, unicode data with null as terminator 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.
 

* 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


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

It does nothing if there is no printer connected to the mPOS Thermal Printer.


[Example]

MPosControllerPrinter* _printer = [MPosControllerPrinter new];

if(_MPOS_SUCCESS ==

 [_printer  [pController printText:@”This is printText\r\n”])

{

    //  Success

}

else

{

    //  Fail

}

[_printer release];


4) printBitmap

This method prints image file.


[Syntax]

-(__MPOS_RESULTS_) printBitmapWithPath:(NSString *)path

                                            width:(long)width

level:(long)level


[Parameters]

path

             Path of image file

width

             Width of image file to convert and print, with the range of 0 ~ maximum width.

             If the value is smaller than 0, image will be converted with the following conditions.

level

             Image color level and diffusion option.

Value

Description

0 ~ 100

Color level value

If fourth digit is 1

Enable diffusion processing

If fifth digit is 1

Print image using ESC * command


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerPrinter* _printer = [MPosControllerPrinter new];

NSString *path = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"png"];

if(_MPOS_SUCCESS ==

 [_printer  printBitmapWithPath:path

width:512

level:1050])

{

    //  Success

}

else

{

    //  Fail

}

[_printer release];


5) printBarcode

This method prints 1D and 2D barcode.


[Syntax]

- (__MPOS_RESULTS_) printBarcode : (NSString*) data

                       symbology : (NSInteger) symbology

                          height : (NSInteger) height

                           width : (NSInteger) width

                       alignment : (NSInteger) alignment

                     textPostion : (NSInteger) textPosition;


[Parameters]

data

             ANSI code data with null terminator.

symbology

             Barcode type

             Refer to 6-4-3-11 Appendix - 1 Defines - 4) Barcode Symbology

height

Height of barcode in Dot unit with the range of 1~255

It has no effect in 2D barcode.

width

             Width of barcode with 2~7 steps in width

If barcode print area exceeds the size of paper, printing may stop or only part of the barcode is printed.

             This setting has no effect to 2D barcode.

alignment

             Barcode alignment setting

             Refer to 6-4-3-11 Appendix - 1 Defines - 2) Barcode/Image/Text Alignmen

textPosition

             Barcode text position setting


[Example]

 


MPosControllerPrinter* _printer = [MPosControllerPrinter new];

if(_MPOS_SUCCESS ==

 [_printer printBarcode:“123456789012”

symbology: _MPOS_BARCODE_Code128

width: 100

height:200];

{

    //  Success

}

else

{

    //  Fail

}

[_printer release];


6) checkPrinterStatus

This method checks the printer status.


[Syntax]

-(__MPOS_RESULTS_) checkPrinterStatus:(blockType3)statusReceiver;


[Parameters]

statusReceiver

This method checks the printer status.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


7) asbEnable

This method checks the printer status automatically.


[Syntax]

-(__MPOS_RESULTS_) asbEnable:(BOOL) bEnable;


[Parameters]

bEnable

This method enables the printer status data.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.

mPOS Controller MSR

Inherits from

MPosControllerMSR

Framework

MPosSDK.a

Declared

MPosControllerMSR.h


1 Overview

MPosControllerMSR Class is an object that provides various functions of the MSR among the devices connected to the mPOS Thermal Printer.

2 Notification
 

1) Notification Name

This is for the registration of Notification for the data that can be obtained from the device corresponding to this class.
 

[Notification Name]

_MPOS_NOTIFICATION_NAME_MSR_DATA_IN


[Example]

//  Registration

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveMSRData:) name:_MPOS_NOTIFICATION_NAME_MSR_DATA_IN

object:nil];

//   Removal of registration

        [[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_MSR_DATA_IN

object:nil];


2) Notification Key - MPOS_NOTIFICATION_KEY_MSR_TrackAll

It is for reading the corresponding data if there is MSR Track Data in the notified data.


[Example]

-(void) didReceiveMSRData:(NSNotification *)notification

{

  if([_msr isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSString * strMSRTrackData   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_MSR_TrackAll];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received] "];

  }

}


3 Instance Methods
 

1) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer.
 

[Syntax]

-(__MPOS_RESULTS_) openService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerMSR* _msr = [MPosControllerMSR new];

if(_MPOS_SUCCESS ==

 [_msr openService])

{

    //  Success

if([_msr isOpen])

    {

        //  Notification setting

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveMSRData:)

name:_MPOS_NOTIFICATION_NAME_MSR_DATA_IN

object:nil];

    }

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_msr release];


2) closeService

This method closes the device corresponding to this class.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerMSR* _msr = [MPosControllerMSR new];

if(_MPOS_SUCCESS ==

 [_msr closeService])

{

    //  Success

[[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_MSR_DATA_IN

object:nil];

}

else

{

    //  Fail

}

[_msr release];

mPOS Controller Scanner

Inherits from

MPosControllerDevices

Framework

MPosSDK.a

Declared

MPosControllerScanner.h


1 Overview

MPosControllerScanner Class is an object that provides various functions about Scanner among the devices connected to the mPOS Thermal Printer.
 

2 Notification
 

1) Notification Name

This is for the registration of Notification about the data that can be obtained from the device corresponding to this class.

[Notification Name]

_MPOS_NOTIFICATION_NAME_SCANNER_DATA_IN


[Example]

//  Registration

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveScannerData:) name:_MPOS_NOTIFICATION_NAME_SCANNER_DATA_IN

object:nil];

//   Removal of registration

        [[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_SCANNER_DATA_IN

object:nil];


2) Notification Key - MPOS_NOTIFICATION_KEY_SCANNER_BAR_DATA

It is for reading the corresponding data if there is a Barcode in the notified Scanner Data.


[Example]

-(void) didReceiveScannerData:(NSNotification *)notification

{                                  

  if([_msr isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSString * strMSRTrackData   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_SCANNER_BAR_DATA];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received] "];

  }

}


3) Notification Key - MPOS_NOTIFICATION_KEY_SCANNER_BAR_TYPE

It is for reading Barcode Type if there is a Barcode in the notified Scanner Data.


[Example]

-(void) didReceiveScannerData:(NSNotification *)notification

{

  if([_scanner isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSNumber * BarType   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_SCANNER_BAR_TYPE];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received] "];

  }

}


3 Instance Methods
 

1) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer.
 

[Syntax]

-(__MPOS_RESULTS_) openService;
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerScanner* _scanner = [MPosControllerScanner new];

if(_MPOS_SUCCESS ==

 [_scanner openService])

{

    //  Success

//  Registration

       [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveScannerData:) name:_MPOS_NOTIFICATION_NAME_SCANNER_DATA_IN

object:nil];

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_scanner release];


2) closeService

This method terminates the use of the corresponding device.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerScanner* _scanner = [MPosControllerScanner new];

if(_MPOS_SUCCESS ==

 [_scanner closeService])

{

    //  Success

[[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_SCANNER_DATA_IN

object:nil];

}

else

{

    //  Fail

}

[_scanner release];

mPOS Controller BCD

Inherits from

MPosControllerDevices

Framework

MPosSDK.a

Declared

MPosControllerBCD.h


1 Overview

MPosControllerBCD Class is an object that provides the functions of the BCD among the devices connected to the mPOS Thermal Printer.

2 Instance Methods
 

1) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer.
 

[Syntax]

-(__MPOS_RESULTS_) openService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

if(_MPOS_SUCCESS ==

 [_bcd openService])

{

    //  Success

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_bcd release];


2) closeService

This method closes the device corresponding to this class.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

if(_MPOS_SUCCESS ==

 [_bcd closeService])

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


3) writeStringToUpperLine:(NSString*) string

This method is for displaying the given string on the upper side of the screen of BCD device.


[Syntax]

-(__MPOS_RESULTS_) writeStringToUpperLine:(NSString*)string;


[Parameters]

string

             Character strings to be displayed on the device


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result = [_bcd writeStringToUpperLine:@"*** UpperLine Test!!"];

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


4) writeStringToLowerLine:(NSString*) string

This method is for displaying the given string on the lower side of the screen of BCD device.


[Syntax]

-(__MPOS_RESULTS_) writeStringToLowerLine:(NSString*)string;


[Parameters]

string

             Character strings to be displayed on the device

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result = [_bcd writeStringToLowerLine:@"*** Lower Line Test!!"];

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


5) clearScreen

This method removes all the contents from the screen of BCD device.


[Syntax]

-(__MPOS_RESULTS_) clearScreen;
                                                                                                          

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result = [_bcd clearScreen];

                                                                                                 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


6) displayString

This method displays strings on the BCD device.
 

[Syntax]

-(__MPOS_RESULTS_) displayString:(NSString*)string;
 

[Parameters]

string

             Character strings to be displayed on the device


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result =  [_bcd displayString:@"*** displayString!!"];

                                                                                                 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


7) storeImage

This method stores images on the BCD device.


[Syntax]

-(__MPOS_RESULTS_) storeImage:(UIImage*)image

width:(NSInteger) width

imageNumber:(NSInteger)imageNumber;


[Parameters]

image

             Image to be stored on the device

width

             Image width

imageNumber

             Address of the device where the image is stored


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

NSString *path = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"png"];

UIImage* image = [UIImage imageWithContentsOfFile:path];

__MPOS_RESULTS_ result = [_bcd storeImage:image width:160 imageNumber:1];

                                                                                                 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


8) displayImage

This method displays images on the BCD device screen.


[Syntax]

-(__MPOS_RESULTS_) displayImage:(NSInteger)imageNumber;

xPos:(NSInteger)xPos

yPos:(NSInteger)yPos


[Parameters]

imageNumber

             Address of the image stored on the device (1~5)

xPos

             X coordinates of the display position

yPos

             Y coordinates of the display position


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result = [_bcd displayImage:1 xPos:0 yPos:0];

                                                                                                 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];


9) clearImage

This method clears images stored on the BCD device.


[Syntax]

-(__MPOS_RESULTS_) clearImage:(BOOL)isAll

imageNumber:(NSInteger)imageNumber


[Parameters]

isAll

             Whether to clear all the stored images

       (YES: clear all NO: clear only the images designated by imageNumber)

imageNumber

             If isAll is NO, the images stored on imageNumber are cleared.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerBCD* _bcd = [MPosControllerBCD new];

__MPOS_RESULTS_ result = [_bcd clearImage:NO imageNumber:1];

                                                                                                 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_bcd release];

mPOS Controller TTYUSB

Inherits from

MPosControllerDevices

Framework

MPosSDK.a

Declared

MPosControllerTTYUSB.h


1 Overview

MPosControllerTTYUSB Class is an object that provides various functions of the undefined USB device among the devices connected to the mPOS Thermal Printer.


2 Notification
 

1) Notification Name

This is for the registration of Notification about the data that can be obtained from the device corresponding to this class.
 

[Notification Name]

_MPOS_NOTIFICATION_NAME_TTYUSB_DATA_IN


[Example]

//  Registration

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveMSRData:) name:_MPOS_NOTIFICATION_NAME_TTYUSB_DATA_IN

object:nil];

//   Removal of registration

        [[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_TTYUSB_DATA_IN

object:nil];


2) Notification Key - _MPOS_NOTIFICATION_KEY_TTYUSB_DATA_IN

It is for reading the corresponding data if the notified data includes the data generated from TTYUSB device.


[Example]

-(void) didReceiveTTYUSBData:(NSNotification *)notification

{

  if([_msr isEqual:[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_OBJECT]])

  {

    NSData * data   =

[[notification userInfo] objectForKey:_MPOS_NOTIFICATION_KEY_TTYUSB_DATA_IN];

}

//  …

}

else

  {

    [self updateResultHistory:@"*****  [Other Data Received] "];

  }

}


3 Instance Methods
 

1) OpenService

This method initializes communication if a device corresponding to this class is connected to the mPOS Thermal Printer.


[Syntax]

-(__MPOS_RESULTS_) openService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerTTYUSB* _ttyUSB = [MPosControllerTTYUSB new];

if(_MPOS_SUCCESS ==

 [_ttyUSB openService])

{

    //  Success

if([_ttyUSB isOpen])

    {

        //  Notification setting

        [[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didReceiveTTYUSBData:)

name:_MPOS_NOTIFICATION_NAME_TTYUSB_DATA_IN

object:nil];

    }

}

else

{

    //  Fail

}

//  …….  Continue to other processes

[_ttyUSB release];


2) closeService

This method terminates the use of the corresponding device.


[Syntax]

-(__MPOS_RESULTS_) closeService;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerTTYUSB* _ttyUSB = [MPosControllerTTYUSB new];

if(_MPOS_SUCCESS ==

 [_ttyUSB closeService])

{

    //  Success

[[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_NAME_TTYUSB_DATA_IN

object:nil];

}

else

{

    //  Fail

}

[_ttyUSB release];

BGATE Lookup

Inherits from

NSObject

Framework

MPosSDK.a

Declared

BGATELookup.h


1 Overview

BGATELookup Class is an object that searches mPOS Thermal Printers available for connection.
 

2 Notification
 

1) Notification Name

This is for the registration of Notification about the data that can be obtained from the device corresponding to this class.
 

[Notification Name]

_MPOS_NOTIFICATION_NAME_LOOKUP_WIFIDEVICE_END

_MPOS_NOTIFICATION_NAME_LOOKUP_ETHERNETDEVICE_END

_MPOS_NOTIFICATION_NAME_LOOKUP_BTDEVICE


[Example]

//   Registration

[[NSNotificationCenter defaultCenter] addObserver:self

selector:@selector(didWifiDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_WIFIDEVICE_END

object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didBluetoothDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_BTDEVICE

object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didEthernetDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_ETHERNETDEVICE_END

object:nil];

//   Removal of registration

[[NSNotificationCenter defaultCenter] removeObserver:self

name_MPOS_NOTIFICATION_NAME_LOOKUP_WIFIDEVICE_END

object:nil];

[[NSNotificationCenter defaultCenter] removeObserver:self

name: _MPOS_NOTIFICATION_NAME_LOOKUP_BTDEVICE

object:nil];

[[NSNotificationCenter defaultCenter] removeObserver:self

name: _MPOS_NOTIFICATION_NAME_LOOKUP_ETHERNETDEVICE_END

object:nil];


3 Instance Methods
 

1) initWithTimeout: timeout :retry

This method is to initialize the BGATELookup object.
 

[Syntax]

-(id) initWithTimeout:(float)timeout withRetryCount:(float)retry;
 

[Return Value]

BGATELookup object


[Example]

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

if(lookupDevice != nil)

{

    // success

}

else

{

    //  Fail

}

 [_lookupDevice release];


2) refreshWifiDevicesList;

This method searches mPOS Thermal Printers on the Wi-Fi network.


[Syntax]

-(__MPOS_RESULTS_) refreshWifiDevicesList;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

__MPOS_RESULTS_ result  =  [_lookupDevice refreshWifiDevicesList];

 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

 [_lookupDevice release];


3) refreshEthernetDevicesList;

This method searches mPOS Thermal Printers connected via Ethernet.


[Syntax]

-(__MPOS_RESULTS_) refreshEthernetDevicesList;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

__MPOS_RESULTS_ result  =  [_lookupDevice refreshEthernetDevicesList];

 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

 [_lookupDevice release];


4) refreshBluetoothDevicesList;

This method searches mPOS Thermal Printers paired to the iDevice.


[Syntax]

-(__MPOS_RESULTS_) refreshBluetoothDevicesList;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

__MPOS_RESULTS_ result  =  [_lookupDevice refreshBluetoothDevicesList];

 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

 [_lookupDevice release];


5) getWifiDevicesList;

This method returns a list of mPOS Thermal Printers searched using refreshWifiDevicesList API.


[Syntax]

-(NSArray*) getWifiDeviceList;


[Return Value]

NSArray*:

The list of devices is stored as an NSArray.


[Example]

[[NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didWifiDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_WIFIDEVICE_END object:nil];

- (void) didWifiDeviceList:(NSNotification*)notification

{

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

NSArray* arr = [[NSArray alloc]initWithArray:[_lookupDevice getWifiDevicesList]];

If(arr != nil)

    // Success

else

    // Fail

[_lookupDevice release];

}


6) getEthernetDevicesList;

This method returns a list of mPOS Thermal Printers searched using refresh Ethernet DevicesList API.


[Syntax]

-(NSArray*) getEthernetDeviceList;


[Return Value]

NSArray*:

The list of devices is stored as an NSArray.


[Example]

[[NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didEthernetDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_ETHERNETDEVICE_END object:nil];

- (void) didEthernetDeviceList:(NSNotification*)notification

{

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

NSArray* arr = [[NSArray alloc]initWithArray:[_lookupDevice getEthernetDevicesList]];

If(arr != nil)

    // Success

else

    // Fail

[_lookupDevice release];

}


7) getBluetoothDevicesList;

This method returns a list of mPOS Thermal Printers searched using refreshBluetoothDevicesLis API.


[Syntax]

-(NSArray*) getBluetoothDeviceList;


[Return Value]

NSArray*:

The list of devices is stored as an NSArray.


[Example]

[[NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didBluetoothDeviceList:)

name:_MPOS_NOTIFICATION_NAME_LOOKUP_BTDEVICE_END object:nil];

- (void) didBluetoothDeviceList:(NSNotification*)notification

{

BGATELookup*           _lookupDevice;

_lookupDevice = [[BGATELookup alloc] initWithTimeout:2.0 withRetryCount:3];

NSArray* arr = [[NSArray alloc]initWithArray:[_lookupDevice getBluetoothDevicesList]];

If(arr != nil)

    // Success

else

    // Fail

[_lookupDevice release];

}

mPOS Controller Config

Inherits from

MPosControllerConfig

Framework

MPosSDK.a

Declared

MPosControllerConfig.h


1 Overview
MPosControllerConfig Class is an object that provides mPOS settings.

2 Notification
 

1) Notification Name

This is for the registration of Notification about the data that can be obtained from the device corresponding to this class.
 

[Notification Name]

_MPOS_NOTIFICATION_CUSTOMDEVICE_DATA_IN


[Example]

//   Registration

[ [NSNotificationCenter defaultCenter] addObserver:self

 selector:@selector(didReceiveData:)

name:_MPOS_NOTIFICATION_CUSTOMDEVICE_DATA_IN

object:nil ];

//   Removal of registration

 [[NSNotificationCenter defaultCenter] removeObserver:self

name:_MPOS_NOTIFICATION_CUSTOMDEVICE_DATA_IN

object:nil];


2) Notification Key -_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DATA

It is for reading the corresponding data if there is CustomDevice Data in the notified data.

[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey: _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DATA]]) {

    }

}


3) Notification Key - MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_USBID

To read the corresponding data if there is USBID Data in the notified data.


[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_USBID]]) {

    }

}


4) Notification Key - MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_FIND

To read the corresponding data if there is Find Dev Data in the notified data.


[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey  _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_FIND]]) {

    }

}


5) Notification Key - _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_ADD_RESULT

To read the corresponding data if there is add Device info in the notified data.


[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_ADD_RESULT]]) {

    }

}


6) Notification Key - _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DEL_RESULT

To read the corresponding data if there is delete Device info in the notified data.


[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DEL_RESULT]]) {

    }

}


7) Notification Key - _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_REINIT_RESULT

To read the corresponding data if there is reinit info in the notified data.


[Example]

-(void) didReceiveData:(NSNotification *)notification {

 if([_config isEqual:[[notification userInfo]

objectForKey_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_REINIT_RESULT]]) {

    }

}


3 Instance Methods
 

1) getCustomDeviceList

This method gets Custom Device List in NSArray data type.


[Syntax]

-(__MPOS_RESULTS_)getCustomDeviceList:(NSArray**)customDeviceArray

                            deviceType:(__MPOS_DEVICE_TYPE_)deviceType;


[Parameters]

customDeviceArray

             Set the array to save Custom Device list.


deviceType

             Set the Custom Device Type


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

__MPOS_RESULTS_ result =

[_config getCustomDeviceList:&arr deviceType:MPOS_DEVICE_NFC];

 

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_config release];


2) addCustomDevice
This method registers Custom Device.


[Syntax]

-(__MPOS_RESULTS_)addCustomDevice:(NSDictionary*)deviceInfo

                            deviceType:(__MPOS_DEVICE_TYPE_)deviceType;


[Parameters]

deviceInfo

              Set the Device Info(pID1, pID2, vID1, vID2).

deviceType

              Set the Custom Device Type.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

-(void) didReceiveData:(NSNotification *)notification {

if([_config isEqual:[[notification userInfo]

objectForKey:_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DATA]]) {

NSMutableArray* dicFindDevList;

dicFindDevList = [[NSMutableArray alloc]init];

[dicFindDevList addObject:(NSDictionary*)[notification userInfo]];

__MPOS_RESULTS_ result =

[_config addCustomDevice:[dicFindDevList objectAtIndex:0]

                               deviceType:curDevType];

if(_MPOS_SUCCESS == result ){

    //  Success

}

else{

    //  Fail

}

[_config release];

}

}


3) deleteCustomDevice

This method deletes Custom Device.


[Syntax]

-(__MPOS_RESULTS_) deleteCustomDevice:(NSDictionary*)deviceInfo

                              deviceType:(__MPOS_DEVICE_TYPE_)deviceType;


[Parameters]

deviceInfo

              Set the Device Info(pID1, pID2, vID1, vID2).

deviceType

              Set the Custom Device Type.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

-(void) didReceiveData:(NSNotification *)notification {

if([_config isEqual:[[notification userInfo]

objectForKey: _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_DATA]]) {

NSMutableArray* dicList;

dicList = [[NSMutableArray alloc]init];

[dicList addObject:(NSDictionary*)[notification userInfo]];

__MPOS_RESULTS_ result =

[_config deleteCustomDevice:[dicList objectAtIndex:0]

                               deviceType:curDevType];

if(_MPOS_SUCCESS == result ){

    //  Success

}

else{

    //  Fail

}

[_config release];

}

}


4) reInitCustomDeviceType

This method reinitializes the Custom Device.


[Syntax]

-(__MPOS_RESULTS_)reInitCustomDeviceType:(NSInteger)deviceType;


[Parameters]

deviceType

              Set the Custom Device Type.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

__MPOS_RESULTS_ result =

[_config reInitCustomDeviceType:MPOS_DEVICE_NFC];

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

[_config release];


5) listUsbID

This method gets Usb ID List in NSArray data type.


[Syntax]

-(__MPOS_RESULTS_) listUsbID;


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

__MPOS_RESULTS_ result = [_config listUsbID];

if(_MPOS_SUCCESS == result )

{

    //  Success

}

else

{

    //  Fail

}

-(void) didReceiveData:(NSNotification *)notification {

if([_config isEqual:[[notification userInfo]

objectForKey:_MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_USBID]]]) {

NSMutableArray* dicUsbIDList;

dicUsbIDList = [[NSMutableArray alloc]init];

[dicUsbIDList addObject:(NSDictionary*)[notification userInfo]];

}

[_config release];

}


6) findDevID

This method gets findDevID in NSArray data type.


[Syntax]

-(__MPOS_RESULTS_)findDevID:(NSInteger)devID;


[Parameters]

devID

              Set the Custom Device Type.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

__MPOS_RESULTS_ result = [_config findDevID:MPOS_DEVICE_NFC];

if(_MPOS_SUCCESS == result ){

    //  Success

}

else{

    //  Fail

}

-(void) didReceiveData:(NSNotification *)notification {

if([_config isEqual:[[notification userInfo]

objectForKey: _MPOS_NOTIFICATION_KEY_CUSTOMDEVICE_FIND]]]) {

NSMutableArray* findDevList;

findDevList = [[NSMutableArray alloc]init];

[findDevList  addObject:(NSDictionary*)[notification userInfo]];

}

[_config release];

}


7) getSerialConfiguration

This method gets Serial Configuration.


[Syntax]

-(__MPOS_RESULTS_) getSerialConfiguration:(__MPOSSerialConfiguration*)serialConfiguration

     targetDeviceID:(NSInteger)targetDeviceID

            timeout:(NSTimeInterval)timeout;


[Parameters]

serialConfiguration

Set the object to save serialConfiguration.


targetDeviceID

Set the Device ID.


timeout

Set the timeout period. (Unit: second(s))


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

MPOSSerialConfiguration serialConfiguration;

__MPOS_RESULTS_ result = [_config  getSerialConfiguration:&serialConfiguration

targetDeviceID:121

timeout:10.0];

if(_MPOS_SUCCESS == result ){

    //  Success

}

else{

    //  Fail

}

[_config release];


8) setSerialConfiguration

This method sets Serial Configuration.


[Syntax]

-(__MPOS_RESULTS_) setSerialConfiguration:(__MPOSSerialConfiguration)serialConfiguration

     targetDeviceID:(NSInteger)targetDeviceID

            timeout:(NSTimeInterval)timeout;


[Parameters]

serialConfiguration

Set the object to save serialConfiguration.


targetDeviceID

Set the Device ID.


timeout

Set the timeout period. (Unit, second(s))


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

MPosControllerConfig *           _config;

_config = [[MPosControllerConfig alloc] init ];

MPOSSerialConfiguration setting;

setting.baudrate = _MPOS_BAUDRATE_115200;               

setting.dataBit  = _MPOS_DATABIT_8;

setting.stopBit  = _MPOS_STOPBIT_1;               

setting.parityBit = _MPOS_PARITY_NONE;               

[_config setSerialConfiguration:toSetting

targetDeviceID:121

timeout:10.0];

if(_MPOS_SUCCESS == result ){

    //  Success

}   else{

    //  Fail

}

[_config release];

mPOS Controller Label Printer

Inherits from

MPosControllerLabelPrinter

Framework

MPosSDK.a

Declared

MPosControllerLabelPrinter.h


1 Overview
MPosControllerLabelPrinter Class is an object that provides the Label Printer.

2 Instance Methods
 

1) setCurrentEncoding

Select the current string encoding type.
 

[Syntax]

-(__MPOS_RESULTS_) setCurrentEncoding:(NSStringEncoding)encoding;
 

[Parameters]

encoding

              Set the NSStringEncoding.
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


2) checkPrinterStatus

Check the printer status.
 

[Syntax]

-(__MPOS_RESULTS_) checkPrinterStatus:(blockType1)statusReceiver;


[Parameters]

statusReceiver

              Check the printer status.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


3) printBuffer

This method prints in the printer buffer.
 

[Syntax]

-(__MPOS_RESULTS_) printBuffer:(NSInteger)numberOfCopies;


[Parameters]

numberOfCopies

              The number of copies


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Example]

long  lResult = [_printer printBuffer:1];          // Any number bigger than 1 will repeat the same printing for the specified number of times.

if(lResult ==_MPOS_SUCCESS)

NSLog(@”doPrint Success”);


4) printRawData

Print RawData.
 

[Syntax]

-(__MPOS_RESULTS_) printRawData:(NSData*)rawData;


[Parameters]

rawData

              rawData to pPrint.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


5) drawTextDeviceFont

This method draws strings on the image buffer using Device Font.


[Syntax]

-(__MPOS_RESULTS_) drawTextDeviceFont:(NSString*)text

                                xPosition:(NSInteger)xPostion

                                yPosition:(NSInteger)yPostion

                            fontSelection:(char)fontSelection

                                fontWidth:(NSInteger)fontWidth

                               fontHeight:(NSInteger)fontHeight

                rightSideCharacterSpacing:(NSInteger)rightSideCharacterSpacing

                             fontRotation:(NSInteger)fontRotation

                                  reverse:(BOOL)reverse

                                     bold:(BOOL)bold

                            textAlignment:(NSInteger)textAlignment;


[Parameters]

text

             Text string to print.

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

fontSelection

             Selection of fonts to print

(Reference: 6-4-3-11 Appendix - 1 Defines - 7) LabelPrinter - Device Fonts)

fontWidth

             Horizontal magnification of the selected font (1~4).

fontHeight

             Vertical magnification of the selected font (1~4).

rightSideCharacterSpacing

             Right side margin of the characters (ex: 5, +3, -10…).

fontRotation

             Rotation setting of the selected font

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)

reverse

             Option to use the Reverse Font.

Reverse Font will be used for printing if this parameter is set to YES.

bold

             Option to use the Bold Font.

Bold Font will be used for printing if this parameter is set to YES.

textAlignment

             Alignment method

(Reference: 6-4-3-11 Appendix - 1 Defines - 2) Barcode/Image/Text Alignment)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawTextDeviceFont:@"device Font Test"

xPosition:70  yPosition:220

fontSelection:__MPOS_LABEL_DEVICE_FONT_12PT

fontWidth:1 fontHeight:1

rightSideCharacterSpacing:0

fontRotation:_MPOS_LABEL_ROTATION_DEGREES_0

reverse:NObold:NO textAlignment:__MPOS _ALIGNMENT_LEFT];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawTextDeviceFont Success”);


6) drawTextVectorFont

This method draws strings on the image buffer using Device Font.
                                       

[Syntax]

-(long) drawTextVectorFont:(NSString*)text

                 xPosition:(NSInteger)xPostion

                 yPosition:(NSInteger)yPostion

             fontSelection:(char)fontSelection

                 fontWidth:(NSInteger)fontWidth

                fontHeight:(NSInteger)fontHeight

 rightSideCharacterSpacing:(NSInteger)rightSideCharacterSpacing

              fontRotation:(NSInteger)fontRotation

                   reverse:(BOOL)reverse

                      bold:(BOOL)bold

                    italic:(BOOL)italic

textWriteDirectionRightToLeft:(BOOL)textWriteDirectionRightToLeft

             textAlignment:(NSInteger)textAlignment;


[Parameters]

text

             Text string to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

fontSelection

             Selection of fonts to print

 (Reference: 6-4-3-11 Appendix - 1 Defines - 7) LabelPrinter - Device Fonts)

fontWidth

             Horizontal magnification of the selected font (1~4).

fontHeight

             Vertical magnification of the selected font (1~4).

rightSideCharacterSpacing

             Right side margin of the characters (ex: 5, +3, -10…).

fontRotation

             Rotation setting of the selected font

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)

reverse

             Option to use the Reverse Font.

Reverse Font will be used for printing if this parameter is set to YES.

bold

             Option to use the Bold Font.

Bold Font will be used for printing if this parameter is set to YES.

italic

             Option to use the Italic Font.

Italic Font will be used for printing if this parameter is set to YES.

textWriteDirectionRightToLeft

             Option to print the character string in the direction from right to left

textAlignment

             Alignment method

(Reference: 6-4-3-11 Appendix - 1 Defines - 2) Barcode/Image/Text Alignment)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawTextVectorFont:@"draw Font Test - Vector"

 xPosition:50 yPosition:100

fontSelection: _MPOS_LABEL_VECTOR_FONT_ASCII

fontWidth:10 fontHeight:10

rightSideCharacterSpacing:0

fontRotation: _MPOS_LABEL_ROTATION_DEGREES_0

reverse:NO bold:YES italic:YES

textWriteDirectionRightToLeft:NO textAlignment: _MPOSALIGNMENT_LEFT];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawTextVectorFont Success”);


7) drawBarcode1D

This method requests the printing of 1D barcode to the image buffer.
                                          

[Syntax]

-(long) drawBarcode1D:(NSString*)data

            xPosition:(NSInteger)xPostion

            yPosition:(NSInteger)yPostion

          barcodeType:(NSInteger)barcodeType

          widthNarrow:(NSInteger)widthNarrow

            widthWide:(NSInteger)widthWide

               height:(NSInteger)height

                  hri:(NSInteger)hri

       quietZoneWidth:(NSInteger)quietZoneWidth

             rotation:(NSInteger)rotation;


[Parameters]

text

              Barcode data to print

xPosition

              X coordinate of the position to print

yPosition

              Y coordinate of the position to print

barcodeType

             Barcode type.

(Reference: 6-4-3-11 Appendix - 1 Defines - 10) LabelPrinter - 1D Barcode Types)

widthNarrow

              Width of narrow bar

widthWide                              

              Width of wide bar

height

              Height of barcode

hri

              HRI (Human Readable Interpretation) display position of code data

              (Reference: 6-4-3-11 Appendix - 1 Defines - 9) LabelPrinter - Barcode HRI)

rotation

              Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcode1D:@">A1234567890"

xPosition:50 yPosition:100

barcodeType:_MPOS_LABEL_BARCODE_TYPE_CODE128

widthNarrow:2 widthWide:6 height:100

hri:_MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE1

quietZoneWidth:0

rotation:_MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawBarcode1D Success”);


8) drawBarcodeMexiCode

This method requests the printing of MaxiCode barcode to the image buffer.
                                       

[Syntax]

-(long) drawBarcodeMexiCode:(NSString*)data

                  xPosition:(NSInteger)xPostion

                  yPosition:(NSInteger)yPostion

                       mode:(NSInteger)mode;


[Parameters]

text

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

mode

             Mode of MaxiCode

(Reference: 6-4-3-11 Appendix - 1 Defines - 11) LabelPrinter - MaxiCode Modes)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeMexiCode:@"Maxi Code Test!!!"

xPosition:50 yPosition:400

mode:_ MPOS_LABEL_MAXICODE_MODE_0];

if(lResult == _MPOS_LABEL_RESULT_SUCCESS)

NSLog(@”drawBarcodeMexiCode Success”);


9) drawBarcodePDF417

This method requests the printing of PDF417 barcode to the image buffer.
                                       

[Syntax]

-(long) drawBarcodePDF417:(NSString*)data

                xPosition:(NSInteger)xPostion

                yPosition:(NSInteger)yPostion

          maximumRowCount:(NSInteger)maximumRowCount       // 3~90

       maximumColumnCount:(NSInteger)maximumColumnCount    // 1~30

     errorCorrectionLevel:(NSInteger)errorCorrectionLevel

    dataCompressionMethod:(NSInteger)dataCompressionMethod

         printBarcodeText:(BOOL)printBarcodeText

       barcodeOriginPoint:(NSInteger)barcodeOriginPoint

              moduleWidth:(NSInteger)moduleWidth   // 2~9

                barHeight:(NSInteger)barHeight     // 4~99

                 rotation:(NSInteger)rotation;


[Parameters]

text

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

maximumRowCount

             maximum Row Count (3~90).

errorCorrectionLevel

             Error correction level

(Reference: 6-4-3-11 Appendix - 1 Defines - 22) LabelPrinter - Error Correction Level)

dataCompressionMethod

             Data Compression Method

               (Reference: 6-4-3-11 Appendix - 1 Defines - 23) LabelPrinter - Data Compression Method)

printBarcodeText

             HRI printing option.

barcodeOriginPoint

             Position to be used as the reference point of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 12) LabelPrinter - Barcode Origin Point)

moduleWidth

             Module Width (2~9)

BarHeight

             Height of barcode (4~99)

rotation

             Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult =[_printer drawBarcodePDF417:@"PDF417 Test"

xPosition:50 yPosition:300

maximumRowCount:30 maximumColumnCount:5

errorCorrectionLevel:_MPOS_LABEL_ERROR_CORRECTION_LEVEL0

dataCompressionMethod:_ MPOS_LABEL_DATA_COMPRESSION_METHOD_TEXT

printBarcodeText:YES

barcodeOriginPoint:_ MPOS_LABEL_BARCODE_ORIGIN_POINT_UpperLeft

moduleWidth:3 barHeight:10

rotation:_ MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawBarcodePDF417 Success”);


10) drawBarcodeQRCode

This method requests the printing of QRCode to the image buffer.


[Syntax]

-(long) drawBarcodeQRCode:(NSString*)data

                xPosition:(NSInteger)xPostion

                yPosition:(NSInteger)yPostion

              barcodeSize:(NSInteger)barcodeSize   // 1~4

                    model:(NSInteger)model

      errorColectionLevel:(NSInteger)errorColectionLevel

                 rotation:(NSInteger)rotation;


[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

barcodeSize

             Size of barcode (1~4)

model

               Model of QRCode

(Reference: : 6-4-3-11 Appendix - 1 Defines - 13) LabelPrinter - QRCode Model)

errorCorrectionLevel

             Error Correction Level

(Reference: 6-4-3-11 Appendix - 1 Defines - 22) LabelPrinter - Error Correction Level)rotation

               Rotation setting of barcode

 (Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult =[_printer drawBarcodeQRCode:@"QR Code Test"

xPosition:450 yPosition:300

barcodeSize:3

model:_ MPOS_LABEL_QRCODE_MODEL_2

errorColectionLevel:_ MPOS_LABEL_ERROR_CORRECTION_LEVEL1

rotation:_ MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_LABEL_RESULT_SUCCESS)

NSLog(@”drawBarcodeQRCode Success”);


11) drawBarcodeDataMatrix

This method requests the printing of Data Matrix to the image buffer.
                                          

[Syntax]

-(long) drawBarcodeDataMatrix:(NSString*)data

                    xPosition:(NSInteger)xPostion

                    yPosition:(NSInteger)yPostion

                  barcodeSize:(NSInteger)barcodeSize   // 1~4

                      reverse:(BOOL)reverse

                     rotation:(NSInteger)rotation;


[Parameters]

data

              Barcode data to print

xPosition

              X coordinate of the position to print

yPosition

              Y coordinate of the position to print

barcodeSize

             Size of barcode (1~4)

reverse

             Reverse mode

rotation

Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult =[_printer drawBarcodeDataMatrix:@"dataMatrix Test"

xPosition:600 yPosition:300

barcodeSize:3 reverse:NO

rotation:_MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodeDataMatrix Success”);


12) drawBarcodeAztec

This method requests the printing of Aztec to the image buffer.
                                          

[Syntax]

-(long) drawBarcodeAztec:(NSString*)data

               xPosition:(NSInteger)xPostion

               yPosition:(NSInteger)yPostion

             barcodeSize:(NSInteger)barcodeSize    // 1~10

         extendedChannel:(BOOL)extendedChannel

    errorCorrectionLevel:(NSInteger)errorCorrectionLevel

              menuSymbol:(BOOL)menuSymbol

         numberOfSymbols:(NSInteger)numberOfSymbols

              optionalID:(NSString*)optionalID

                rotation:(NSInteger)rotation;


[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

barcodeSize

             Size of barcode (1~10)

extendedChannel

             Extended channel

errorCorrectionLevel

             Error Correction Level 
 

Value

Error control and symbol size/type

0

Default error correction level

1 ~ 99

Error correction percentage


menuSymbol

             Option to use menu symbol

numberOfSymbols

             Number of symbols for structured append: (1 ~ 26)

optionalID

             Optional ID field for structured append: ID field string (Maximum 24 character)

rotation

               Rotation setting of barcode

 (Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeAztec:@"Aztec Barcode Test"

xPosition:450 yPosition:400

barcodeSize:3

extendedChannel:NO

errorCorrectionLevel:0

menuSymbol:NO numberOfSymbols:1

optionalID:@""

rotation:_ MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawBarcodeAztec Success”);


13) drawBarcodeCode49
       

This method requests the printing of Code49 to the image buffer.


[Syntax]

-(long)drawBarcodeCode49:(NSString*)data

               xPosition:(NSInteger)xPostion

               yPosition:(NSInteger)yPostion

             widthNarrow:(NSInteger)widthNarrow

               widthWide:(NSInteger)widthWide

                  height:(NSInteger)height

                     hri:(NSInteger)hri

            startingMode:(NSInteger)startingMode

                rotation:(NSInteger)rotation;


[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

widthNarrow

             Width of narrow bar

widthWide                            

             Width of wide bar

height

             Height of barcode

hri

Print position of barcode data value (Human Readable Interpretation)
(
Reference: 6-4-3-11 Appendix - 1 Defines - 19) LabelPrinter - Draw Block Options)

startingMode

             Starting mode

(Reference: 6-4-3-11 Appendix - 1 Defines - 14) LabelPrinter - Code 49 Starting Mode)

rotation

             Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeCode49:@"Code 49 Test"

xPosition:600 yPosition:400

widthNarrow:1 widthWide:3

height:100

hri:_ MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE1

startingMode:_ MPOS_LABEL_STARTINGMODE_AUTOMATIC

rotation:_ _AUTOMATIC _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodeCode49 Success”);


14) drawBarcodeCodaBlock

This method requests the printing of CodaBlock to the image buffer.


[Syntax]

-(long) drawBarcodeCodaBlock:(NSString*)data

                   xPosition:(NSInteger)xPostion

                   yPosition:(NSInteger)yPostion

                 widthNarrow:(NSInteger)widthNarrow

                   widthWide:(NSInteger)widthWide

                      height:(NSInteger)height

               securityLevel:(BOOL)securityLevel

    numberOfCharactersPerrow:(NSInteger)numberOfCharactersPerrow

                        mode:(char)mode

         numberOfRowToEncode:(NSInteger)numberOfRowToEncode;


[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

widthNarrow

             Width of narrow bar

widthWide                            

             Width of wide bar

height

             Height of barcode

securityLevel

             securityLevel setting

numberOfCharactersPerrow

             Number of characters per row (data columns): 2~62

mode

             Barcode printing mode

(Reference: 6-4-3-11 Appendix - 1 Defines - 15) LabelPrinter - Codablock Mode)

numberOfRowToEncode

              Number of rows to encode
 

Mode

Value

_MPOS_LABEL_CODABLACK_MODE_A

1 ~ 18

_MPOS_LABEL_CODABLACK_MODE_E

2 ~ 4

_MPOS_LABEL_CODABLACK_MODE_F

2 ~ 4


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeIMB:@"01234567890123456789"

xPosition:50 yPosition:1000

printBarcodeText:YES

rotation:_ MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodeCodaBlock Success”);


15) drawBarcodeMicroPDF

This method requests the printing of Micro PDF417 to the image buffer.
                                         

[Syntax]

-(long) drawBarcodeMicroPDF:(NSString*)data

                  xPosition:(NSInteger)xPostion

                  yPosition:(NSInteger)yPostion

                moduleWidth:(NSInteger)moduleWidth     // 2~8

              barcodeHeight:(NSInteger)barcodeHeight   // 1~99

                       mode:(NSInteger)mode            // 0~33

                   rotation:(NSInteger)rotation;
 

[Parameters]

text

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

moduleWidth

             module Width (2~8)

barcodeHeight

             Height of barcode (1~99)

rotation

             Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeMicroPDF:@"MICRO PDF 417 TEST"

xPosition:50 yPosition:900

moduleWidth:4

barcodeHeight:4

mode:8

rotation:_MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawBarcodeMicroPDF Success”);


16) drawBarcodeIMB

This method requests the printing of BarcodeIMB to the image buffer.
                                         

[Syntax]

-(long) drawBarcodeIMB:(NSString*)data

             xPosition:(NSInteger)xPostion

             yPosition:(NSInteger)yPostion

      printBarcodeText:(BOOL)printBarcodeText

              rotation:(NSInteger)rotation;
 

[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

printBarcodeText

             HRI printing option

rotation

               Rotation setting of barcode

               (Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeIMB:@"01234567890123456789"

xPosition:50 yPosition:1000

printBarcodeText:YES

rotation:_MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)   NSLog(@” drawBarcodeIMB Success”);


17) drawBarcodeMSI

This method requests the printing of BarcodeMSI to the image buffer.
                                          

[Syntax]

-(long) drawBarcodeMSI:(NSString*)data

             xPosition:(NSInteger)xPostion

             yPosition:(NSInteger)yPostion

           widthNarrow:(NSInteger)widthNarrow

             widthWide:(NSInteger)widthWide

                height:(NSInteger)height

   checkDigitSelection:(NSInteger)checkDigitSelection

  printCheckDigitInHRI:(BOOL)printCheckDigitInHRI

                   hri:(NSInteger)hri

              rotation:(NSInteger)rotation;
 

[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

widthNarrow

             Width of narrow bar

widthWide

             Width of wide bar

height

             Height of barcode.

checkDigitSelection

               checkDigit option

               (Reference: 6-4-3-11 Appendix - 1 Defines - 16) LabelPrinter - Check Digit Option)

printCheckDigitInHRI

             Option to include check digit in HRI

hri

Print position of barcode data value (Human Readable Interpretation)
(Reference: 6-4-3-11 Appendix - 1 Defines - 9) LabelPrinter - Barcode HRI)

rotation

             Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeMSI:@"123456"

xPosition:50 yPosition:1100

widthNarrow:2 widthWide:7

height:100

checkDigitSelection:_MPOS_LABEL_CHECKDIGIT_1MOD10

printCheckDigitInHRI:YES

hri:_MPOS_LABEL _BARCODE_HRI_BELOW_FONTSIZE1

rotation:_MPOS_LABEL_ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodeMSI Success”);


18) drawBarcodePlessey       

This method requests the printing of BarcodePlessey to the image buffer.
                                          

[Syntax]

-(long) drawBarcodePlessey:(NSString*)data

                 xPosition:(NSInteger)xPostion

                 yPosition:(NSInteger)yPostion

               widthNarrow:(NSInteger)widthNarrow

                 widthWide:(NSInteger)widthWide

                    height:(NSInteger)height

           printCheckDigit:(BOOL)printCheckDigit

                       hri:(NSInteger)hri

                  rotation:(NSInteger)rotation;
 

[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

widthNarrow

             Width of narrow bar

widthWide

             Width of wide bar

height

             Height of barcode.

printCheckDigitInHRI

             Option to include check digit in HRI

hri

Print position of barcode data value (Human Readable Interpretation)
(Reference: 6-4-3-11 Appendix - 1 Defines - 9) LabelPrinter - Barcode HRI)

rotation

              Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodePlessey:@"12345"

xPosition:100 yPosition:100

widthNarrow:2 widthWide:7

height:100 printCheckDigit:YES

hri:_ MPOS_LABEL _BARCODE_HRI_BELOW_FONTSIZE1

rotation:_ MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodePlessey Success”);


19) drawBarcodeTLC39

This method requests the printing of BarcodeTLC39 to the image buffer.
                                       

[Syntax]

-(long) drawBarcodeTLC39:(NSString*)data

               xPosition:(NSInteger)xPostion

               yPosition:(NSInteger)yPostion

             widthNarrow:(NSInteger)widthNarrow

               widthWide:(NSInteger)widthWide

                  height:(NSInteger)height

  rowHeightOfMicroPDF417:(NSInteger)rowHeightOfMicroPDF417

narrowWidthOfMicroPDF417:(NSInteger)narrowWidthOfMicroPDF417

                rotation:(NSInteger)rotation;
 

[Parameters]

data

             Barcode data to print

xPosition

             X coordinate of the position to print

yPosition

             Y coordinate of the position to print

widthNarrow

             Width of narrow bar

widthWide

             Width of wide bar

height

             Height of barcode.

rowHeightOfMicroPDF417

             Row height of microPDF417 barcode

narrowWidthOfMicroPDF417

             narrowWideHeight of microPDF417 barcode

rotation

             Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeTLC39:@"123456,ABCD12345678901234"

xPosition:100 yPosition:300

widthNarrow:2 widthWide:7

height:50 rowHeightOfMicroPDF417:3

narrowWidthOfMicroPDF417:2

rotation:_ MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)

NSLog(@” drawBarcodeTLC39 Success”);


20) drawBarcodeRSS

This method requests the printing of BarcodeRSS to the image buffer.
                                          

[Syntax]

-(long) drawBarcodeRSS:(NSString*)data

             xPosition:(NSInteger)xPostion

             yPosition:(NSInteger)yPostion

           barcodeType:(NSInteger)barcodeType

         magnification:(NSInteger)magnification   // 1~10

       separatorHeight:(NSInteger)separatorHeight // 1~2

         barcodeHeight:(NSInteger)barcodeHeight

          segmentWidth:(NSInteger)segmentWidth    // 0~22

              rotation:(NSInteger)rotation;


[Parameters]

data

              Barcode data to print

xPosition

              X coordinate of the position to print

yPosition

              Y coordinate of the position to print

barcodeType

              RSS barcode type

(Reference: 6-4-3-11 Appendix - 1 Defines - 17) LabelPrinter - RSS Barcode Type)magnification

              magnification. (1~10)

separatorHeight

              Height of separator (1~2)

barcodeHeight

              Height of barcode.

segmentWidth

              segment Width(0~22)

rotation

              Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawBarcodeRSS:@"12345678901|this is composite info"

xPosition:100 yPosition:600

barcodeType:_ MPOS_LABEL _RSS_BARCODE_TYPE_RSS14

magnification:2

separatorHeight:1 barcodeHeight:20 segmentWidth:10

rotation:_ MPOS_LABEL _ROTATION_DEGREES_0];

if(lResult == _MPOS_SUCCESS)  NSLog(@” drawBarcodeRSS Success”);


21) drawBarcodeGS1DataBar

This method requests the printing of BarcodeGS1DataBar to the image buffer.
                                      

[Syntax]

-(long) drawBarcodeGS1DataBar:(NSString*)data

             xPosition:(NSInteger)xPostion

             yPosition:(NSInteger)yPostion

           barcodeType:(NSInteger)barcodeType

         magnification:(NSInteger)magnification   // 1~10

       separatorHeight:(NSInteger)separatorHeight // 1~2

         barcodeHeight:(NSInteger)barcodeHeight

          segmentWidth:(NSInteger)segmentWidth    // 0~22

              rotation:(NSInteger)rotation;
 

[Parameters]

data

              Barcode data to print

xPosition

              X coordinate of the position to print

yPosition

              Y coordinate of the position to print

barcodeType

              RSS barcode type

 (Reference: 6-4-3-11 Appendix - 1 Defines - 17) LabelPrinter - RSS Barcode Type)

magnification

              magnification. (1~10)

separatorHeight

              Height of separator (1~2)

barcodeHeight

              Height of barcode.

segmentWidth

              segment Width(0~22)

rotation

              Rotation setting of barcode

(Reference: 6-4-3-11 Appendix - 1 Defines - 8) LabelPrinter - Rotation Degrees)


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


22) drawBlock

This method requests the printing of Block to the image buffer.
                                          

[Syntax]

-(long) drawBlock: (NSInteger)startPosX

             startPosY:(NSInteger)startPosY

              endPosX:(NSInteger)endPosX

              endPosY:(NSInteger)endPosY

option:(char)option

             thickness:(NSInteger)thickness;
 

[Parameters]

startPosX

              X coordinate of the starting position of the block for printing

startPosY

              Y coordinate of the starting position of the block for printing

endPosX

              X coordinate of the end position of the block for printing

endPosY

              Y coordinate of the end position of the block for printing

option

              Option value for printing

thickness

              Thickness value for printing
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.
 

[Example]

lResult = [_printer drawBlock:100

startPosY:100

endPosX:300 endPosY:300

option:_MPOS_LABEL_DRAW_BLOCK_OPTION_SLOPE

thickness:1];

NSLog(@” drawBlock Success”);


23) drawCircle

This method requests the printing of Circle to the image buffer.


[Syntax]

-(long) drawCircle: (NSInteger)startPosX

       startPosY:(NSInteger)startPosY

sizeSelection:(NSInteger)sizeSelection

         multiplier:(NSInteger)multiplier;


[Parameters]

startPosX

              X coordinate of the starting position of the circle for printing

startPosY

              Y coordinate of the starting position of the circle for printing

sizeSelection

              Size value of the circle

multiplier

              Multiplier value


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


[Example]

lResult = [_printer drawCircle:200

startPosY:200

sizeSelection:_MPOS_LABEL_DRAW_CIRCLE_SIZE_40X40

multiplier:1];

if(lResult == _MPOS_SUCCESS)

NSLog(@”drawTextDeviceFont Success”);


24) drawImage

This method requests the printing of Image to the image buffer.


[Syntax]

-(long) drawImage: (UIImage*)image

 stratPosX:(NSInteger)startPosX

       startPosY:(NSInteger)startPosY

width:(NSInteger)width;


[Parameters]

Image

              Image for printing

startPosX

              X coordinate of the starting position of the circle for printing

startPosY

              Y coordinate of the starting position of the circle for printing

width

              Width value


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


[Discussion]

Nothing will be printed when this API is called.

Contents requested by this API will be printed when 6-4-3-10 MPosControllerLabelPrinter Reference - 2 Instance Methods - 3) printBuffer API is called.


25) setPrintingType

Set the PrintingType.
                                          

[Syntax]

-(__MPOS_RESULTS_) setPrintingType:(char)printingType;


[Parameters]

printingType

              Set the printingType.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


26) setMargin

Set the Margin.
                                          

[Syntax]

-(__MPOS_RESULTS_) setMargin:(NSInteger)horizontalMargin

              verticalMargin:(NSInteger)verticalMargin;
 

[Parameters]

horizontalMargin

              Set the horizontalMargin .

verticalMargin

              Set the verticalMargin.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


27) setBackFeedOption

Set the BackFeed Option.
                                         

[Syntax]

-(__MPOS_RESULTS_) setBackFeedOption:(BOOL)bEnable

                        stepQuantity:(NSInteger)stepQuantity;


[Parameters]

bEnable

              Set the BackFeed Enable.

stepQuantity

              Set the Quantity.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


28) setLength

Set the Length.
                                          

[Syntax]

-(__MPOS_RESULTS_) setLength:(NSInteger) labelLength

                   gepLength:(NSInteger) gapLength

                   mediaType:(char) mediaType

                offsetLength:(NSInteger) offsetLength;


[Parameters]

labelLength

              Set the labelLength.

gapLength

              Set the gapLength .

mediaType

              Set the mediaType.

offsetLength

              Set the offsetLength.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


29) setWidth

Set the Width.
                                          

[Syntax]

-(__MPOS_RESULTS_) setWidth:(NSInteger) labelWidth;


[Parameters]

labelWidth

              Set the labelWidth.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


30) setBufferMode

Set the BufferMode.
                                          

[Syntax]

-(__MPOS_RESULTS_) setBufferMode:(BOOL) isUseDoubleBuffering;


[Parameters]

isUseDoubleBuffering

              Set the Buffer mode.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


31) setSpeed

Set the speed.
                                          

[Syntax]

-(__MPOS_RESULTS_) setSpeed:(NSInteger) speedValue;


[Parameters]

speedValue

              Set the speed.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


32) setDensity

Set the density.
 

[Syntax]

-(__MPOS_RESULTS_) setDensity:(NSInteger) densityValue;


[Parameters]

densityValue

              Set the densityValue (1~20).


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


33) set Orientation

Set the oriention.
                                          

[Syntax]

-(__MPOS_RESULTS_) setOrientation:(char) orientationValue;


[Parameters]

orientationValue

              Set the orientationValue.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


34) setOffset

Set the Offset.
                                          

[Syntax]

-(__MPOS_RESULTS_) setOffset:(NSInteger) offsetValue;


[Parameters]

offsetValue

              Set the offsetValue (-100 ~ 100).
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


35) setCuttingPosition

Set the Cutting Position.
                                          

[Syntax]

-(__MPOS_RESULTS_) setCuttingPosition:(NSInteger) cuttingPosition;


[Parameters]

cuttingPosition

              Set the cutting Position.
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


36) setAutoCutter       

Set the Auto Cutter.
                                          

[Syntax]

-(__MPOS_RESULTS_) setAutoCutter:(BOOL) enableAutoCutter

                   cuttingPeriod:(NSInteger)cuttingPeriod;
 

[Parameters]

enableAutoCutter

              Set the AutoCutter Enable.

cuttingPeriod

              Set the cuttingPeriod.
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.
 

37) getModelName

This method gets information and Model Name.
                                          

[Syntax]

-(__MPOS_RESULTS_) getModelName:(NSString**) modelNameBuffer;


[Parameters]

modelNameBuffer

              model name information.
 

[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.


38) getFirmwareVersion

The method gets information and Firmware Version.
                                          

[Syntax]

-(__MPOS_RESULTS_) getFirmwareVersion:(NSString**) firmwareVersion;


[Parameters]

firmwareVersion

              Firmware Version information.


[Return Value]

This method returns _MPOS_SUCCESS if the operation is successful,

Refer to [6-4-3-11 Appendix - 1 Defines - 1) __MPOS_RESULTS_] for other cases.

Appendix

1 Defines


1)
__MPOS_RESULTS_

The following table contains the definitions of result codes returned by various methods.
 

Code

Value

Description

_MPOS_SUCCESS

0

Success.

_MPOS_SUCCESS_ALREADY_OPEN

1000

Device is already open.

_MPOS_FAIL_INVALID_INTERFACE

1001

Interface setting is incorrect.

_MPOS_FAIL_NO_OPEN

1002

Failed to open the device.

_MPOS_FAIL_NOT_SUPPORT

1003

Not supported.

_MPOS_FAIL_INVALID_PARAMETER

1004

Invalid parameters.

_MPOS_FAIL_NO_RESPONSE

1005

No response.

_MPOS_FAIL_NO_DEVICE

1006

Device cannot be found.

_MPOS_FAIL_NO_FILE

1007

File cannot be found.

_MPOS_FAIL_BUSY

1008

Device is busy in processing other tasks.

_MPOS_FAIL

1009

Operation failed.­


2) Barcode/Image/Text Alignment

This is an attribute to define alignment of barcode/image/text, and the default value is set to _MPOS_ALIGNMENT_LEFT


* The following options are available for this value.

Code

Value

Description

_MPOS_ALIGNMENT_LEFT

-1

Align to Left

_MPOS_ALIGNMENT_CENTER

-2

Align to Center

_MPOS_ALIGNMENT_RIGHT

-3

Align to Right


3) Barcode Text Position

It sets the position to print barcode data.
 

* The following options are available.

Code

Value

Description

_MPOS_BARCODE_TEXT_NONE

0

Barcode data is not printed.

_MPOS_BARCODE_TEXT_ABOVE

1

Barcode data is printed above the barcode.

_MPOS_BARCODE_TEXT_BELOW

2

Barcode data is printed below the barcode.


4) Barcode Symbology

This attribute defines the barcode type.
 

* The following options are available.

Code

Value

Description

_MPOS_BARCODE_UPCA

101

UPC-A

_MPOS_BARCODE_UPCE

102

UPC-E

_MPOS_BARCODE_EAN8

103

EAN8

_MPOS_BARCODE_EAN13

104

EAN13

_MPOS_BARCODE_ITF

106

ITF

_MPOS_BARCODE_Codabar

107

Codabar

_MPOS_BARCODE_Code39

108

Code39

_MPOS_BARCODE_Code93

109

Code93

_MPOS_BARCODE_Code128

110

Code128


5) Text Size

This is an attribute to set the size of text, and the height and width can be set simultaneously using bitwise OR combination.
 

* The following options are available.


<Width Attribute>

Code

Value

Description

_MPOS_FONT_SIZE_WIDTH_0

0

Width magnification factor is set to X1.

_MPOS_FONT_SIZE_WIDTH_1

16

Width magnification factor is set to X2.

_MPOS_FONT_SIZE_WIDTH_2

32

Width magnification factor is set to X3.

_MPOS_FONT_SIZE_WIDTH_3

48

Width magnification factor is set to X4.

_MPOS_FONT_SIZE_WIDTH_4

64

Width magnification factor is set to X5.

_MPOS_FONT_SIZE_WIDTH_5

80

Width magnification factor is set to X6.

_MPOS_FONT_SIZE_WIDTH_6

96

Width magnification factor is set to X7.

_MPOS_FONT_SIZE_WIDTH_7

112

Width magnification factor is set to X8.


<Height Attribute>

Code

Value

Description

_MPOS_FONT_SIZE_HEIGHT_0

0

Height magnification factor is set to X1.

_MPOS_FONT_SIZE_HEIGHT_1

1

Height magnification factor is set to X2.

_MPOS_FONT_SIZE_HEIGHT_2

2

Height magnification factor is set to X3.

_MPOS_FONT_SIZE_HEIGHT_3

3

Height magnification factor is set to X4.

_MPOS_FONT_SIZE_HEIGHT_4

4

Height magnification factor is set to X5.

_MPOS_FONT_SIZE_HEIGHT_5

5

Height magnification factor is set to X6.

_MPOS_FONT_SIZE_HEIGHT_6

6

Height magnification factor is set to X7.

_MPOS_FONT_SIZE_HEIGHT_7

7

Height magnification factor is set to X8.


6) Device Type

This attribute defines the Custom Device type.
 

* The following options are available.

<Width Attribute>

Code

Value

Description

_MPOS_DEVICE_INVALID

-1

Fail

_MPOS_DEVICE_CONFIG

0

Default

_MPOS_DEVICE_LABEL_PRINTER

1

Label Printer

_MPOS_DEVICE_PRINTER_BIXOLON

10

Label Printer

_MPOS_DEVICE_HID

20

HID Input Device

_MPOS_DEVICE_MSR_BM10

30

MSR

_MPOS_DEVICE_SCANNER

40

Barcode Scanner

_MPOS_DEVICE_RFID

60

RFID.

_MPOS_DEVICE_DALLASKEY

70

DALLASKEY

_MPOS_DEVICE_NFC

80

NFC

_MPOS_DEVICE_KNOWN

100

Unregister USB Serial Device

_MPOS_DEVICE_DISPLAY_BCD1100

110

BCD

_MPOS_DEVICE_USB_TO_SERIAL

120

USB_to_Serial

_MPOS_DEVICE_CONFIG_LOOKUP

255

Lookup


7) LabelPrinter - Device Fonts

This attribute defines the Device Font.
 

typedef enum {

    _MPOS_LABEL_DEVICE_FONT_6PT                     ='0',

    _MPOS_LABEL_DEVICE_FONT_8PT                     ='1',

    _MPOS_LABEL_DEVICE_FONT_10PT                    ='2',

    _MPOS_LABEL_DEVICE_FONT_12PT                    ='3',

    _MPOS_LABEL_DEVICE_FONT_15PT                    ='4',

    _MPOS_LABEL_DEVICE_FONT_20PT                    ='5',

    _MPOS_LABEL_DEVICE_FONT_30PT                    ='6',

    _MPOS_LABEL_DEVICE_FONT_14PT                    ='7',

    _MPOS_LABEL_DEVICE_FONT_18PT                    ='8',

    _MPOS_LABEL_DEVICE_FONT_24PT                    ='9',

    _MPOS_LABEL_DEVICE_FONT_KOREAN1               ='a',

    _MPOS_LABEL_DEVICE_FONT_KOREAN2               ='b',

    _MPOS_LABEL_DEVICE_FONT_KOREAN3               ='c',

    _MPOS_LABEL_DEVICE_FONT_KOREAN4               ='d',

    _MPOS_LABEL_DEVICE_FONT_KOREAN5               ='e',

    _MPOS_LABEL_DEVICE_FONT_KOREAN6               ='f',

    _MPOS_LABEL_DEVICE_FONT_GB2312                 ='m',

    _MPOS_LABEL_DEVICE_FONT_BIG5                    ='n',

    _MPOS_LABEL_DEVICE_FONT_SHIFT_JIS               ='j',

 }_MPOS_LABEL_DEVICE_FONT;


* The following options are available.

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)  (ascii  9 X 15)

_MPOS_LABEL_DEVICE_FONT_KOREAN2

‘b’

24 X 24 (dots)  (ascii 12 X 24)

_MPOS_LABEL_DEVICE_FONT_KOREAN3

‘c’

20 X 20 (dots)  (ascii 12 X 20)

_MPOS_LABEL_DEVICE_FONT_KOREAN4

‘d’

26 X 26 (dots)  (ascii 16 X 30)

_MPOS_LABEL_DEVICE_FONT_KOREAN5

‘e’

20 X 26 (dots)  (ascii 16 X 30)

_MPOS_LABEL_DEVICE_FONT_KOREAN6

‘f’

38 X 38 (dots)  (ascii 22 X 34)

_MPOS_LABEL_DEVICE_FONT_GB2312

‘m’

24 X 24 (dots)  (ascii 12 X 24)

_MPOS_LABEL_DEVICE_FONT_BIG5

‘n’

24 X 24 (dots)  (ascii 12 X 24)

_MPOS_LABEL_DEVICE_FONT_SHIFT_JIS

‘j’

24 X 24 (dots)  (ascii 12 X 24)


8) LabelPrinter - Rotation Degrees

Rotation Degrees constants are used to set the rotation property of the printing.
 

typedef enum{

    _MPOS_LABEL_ROTATION_DEGREES_0                 = 0,

    _MPOS_LABEL_ROTATION_DEGREES_90                = 1,

    _MPOS_LABEL_ROTATION_DEGREES_180               = 2,

    _MPOS_LABEL_ROTATION_DEGREES_270               = 3,

}__MPOS_LABEL_ROTATION_DEGREES;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_ROTATION_DEGREES_0

0

No rotation

_MPOS_LABEL_ROTATION_DEGREES_90

1

90 degrees of rotation

_MPOS_LABEL_ROTATION_DEGREES_180

2

180 degrees of rotation

_MPOS_LABEL_ROTATION_DEGREES_270

3

270 degrees of rotation.


9) LabelPrinter - Barcode HRI

Barcode HRI (Human Readable Interpretation) constant is used to specify the position and font of HRI when printing barcodes that support HRI.
 

typedef enum{

    _MPOS_LABEL_BARCODE_HRI_NONE                       = 0,

    _MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE1          = 1,

    _MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE1          = 2,

    _MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE2          = 3,

    _MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE2          = 4,

    _MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE3          = 5,

    _MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE3          = 6,

    _MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE4          = 7,

    _MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE4          = 8,

}__MPOS_LABEL_BARCODE_HRI;
 

* The following options are available.

Code

Value

Description

_MPOS_LABEL_BARCODE_HRI_NONE

0

HRI is not used.

_MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE1

1

Position of HRI:

Below barcode Font Size: 1

_MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE1

2

Position of HRI:

Above barcode Font Size: 1

_MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE2

3

Position of HRI:

Below barcode Font Size: 2

_MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE2

4

Position of HRI:

Above barcode Font Size: 2

_MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE3

5

Position of HRI:

Below barcode Font Size: 3

_MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE3

6

Position of HRI:

Above barcode Font Size: 3

_MPOS_LABEL_BARCODE_HRI_BELOW_FONTSIZE4

7

Position of HRI:

Below barcode Font Size: 4

_MPOS_LABEL_BARCODE_HRI_ABOVE_FONTSIZE4

8

Position of HRI:

Above barcode Font Size: 4


[Discussion]

When a parameter is set to one of these constants, it may be replaced by a valid one and the changed one will be applied accordingly to actual operation.


10) LabelPrinter - 1D Barcode Types

This attribute for label printers defines the barcode options for this 1D barcode.
                              

typedef enum{

    _MPOS_LABEL_BARCODE_TYPE_CODE39                       = 0,

    _MPOS_LABEL_BARCODE_TYPE_CODE128                      = 1,

    _MPOS_LABEL_BARCODE_TYPE_I2Of5                           = 2,

    _MPOS_LABEL_BARCODE_TYPE_CODABAR                    = 3,

    _MPOS_LABEL_BARCODE_TYPE_CODE93                       = 4,

    _MPOS_LABEL_BARCODE_TYPE_UPC_A                        = 5,

    _MPOS_LABEL_BARCODE_TYPE_UPC_E                        = 6,

    _MPOS_LABEL_BARCODE_TYPE_EAN13                        = 7,

    _MPOS_LABEL_BARCODE_TYPE_EAN8                         = 8,

    _MPOS_LABEL_BARCODE_TYPE_EAN128                       = 9,

    _MPOS_LABEL_BARCODE_TYPE_CODE11                      = 10,

    _MPOS_LABEL_BARCODE_TYPE_PLANET                      = 11,

    _MPOS_LABEL_BARCODE_TYPE_INDUSTRIAL_2Of5            = 12,

    _MPOS_LABEL_BARCODE_TYPE_STANDARD_2Of5            = 13,

    _MPOS_LABEL_BARCODE_TYPE_LOGMARS                    = 14,

    _MPOS_LABEL_BARCODE_TYPE_UPC_EAN_EXTENSIONS     = 15,

    _MPOS_LABEL_BARCODE_TYPE_POSTNET                      = 16,

}__MPOS_LABEL_BARCODE_TYPE;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_BARCODE_TYPE_CODE39

0

Code39

_MPOS_LABEL_BARCODE_TYPE_CODE128

1

Code128

_MPOS_LABEL_BARCODE_TYPE_I2Of5

2

Interleaved 2of5

_MPOS_LABEL_BARCODE_TYPE_CODABAR

3

Codabar

_MPOS_LABEL_BARCODE_TYPE_CODE93

4

Code93

_MPOS_LABEL_BARCODE_TYPE_UPC_A

5

UPC-A

_MPOS_LABEL_BARCODE_TYPE_UPC_E

6

UPC-E

_MPOS_LABEL_BARCODE_TYPE_EAN13

7

EAN13

_MPOS_LABEL_BARCODE_TYPE_EAN8

8

EAN8

_MPOS_LABEL_BARCODE_TYPE_EAN128

9

UCC/EAN128

_MPOS_LABEL_BARCODE_TYPE_CODE11

10

Code11

_MPOS_LABEL_BARCODE_TYPE_PLANET

11

Planet

_MPOS_LABEL_BARCODE_TYPE_INDUSTRIAL_2Of5

12

Industrial 2of5

_MPOS_LABEL_BARCODE_TYPE_STANDARD_2Of5

13

Standard 2of5

_MPOS_LABEL_BARCODE_TYPE_LOGMARS

14

Logmars

_MPOS_LABEL_BARCODE_TYPE_UPC_EAN_EXTENSIONS

15

UPC/EAN Extensions

_MPOS_LABEL_BARCODE_TYPE_POSTNET

16

Postnet


11) LabelPrinter - MaxiCode Modes

This attribute defines the barcode options for MaxiCode.
                              

typedef enum{

    _MPOS_LABEL_MAXICODE_MODE_0                     = 0,

    _MPOS_LABEL_MAXICODE_MODE_2                     = 2,

    _MPOS_LABEL_MAXICODE_MODE_3                     = 3,

    _MPOS_LABEL_MAXICODE_MODE_4                     = 4,

}__MPOS_LABEL_MAXICODE_MODE;
                                                                

* The following options are available.

Code

Value

Description

_MPOS_LABEL_MAXICODE_MODE_0

0

MaxiCode Mode 0

_MPOS_LABEL_MAXICODE_MODE_2

2

MaxiCode Mode 2

_MPOS_LABEL_MAXICODE_MODE_3

3

MaxiCode Mode 3

_MPOS_LABEL_MAXICODE_MODE_4

4

MaxiCode Mode 4


12) LabelPrinter - Barcode Origin Point

Barcode Origin Point constants are used to set the reference origin position of barcode.
 

typedef enum{

    _MPOS_LABEL_BARCODE_ORIGIN_POINT_CENTER       = 0,

    _MPOS_LABEL_BARCODE_ORIGIN_POINT_UpperLeft      = 1,

}__MPOS_LABEL_BARCODE_ORIGIN_POINT;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_BARCODE_ORIGIN_POINT_CENTER

0

Set the reference point of the barcode to the center.

_MPOS_LABEL_BARCODE_ORIGIN_POINT_UpperLeft

1

Set the reference point of the barcode in the upper left corner.


13) LabelPrinter - QRCode Model

This attribute defines the barcode options for QR code.
 

typedef enum{

    _MPOS_LABEL_QRCODE_MODEL_1                     = 1,

    _MPOS_LABEL_QRCODE_MODEL_2                     = 2,

}__MPOS_LABEL_QRCODE_MODE;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_QRCODE_MODEL_1

1

QR Model 1

_MPOS_LABEL_QRCODE_MODEL_2

2

QR Model 2


14) LabelPrinter - Code 49 Starting Mode

This attribute defines the Starting Mode for Code49.
 

typedef enum{

    _MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMERIC            = 0,

    _MPOS_LABEL_STARTINGMODE_MULTIPLE_READ_ALPHANUMERIC     = 1,

    _MPOS_LABEL_STARTINGMODE_REGULAR_NUMERIC                     = 2,

    _MPOS_LABEL_STARTINGMODE_GROUP_ALPHANUMERIC               = 3,

    _MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMRIC_SHIFT1     = 4,

    _MPOS_LABEL_STARTINGMODE_REGULAR_ALPHANUMRIC_SHIFT2     = 5,

    _MPOS_LABEL_STARTINGMODE_AUTOMATIC                                 = 7,

}__MPOS_LABEL_STARTING_MODE;


* The following options are available.

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


15) LabelPrinter - Codablock Mode

This attribute defines the barcode options for Coda block.


typedef enum{

    _MPOS_LABEL_CODABLACK_MODE_A                   = 'A',

    _MPOS_LABEL_CODABLACK_MODE_E                   = 'E',

    _MPOS_LABEL_CODABLACK_MODE_F                   = 'F',

}__MPOS_LABEL_CODABLACK_MODE;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_CODABLACK_MODE_A

‘A’

Code 39 character set is used.

_MPOS_LABEL_CODABLACK_MODE_E

‘E’

Code 128 character set is used.

_MPOS_LABEL_CODABLACK_MODE_F

‘F’

Code 128 character set is used.

Function 1 is added automatically.


16) LabelPrinter - Check Digit Option

These constants are used to set the Check Digit property when printing MSI.
 

typedef enum{

    _MPOS_LABEL_CHECKDIGIT_NONE                    = 0,

    _MPOS_LABEL_CHECKDIGIT_1MOD10                  = 1,

    _MPOS_LABEL_CHECKDIGIT_2MOD10                  = 2,

    _MPOS_LABEL_CHECKDIGIT_1MOD11_AND_1MOD_10   = 3,

}_MPOS_LABEL_CHECKDIGIT;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_CHECKDIGIT_NONE

0

No Check Digit

_MPOS_LABEL_CHECKDIGIT_1MOD10

1

Check Digit 1 Mod 10

_MPOS_LABEL_CHECKDIGIT_2MOD10

2

Check Digit 2 Mod 10

_MPOS_LABEL_CHECKDIGIT_1MOD11_AND_1MOD_10

3

Check Digit 1 Mod 11

and 1 Mod 10


17) LabelPrinter - RSS Barcode Type

This attribute defines the barcode type for RSS.
 

typedef enum{

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS14                                             = 0,

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_TRUNCATED                            = 1,

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_STACKED                                = 2,

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS14_STACKED_OMNIDIRECTIONAL             = 3,

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS_LIMITED                                      = 4,

    _MPOS_LABEL_RSS_BARCODE_TYPE_RSS_EXPANDED                                = 5,

    _MPOS_LABEL_RSS_BARCODE_TYPE_UPC_A                                            = 6,

    _MPOS_LABEL_RSS_BARCODE_TYPE_UPC_E                                            = 7,

    _MPOS_LABEL_RSS_BARCODE_TYPE_EAN13                                             = 8,

    _MPOS_LABEL_RSS_BARCODE_TYPE_EAN8                                              = 9,

    _MPOS_LABEL_RSS_BARCODE_TYPE_UCC_EAN128_CC_A_B            = 10,

    _MPOS_LABEL_RSS_BARCODE_TYPE_UCC_EAN128_CC_C                 = 11,

}__MPOS_LABEL_RSS_BARCODE_TYPE;


* The following options are available.

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


18) LabelPrinter - Vector Fonts

This attribute defines the Vector Font.
 

typedef enum {

    _MPOS_LABEL_VECTOR_FONT_ASCII                    ='U',

    _MPOS_LABEL_VECTOR_FONT_KS5601                              ='K',

    _MPOS_LABEL_VECTOR_FONT_BIG5                   ='B',

    _MPOS_LABEL_VECTOR_FONT_GB2312                              ='G',

    _MPOS_LABEL_VECTOR_FONT_SHIFT_JIS              ='J',

    _MPOS_LABEL_VECTOR_FONT_OCR_A                  ='a',

    _MPOS_LABEL_VECTOR_FONT_OCR_B                  ='b',

}_MPOS_LABEL_VECTOR_FONT;


* The following options are available.

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’

BIG5 (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)


19) LabelPrinter - Draw Block Options

This is the Draw Block Option.
 

typedef enum {

    _MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_OVERWRITING     ='O',

    _MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_EXCLUSIVE_OR   ='E',

    _MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_DELETE             ='D',

    _MPOS_LABEL_DRAW_BLOCK_OPTION_SLOPE                    ='S',

    _MPOS_LABEL_DRAW_BLOCK_OPTION_BOX                       ='B',

}_MPOS_LABEL_DRAW_BLOCK_OPTION;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_OVERWRITING

‘O’

Line Overwriting

_MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_EXCLUSIVE_OR

‘E’

Line Exclusive OR

_MPOS_LABEL_DRAW_BLOCK_OPTION_LINE_DELETE

‘D’

Line Delete

_MPOS_LABEL_DRAW_BLOCK_OPTION_SLOPE

‘S’

Slope(a oblique line)

_MPOS_LABEL_DRAW_BLOCK_OPTION_BOX

‘B’

Box


20) LabelPrinter - Draw Circle Sizes

This attribute defines the size for DrawCircle Method.
 

typedef enum {

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_40X40             = 1, // 5(mm) diameter

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_56X56             = 2,

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_72X72             = 3,

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_88X88             = 4,

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_104X104           = 5,

    _MPOS_LABEL_DRAW_CIRCLE_SIZE_168X168           = 6,

}_MPOS_LABEL_DRAW_CIRCLE_SIZE;
 

* The following options are available.

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


21) LabelPrinter -  International Character Set

This attribute defines International Character Set.


typedef enum {

    _MPOS_LABEL_CONFIG_ICS_USA                         = 0,

    _MPOS_LABEL_CONFIG_ICS_FRANCE                   = 1,

    _MPOS_LABEL_CONFIG_ICS_GERMANY                = 2,

    _MPOS_LABEL_CONFIG_ICS_UK                           = 3,

    _MPOS_LABEL_CONFIG_ICS_DENMARK_I                = 4,

    _MPOS_LABEL_CONFIG_ICS_SWEDEN                 = 5,

    _MPOS_LABEL_CONFIG_ICS_ITALY                         = 6,

    _MPOS_LABEL_CONFIG_ICS_SPAIN_I                      = 7,

    _MPOS_LABEL_CONFIG_ICS_NORWAY                   = 8,

    _MPOS_LABEL_CONFIG_ICS_DENMARK_II                = 9,

    _MPOS_LABEL_CONFIG_ICS_JAPAN                      = 10,

    _MPOS_LABEL_CONFIG_ICS_SPAIN_II                      = 11,

    _MPOS_LABEL_CONFIG_ICS_LATIN_AMERICA            = 12,

    _MPOS_LABEL_CONFIG_ICS_KOREA                     = 13,

    _MPOS_LABEL_CONFIG_ICS_SLOVENIA_CROATIA                    = 14,

    _MPOS_LABEL_CONFIG_ICS_CHINA                       = 15,

}_MPOS_LABEL_CONFIG_ICS;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_CONFIG_ICS_USA

0

U.S.A

_MPOS_LABEL_CONFIG_ICS_FRANCE

1

France

_MPOS_LABEL_CONFIG_ICS_GERMANY

2

Germany

_MPOS_LABEL_CONFIG_ICS_UK

3

U.K

_MPOS_LABEL_CONFIG_ICS_DENMARK_I

4

Denmark I

_MPOS_LABEL_CONFIG_ICS_SWEDEN

5

Sweden

_MPOS_LABEL_CONFIG_ICS_ITALY

6

Italy

_MPOS_LABEL_CONFIG_ICS_SPAIN_I

7

Spain I

_MPOS_LABEL_CONFIG_ICS_NORWAY

8

Norway

_MPOS_LABEL_CONFIG_ICS_DENMARK_II

9

Denmark II

_MPOS_LABEL_CONFIG_ICS_JAPAN

10

Japan

_MPOS_LABEL_CONFIG_ICS_SPAIN_II

11

Spain II

_MPOS_LABEL_CONFIG_ICS_LATIN_AMERICA

12

Latin America

_MPOS_LABEL_CONFIG_ICS_KOREA

13

Korea

_MPOS_LABEL_CONFIG_ICS_SLOVENIA_CROATIA

14

Slovenia/Croatia

_MPOS_LABEL_CONFIG_ICS_CHINA

15

China


22) LabelPrinter - Error Correction Level

Error Correction Level constants are used to set the level of error correction for possible corruption of barcode. ore corruption can be corrected with a higher level of correction but the length of the allowed data may be reduced with a higher level of correction.
 

typedef enum{

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL0           = 0,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL1           = 1,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL2           = 2,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL3           = 3,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL4           = 4,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL5           = 5,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL6           = 6,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL7           = 7,

    _MPOS_LABEL_ERROR_CORRECTION_LEVEL8           = 8,

}__MPOS_LABEL_ERROR_CORRECTION_LEVEL


* The following options are available.

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


23) LabelPrinter - Data Compression Method

This attribute defines data compression.
 

typedef enum{

    _MPOS_LABEL_DATA_COMPRESSION_METHOD_TEXT            = 0,

    _MPOS_LABEL_DATA_COMPRESSION_METHOD_NUMERIC      = 1,

    _MPOS_LABEL_DATA_COMPRESSION_METHOD_BINARY         = 2,

}__MPOS_LABEL_DATA_COMPRESSION_METHOD;


* The following options are available.

Code

Value

Description

_MPOS_LABEL_DATA_COMPRESSION_METHOD_TEXT

0

2char / codeword

_MPOS_LABEL_DATA_COMPRESSION_METHOD_NUMERIC

1

2.93 char / codeword

_MPOS_LABEL_DATA_COMPRESSION_METHOD_BINARY

2

1.2bytes / codeword


24) Command Mode

These are data communication properties.
 

typedef enum{

    _MPOS_COMMAND_MODE_DEFAULT                   = 0,

    _MPOS_COMMAND_MODE_BYPASS                    = 1,

}__MPOS_COMMAND_MODE;


* The following options are available.

Code

Value

Description

_MPOS_COMMAND_MODE_DEFAULT

0

When the device is connected to iDevice via mPOS Thermal Printr

_MPOS_COMMAND_MODE_BYPASS

1

When the device is connected directly to the iDevice.


2 List of Supported Methods

ClassName

Method

Support

BGATELookup

initWithTimeout:timeout:retry:

O

refreshWifiDevicesList

O

refreshEthernetDevicesList

O

refreshBluetoothDevicesList

O

getWifiDevicesList

O

getEthernetDevicesList

O

getBluetoothDevicesList

O

MPosControllerConfig

getCustomDeviceList

O

addCustomDevice

O

deleteCustomDevice

O

reInitCustomDeviceType

O

listUsbID

O

findDevID

O

getSerialConfiguration

O

setSerialConfiguration

O

MPosControllerLabelPrinter

setCurrentEncoding

O

checkPrinterStatus

O

printBuffer

O

printRawData

O

drawTextDeviceFont

O

drawTextVectorFont

O

drawBarcode1D

O

drawBarcodeMaxiCode

O

drawBarcodePDF417

O

drawBarcodeQRCode

O

drawBarcodeDataMatrix

O

drawBarcodeAztec

O

drawBarcodeCode49

O

drawBarcodeCodaBlock

O

drawBarcodeMicroPDF

O

drawBarcodeIMB

O

drawBarcodeMSI

O

drawBarcodePlessey

O

drawBarcodeRSS

O

drawBarcodeGS1DataBar

O

drawBlock

O

drawCircle

O

drawImage

O

setPrintingType

O

setMargin

O

setBackFeedOption

O

setLength

O

setWidth

O

setBufferMode

O

setSpeed

O

setDensity

O

setOperation

O

setOffset

O

setCuttingPosition

O

setAutoCutter

O

getModelName

O

getFirmwareVersion

O

MPosControllerDevices

selectInterface:address:

O

getCurrentDeviceID

O

openService

O

openService:

O

closeService

O

isOpen

O

selectForConvertHIDInputDeviceTo:

O

selectCommandMode:

O

MPosControllerPrinter

refreshPrinterName

O

refreshFwVersion

O

linefeed:

O

formFeed

O

paperFeed:

O

cutPaper

O

printText:

O

printText: fontAttributes:

O

printBarcode:

symbology:

height:

width:

alignment:

textPosition:

O

printBitmapWithPath:

width:

level:

O

printBitmapWithImage:

width:

level:

O

setPageArea:

starting:

width:

height:

O

setLeftPosition:

O

setVerticalPosition:

O

printDataInPageMode:

O

MPosControllerBCD

writeStringToUpperLine:

O

writeStringToLowerLine:

O

clearScreen

O

displayString:

O

storeImage:width:imageNumber:

O

displayImage:xPos:yPos

O

clearImage:imageNumber:

O

MPosControllerTTYUSB

dataWrite:

X