BIXOLON SRP-F310 Reference Manual

BIXOLON SRP-F310 Reference Manual

Pos printer ios sdk api reference guide
Hide thumbs Also See for SRP-F310:
Table of Contents

Advertisement

iOS SDK API Reference Guide
POS Printer
SRP-F310 / SRP-F312
Rev. 2.00
SRP-350plus / SRP-352plus
SRP-350plusII / SRP-352plusII
SRP-350II / SRP-350IIOBE
SRP-350III / SRP-352III
SRP-275 / SRP-275II
http://www.bixolon.com

Advertisement

Table of Contents
loading

Summary of Contents for BIXOLON SRP-F310

  • Page 1 SDK API Reference Guide POS Printer SRP-F310 / SRP-F312 Rev. 2.00 SRP-350plus / SRP-352plus SRP-350plusII / SRP-352plusII SRP-350II / SRP-350IIOBE SRP-350III / SRP-352III SRP-275 / SRP-275II http://www.bixolon.com...
  • Page 2: Table Of Contents

    POS Printer ■ Table of Contents 1. Manual Information ............................4 1-1 Supported Platform & Development Environment ................... 4 1-2 Supported Platform & Supported Devices ....................4 1-3 Supported Properties List ........................4 1-4 Supported Properties List ........................5 2. Constant Definition ............................6 2-1 Character Set ............................
  • Page 3 POS Printer 5-3 Instance Methods ........................... 21 5-3-1 getInstance ..........................21 5-3-2 open ............................21 5-3-3 close ............................22 5-3-4 lookup ............................22 5-3-5 selectTarget..........................22 5-3-6 connect ............................ 23 5-3-7 disconnect ..........................23 5-3-8 enableLSB ..........................23 5-3-9 printText ........................... 24 5-3-10 printBox ..........................
  • Page 4: Manual Information

    This SDK manual contains the descriptions of the Library required for the applications program development. BIXOLON makes continuous improvements for better functions and quality of its products, and the specifications of the product and contents of the manual are subject to change without prior notice because of this reason.
  • Page 5: Supported Properties List

    POS Printer 1-4 Supported Properties List Method/Property POS Printer getInstance open close lookup selectTarget connect disconnect enableLSB printText printBox lineFeed nextPrintPos printBarcode printBitmap checkPrinter msrReadReady msrReadCancel msrReadTrack msrGetTrack msrReadFullTrack directIO icON icOFF icApdu icGetStatus nvImageList downloadNVImage (Diffusion) downloadNVImage (Normal) printNVImage removeNVImage removeAllNVImages openDrawer...
  • Page 6: Constant Definition

    POS Printer 2. Constant Definition Constants used in the provided SDK are defined in the “BXCode.h” file. 2-1 Character Set This defines the code page and the default value is set to BXL_CS_437. Available Code Pages are as follows. Code Value Description BXL_CS_PC437...
  • Page 7: International Character Set

    POS Printer 2-2 International Character Set This defines the international character set and the default value is set to BXL_ICS_USA. Available International Character Sets are as follows. Code Value Description BXL_ICS_USA U.S.A. BXL_ICS_FRANCE France BXL_ICS_GERMANY Germany BXL_ICS_UK U.K. Denmark I BXL_ICS_DENMARK1 BXL_ICS_SWEDEN Sweden...
  • Page 8: Text Attribute

    POS Printer Code Value Description BXL_TS_0HEIGHT Set the ratio of vertical height to X1 BXL_TS_1HEIGHT Set the ratio of vertical height to X2 BXL_TS_2HEIGHT Set the ratio of vertical height to X3 BXL_TS_3HEIGHT Set the ratio of vertical height to X4 BXL_TS_4HEIGHT Set the ratio of vertical height to X5 BXL_TS_5HEIGHT...
  • Page 9: Bar Code Symbology

    POS Printer 2-7 Bar Code Symbology This defines the bar code type. Available settings are as follows. Code Value Number of data Range of data BXL_BCS_UPCA 11 <= n <= 12 48 <= data <= 57 BXL_BCS_UPCE 11 <= n <= 12 48 <= data <= 57 BXL_BCS_EAN13 12 <= n <= 13...
  • Page 10: Power

    POS Printer 2-9 Power This indicates the remaining battery capacity of the printer. It is read only and a change of battery status is automatically shown. Support Device : Only Mobile printer, POS Printer is not support. The remaining battery capacity status values are as follows. Code Value Description...
  • Page 11: Drawer Kick-Out Connector Pin 2

    0x23500003 SRP-350III BXL_MODEL_ID_SRP352III 0x23520003 SRP-352III BXL_MODEL_ID_SRP275 0x32750000 SRP-275, SRP-275II BXL_MODEL_ID_SRPF310 0x93100000 SRP-F310 BXL_MODEL_ID_SRPF312 0x93120000 SRP-F312 2-15 Connection Class When the method named 'didFindPrinter' is called, This value is updated to connectionClass in BXPrinter class Refer to 6-2-3 didFindPrinter Code Value...
  • Page 12: Result Code

    POS Printer 2-16 Result Code Code DEFINE Value Description BXL_SUCCESS Success BXL_NOT_CONNECTED Printer is not connected BXL_NOT_OPENED SDK is not open BXL_STATUS_ERROR Error in status check BXL_CONNECT_ERROR Connection failure BXL_NOT_SUPPORT Not supported BXL_BAD_ARGUMENT Wrong function arguments BXL_BUFFER_ERROR Error in MSR buffer BXL_NOT_CONNECTED Printer is not connected Error while converting image file to...
  • Page 13 POS Printer Code DEFINE Value Description Successful execution of IC module 10A6H and RESYNCH 10A7H PPS error IC module has already been set to IC CARD 10A8H mode 10B0H PC link command is not supported The card has just sent an invalid “Procedure 10E4H byte”...
  • Page 14: Bxbarcode Class Reference

    POS Printer 3. BXBarcode Class Reference Inherits from NSObject Confirms to Framework BXPrinter.a [Availability] iOS 4.3 and later Declared BXBarcodeInfo.h 3-1 Overview BXBarcode class is an object that contains information about which barcode types are supported for each printer to control. 3-2 Properties 3-2-1 barNumber Barcode Define Number...
  • Page 15: Bxprinter Class Reference

    POS Printer 4. BXPrinter Class Reference Inherits from NSObject Confirms to Framework BXPrinter.a [Availability] iOS 4.3 and later Declared BXPrinterObject.h 4-1 Overview BXPrinter Class contains the information of control target printer (name / network address / port). 4-2 Properties 4-2-1 name Printer name @property(readonly) NSString * name...
  • Page 16: Modelstr

    POS Printer 4-2-4 modelStr Model name of printer Name is provided by the firmware, and it is _SRP-350II in case of SRP-350II printer. @property(readwrite) NSString * modelStr [Discussion] This value is updated by the checkPrinter method of BXPrinterController. [Availability] SDK 0.8.0 and later 4-2-5 versionStr Firmware version of printer Version name is provided by firmware, and it is in the form of _V01.00 STOB 040711.
  • Page 17: Bxprintercontroller Class Reference

    POS Printer 5. BXPrinterController Class Reference Inherits from NSObject Confirms to Framework BXPrinter.a [Availability] iOS 4.3 and later Declared BXPrinter.h 5-1 Overview BXPrinterController Class is the main object for printer control. 5-2 Properties 5-2-1 version SDK version @property(readonly) NSString * version [Discussion] It is a string in the form of “1.0.0”...
  • Page 18: Lookupduration

    POS Printer 5-2-4 lookupDuration Printer lookup time (unit: second) @property(readwrite) CGFloat lookupDuration [Discussion] It could be a fractional number such as 0.5. [Availability] SDK 0.6.0 and later 5-2-5 lookupCount Number of repeat on signal transmission for printer search @property(readwrite) unsigned lookupCount [Discussion] Default value is set to 1.
  • Page 19: Textsize

    POS Printer 5-2-8 textSize Size of the printed text @property(readwrite) int textSize [Discussion] Refer to 2-4 Text Size [Availability] SDK 0.6.0 and later 5-2-9 characterSet Defines the code page of printer @property(readwrite) CGFloat lookupDuration [Discussion] Refer to 2-1 Character Set Default value is set to BXL_CS_437.
  • Page 20: State

    POS Printer 5-2-12 state Printer state code This value is updated when checkPrinter method of BXPrinterController is called. @property(readonly) long state [Discussion] Refer to 2-10 State [Availability] SDK 0.6.0 and later 5-2-13 power @property(readonly) long state [Discussion] Refer to 2-9 Power [Availability] SDK 0.6.0 and later 5-2-14 AutoConnection...
  • Page 21: Draweropenlevel

    POS Printer 5-2-16 drawerOpenLevel @property(assign) int drawerOpenLevel [Discussion] Refer to 2-13 Drawer open level [Availability] SDK 3.0.1 and later 5-3 Instance Methods 5-3-1 getInstance Method to obtain the BXPrinterController class instance [Function prototype] - (BXPrinterController)getInstance [Return Value] BXPrinterController class is created and returned automatically when this method is called first time, and the existing BXPrinterController class is returned from the next time.
  • Page 22: Close

    POS Printer 5-3-3 close Resources are de-allocated for stopping or terminating the use of BXPrinterController class. [Discussion] - It should be called before calling main delegate of applications like (void)applicationWillResignActive:(UIApplication *) application. When close method is not called and applications using BXPrinterController are running in the background, simultaneous use of BXPrinterController by other applications could be restricted.
  • Page 23: Connect

    POS Printer 5-3-6 connect Connect to target printer. [Function prototype] - (BOOL)connect [Discussion] This method not works when AutoConnection is setting in BXL_CONNECTIONMODE_AUTO(default, == 0) Target of BXPrininterController property should be set in advance. [Availability] SDK 2.0.2 and later 5-3-7 disconnect Disconnect to connected printer.
  • Page 24: Printtext

    POS Printer 5-3-9 printText Print text. No operation takes place when there is no connected printer. [Function prototype] - (long)printText:(NSString *)string [Parameters] string Unicode data with null terminator. Print target text string [Return Value] Refer to 2-16 Result Code [Discussion] Tex alignment property should be set in advance.
  • Page 25: Linefeed

    POS Printer 5-3-11 lineFeed Perform line feed [Function prototype] - (void)linefeed:(int)lines [Parameters] lines Number of lines to advance [Return Value] Refer to 2-16 Result Code [Availability] SDK 0.6.0 and later 5-3-12 nextPrintPos Feed the paper to the beginning of the next label paper. [Function prototype] - (long)nextPrintPos [Return Value]...
  • Page 26: Printbarcode

    POS Printer 5-3-13 printBarcode Print one-dimensional and two-dimensional bar code. [Function prototype] - (long)printBarcode:(char *)data symbology:(long)symbology width:(long)width height:(long)height alignment:(long)alignment textPosition:(long)textPosition [Parameters] data ANSI code data with null terminator. Transfer bar code data to print symbology Define bar code type. height Height of bar code, unit is number of dot, range is 1~255 This setting does not affect 2-dimensional bar code.
  • Page 27: Printbitmap

    POS Printer 5-3-14 printBitmap Print image file [Function prototype] - (long)printBitmap:(NSString *)path width:(long)width alignment:(long)alignment level:(long)level [Parameters] path Path of image file width Width of image file to convert, valid setting range is 0 ~ max width Image is resized with the given condition when the value is less than 0 Refer to 2-8 Image Width alignment Image alignment setting...
  • Page 28: Msrreadready

    POS Printer 5-3-16 msrReadReady Switch the printer to MSR Ready state. Printing is not allowed in Ready state. Support Device : Only Mobile printer, POS Printer is not support. [Function prototype] - (long)msrReadReady [Return Value] Refer to 2-16 Result Code [Availability] SDK 0.6.0 and later 5-3-17 msrReadCancel...
  • Page 29: Msrgettrack

    POS Printer [Availability] SDK 0.6.0 and later 5-3-19 msrGetTrack Read MSR data. It is MSR read mode. If BXLMSR_DATAEMPTY is returned, card is not read in MSR. Scan the card with MSR again or use the msrReadCancel method to cancel the read mode.
  • Page 30: Directio

    POS Printer 5-3-21 directIO Send or read user defined data. [Function prototype] - (long)directIO:(NSData *)request response:(NSData **)response [Parameters] request Data to be sent to printer, ANSI CODE data response response sent from printer is returned [Return Value] Refer to 2-16 Result Code [Availability] SDK 0.6.0 and later 5-3-22 icON...
  • Page 31: Icapdu

    POS Printer 5-3-24 icApdu Send APDU command and get response. It works only when the power is applied to the printer smart card. Support Device : Only Mobile printer, POS Printer is not support. [Function prototype] - (long)icApdu:(NSData **)request response:(NSData **)response [Parameters] request APDU command data to send to printer, ANSI CODE data...
  • Page 32: Nvimagelist

    POS Printer 5-3-26 nvImageList Read the list of image addresses saved in NV area. [Function prototype] - (long)nvImageList:(NSArray **)images [Parameters] images Address list is provided. Each address is saved in the form of NSNumber *. The images are provided in the form of autorelease, and developers do not have to release it explicitly.
  • Page 33: Downloadnvimage (Diffusion)

    POS Printer 5-3-27 downloadNVImage (Diffusion) Download the image data corresponding to the address saved in the NV area. [Function prototype] - (long)downloadNVImage:(int)address withImage:(UIImage *)image width:(long)width level:(long)level [Parameters] address Image address in the range of 0 ~ 99. If there is an image saved for the corresponding address, the existing image is replaced by the new image.
  • Page 34: Downloadnvimage (Normal)

    POS Printer 5-3-28 downloadNVImage (Normal) Download the image data to the designated address in NV area. [Function prototype] - (long)downloadNVImage:(int)address withImage:(UIImage *)image [Parameters] address Image address in the range of 0 ~ 99. If there is an image saved for the corresponding address, the existing image is replaced by a new image.
  • Page 35: Removenvimage

    POS Printer 5-3-30 removeNVImage Delete image data from the designated address in NV area. [Function prototype] - (long)removeNVImage:(int)address [Parameters] address Image address in the range of 0 ~ 99 [Return Value] Refer to 2-16 Result Code [Discussion] No action takes place if image does not exist in the corresponding address [Availability] SDK 1.0.0 and later 5-3-31 removeAllNVImages...
  • Page 36: Issupport_Msr

    POS Printer 5-3-33 isSupport_MSR Check whether a specific feature of the MSR is supported. [Function prototype] - (BOOL)isSupport_MSR [Return Value] If the feature of the MSR is supported, return TRUE. [Availability] SDK 3.0.0 and later 5-3-34 isSupport_IC Check whether a specific feature of the IC is supported. [Function prototype] - (BOOL)isSupport_IC [Return Value]...
  • Page 37: Issupport_Lsb

    POS Printer 5-3-37 isSupport_LSB Check whether a specific feature of the LSB is supported. [Function prototype] - (BOOL)isSupport_MSR [Return Value] If the feature of the LSB is supported, return TRUE. [Availability] SDK 3.0.0 and later 5-3-38 getBarcodeSupportTable Check that the barcode print function is supported. [Function prototype] - (NSMutableArray*)getBarcodeSupportTable [Return Value]...
  • Page 38: Bxprintercontrollerdelegate Protocol Reference

    POS Printer 6. BXPrinterControllerDelegate Protocol Reference Inherits from NSObject Confirms to Framework BXPrinter.a [Availability] iOS 4.3 and later Declared BXPrinteControlDelegater.h 6-1 Overview This receives events occurring in the BXPrinterController class. 6-2 Instance Methods 6-2-1 didStart It is called when class starts to be used using open method of BXPrinterController. It is called after printer connection is completed.
  • Page 39: Didfindprinter

    POS Printer 6-2-3 didFindPrinter This method is called for each individual printer when a printer is discovered from the same network. [Function prototype] - (void)didFindPrinter:(BXPrinterController *)controller printer:(BXPrinter *)printer [Parameters] controller BXPrinterController object that generates events printer Information of discovered printer [Discussion] If same printer responds multiple time during the printer lookup process, this method is called only once the first time.
  • Page 40: Willlookupprinters

    POS Printer 6-2-6 willLookupPrinters This method is called before starting printer search. [Function prototype] - (void)willLookupPrinters:(BXPrinterController *)controller [Parameters] controller BXPrinterController object that generates events [Discussion] This can be used to indicate the start of printer search. [Availability] SDK 0.6.0 and later 6-2-7 didLookupPrinters This method is called when printer search is completed.
  • Page 41: Didbebrokenconnection

    POS Printer 6-2-9 didBeBrokenConnection This method is called when the connection to printer is broken. [Function prototype] - (void)didBeBrokenConnection:(BXPrinterController *)controller withError:(NSError *)error [Parameters] controller BXPrinterController object that generates events error Information of cause of failure [Discussion] This is not called when user breaks the connection by calling the close method of BXPrinterController explicitly.
  • Page 42: Didupdatestatus

    POS Printer 6-2-11 didUpdateStatus This method is called when printer status variable has changed. [Function prototype] - (void)didUpdateStatus:(BXPrinterController *)controller Status(NSNumber*) status [Parameters] controller BXPrinterController object that generates events status printer status. [Availability] SDK 3.0.0 and later Rev. 2.00 - 42 -...

Table of Contents