//
//  ErrorCode.h
//  POSSDK
//
//  Created by duyuzhen on 13-6-26.
//  Copyright (c) 2013 __MyCompanyName__. All rights reserved.
//

#ifndef POSSDK_ErrorCode_h
#define POSSDK_ErrorCode_h

#define OPPOSITE_NUMBER(x)	((x) * -1)


#define SUCCESS												OPPOSITE_NUMBER(0x0001)
#define	ERR_INVALID_ARGUMENT								OPPOSITE_NUMBER(0x0002)
#define ERR_INVALID_DATA									OPPOSITE_NUMBER(0x0003)


#define	ERR_INVALID_CONNECTION								OPPOSITE_NUMBER(0x0010)
#define ERR_CREATE_CONNECTION								OPPOSITE_NUMBER(0x0011)
#define ERR_COMMUNICATE										OPPOSITE_NUMBER(0x0012)
#define ERR_ALLOC_MEMORY									OPPOSITE_NUMBER(0x0013)
#define ERR_BLUETOOTH_STATE_POWER_OFF						OPPOSITE_NUMBER(0x0014)


#define ERR_SYSTEM_RESET                                    OPPOSITE_NUMBER(0x0020)
#define ERR_SYSTEM_SELECT_PRINT_MODE                        OPPOSITE_NUMBER(0x0021)
#define ERR_SYSTEM_SELECT_PAPER_TYPE                        OPPOSITE_NUMBER(0x0022)
#define ERR_SYSTEM_SET_MOTION_UNIT                          OPPOSITE_NUMBER(0x0023)
#define ERR_SYSTEM_QUERY_STATUS                             OPPOSITE_NUMBER(0x0024)
#define ERR_SYSTEM_FEED_LINE                                OPPOSITE_NUMBER(0x0025)
#define ERR_SYSTEM_CUT_PAPER                                OPPOSITE_NUMBER(0x0026)


#define ERR_CASH_DRAWER_OPEN                                OPPOSITE_NUMBER(0x0031)


#define ERR_TEXT_SELECT_CHAR_SET                            OPPOSITE_NUMBER(0x0040)
#define ERR_TEXT_SELECT_CODE_PAGE                           OPPOSITE_NUMBER(0x0041)
#define ERR_TEXT_SET_LINE_HEIGHT                            OPPOSITE_NUMBER(0x0042)
#define ERR_TEXT_SET_CHARACTER_SPACE                        OPPOSITE_NUMBER(0x0043)
#define ERR_TEXT_STANDARD_MODE_ALIGNMENT                    OPPOSITE_NUMBER(0x0044)
#define ERR_TEXT_SELECT_FONT_TYPE                           OPPOSITE_NUMBER(0x0045)
#define ERR_TEXT_SET_FONT_STYLE_REVERSE                     OPPOSITE_NUMBER(0x0046)
#define ERR_TEXT_SET_FONT_STYLE_BOLD                        OPPOSITE_NUMBER(0x0047)
#define ERR_TEXT_SET_FONT_STYLE_UNDERLINE                   OPPOSITE_NUMBER(0x0048)
#define ERR_TEXT_STANDARD_MODE_UPSIDEDOWN                   OPPOSITE_NUMBER(0x0049)
#define ERR_TEXT_SELECT_MAGNIFY_TIMES                       OPPOSITE_NUMBER(0x004a)
#define ERR_TEXT_STANDARD_MODE_ROTATE                       OPPOSITE_NUMBER(0x004b)
#define ERR_TEXT_ENTER_QUIT_COLOR_PRINT                     OPPOSITE_NUMBER(0x004c)
#define ERR_TEXT_SET_COLOR_PRINT                            OPPOSITE_NUMBER(0x004d)
#define ERR_TEXT_FONT_USER_DEFINED_ENABLE                   OPPOSITE_NUMBER(0x004e)
#define ERR_TEXT_FONT_USER_DEFINED                          OPPOSITE_NUMBER(0x004f)
#define ERR_TEXT_FONT_USER_DEFINED_CANCEL                   OPPOSITE_NUMBER(0x0050)
#define ERR_TEXT_PRINT                                      OPPOSITE_NUMBER(0x0051)


#define ERR_IMAGE_DOWNLOAD_AND_PRINT                        OPPOSITE_NUMBER(0x0061)
#define ERR_IMAGE_DOWNLOAD_RAM                              OPPOSITE_NUMBER(0x0062)
#define ERR_IMAGE_RAM_PRINT                                 OPPOSITE_NUMBER(0x0063)
#define ERR_IMAGE_DOWNLOAD_FLASH                            OPPOSITE_NUMBER(0x0064)
#define ERR_IMAGE_FLASH_PRINT                               OPPOSITE_NUMBER(0x0065)
#define ERR_IMAGE_STANDARD_MODE_RASTER_PRINT                OPPOSITE_NUMBER(0x0066)


#define ERR_STANDARD_MODE_SET_PRINTAREA_WIDTH               OPPOSITE_NUMBER(0x0070)
#define ERR_STANDARD_MODE_SET_LEFT_MARGIN                   OPPOSITE_NUMBER(0x0071)
#define ERR_STANDARD_MODE_SET_HORIZONTAL_STARTING_POSITION  OPPOSITE_NUMBER(0x0072)


#define ERR_PAGE_MODE_SET_VERTICAL_STARTING_POSITION        OPPOSITE_NUMBER(0x0081)
#define ERR_PAGE_MODE_SET_PRINT_AREA                        OPPOSITE_NUMBER(0x0082)
#define ERR_PAGE_MODE_SET_PRINT_DIRECTION                   OPPOSITE_NUMBER(0x0083)
#define ERR_PAGE_MODE_PRINT                                 OPPOSITE_NUMBER(0x0084)
#define ERR_PAGE_MODE_CLEAR_BUFFER                          OPPOSITE_NUMBER(0x0085)


#define ERR_BARCODE_PRINT_1D                                OPPOSITE_NUMBER(0x0091)
#define ERR_BARCODE_PRINT_2D                                OPPOSITE_NUMBER(0x0092)
#define ERR_BARCODE_SELECT_MODULE_WIDTH                     OPPOSITE_NUMBER(0x0093)
#define ERR_BARCODE_SELECT_BARCODE_HEIGHT                   OPPOSITE_NUMBER(0x0094)
#define ERR_BARCODE_SELECT_HRI_FONT_TYPE                    OPPOSITE_NUMBER(0x0095)
#define ERR_BARCODE_SELECT_HRI_FONT_POSITION                OPPOSITE_NUMBER(0x0096)
#define ERR_BARCODE_QR_SET_PARAM                            OPPOSITE_NUMBER(0x0097)
#define ERR_BARCODE_PDF417_SELECT_CORRECTION_GRADE          OPPOSITE_NUMBER(0x0098)
#define ERR_BARCODE_PDF417_SET_SIZE                         OPPOSITE_NUMBER(0x0099)
#define ERR_BARCODE_GS1DATABAR_SET_PARAM                    OPPOSITE_NUMBER(0x009a)
#define ERR_BARCODE_1D_SEND_DATA                            OPPOSITE_NUMBER(0x009b)
#define ERR_BARCODE_QR_SEND_DATA                            OPPOSITE_NUMBER(0x009c)
#define ERR_BARCODE_PDF417_SEND_DATA                        OPPOSITE_NUMBER(0x009d)
#define ERR_BARCODE_MAXIDODE_SEND_DATA                      OPPOSITE_NUMBER(0x009e)
#define ERR_BARCODE_GS1DATABAR_SEND_DATA                    OPPOSITE_NUMBER(0x009f)


#define ERR_RECEIVED_DATA                                   OPPOSITE_NUMBER(0x00a1)

//#define ERR_MSR_QUERY_STATUS                                OPPOSITE_NUMBER(0x00b1)
//#define ERR_MSR_CANCEL_SWIP_CARD                            OPPOSITE_NUMBER(0x00b2)
//#define ERR_MSR_READ_FIRST_TRACK_DATA                       OPPOSITE_NUMBER(0x00b3)
//#define ERR_MSR_READ_SECOND_TRACK_DATA                      OPPOSITE_NUMBER(0x00b4)
//#define ERR_MSR_READ_THIRD_TRACK_DATA                       OPPOSITE_NUMBER(0x00b5)
//#define ERR_MSR_READ_THREE_TRACKS_DATA                      OPPOSITE_NUMBER(0x00b6)
//#define ERR_IC_INITIALIZATION                               OPPOSITE_NUMBER(0x00b7)
//#define ERR_IC_REST                                         OPPOSITE_NUMBER(0x00b8)
//#define ERR_IC_CLOSE                                        OPPOSITE_NUMBER(0x00b9)


#define DYZ20150921

#endif
