ソースを参照

#IQRV #comment [DevAdapter] nantian/2021.0310.01 二期ST首次版本

gifur 4 年 前
コミット
8e0339eb74
26 ファイル変更5289 行追加353 行削除
  1. 1 1
      DevAdapter/CMakeLists.txt
  2. 0 0
      DevAdapter/nantian/FingerPrint.1.1/CILIX_AUX_UTILS.h
  3. 1 1
      DevAdapter/nantian/FingerPrint.1.1/CMakeLists.txt
  4. 2 2
      DevAdapter/nantian/FingerPrint.1.1/Gvar.cpp
  5. 1 1
      DevAdapter/nantian/FingerPrint.1.1/Gvar.h
  6. 4 4
      DevAdapter/nantian/FingerPrint.1.1/fingerprint.nantian.1.1.cpp
  7. 1 1
      DevAdapter/nantian/FingerPrint.1.1/fingerprint.nantian.1.1.h
  8. 2 1
      DevAdapter/nantian/cardissuer.1.1/CMakeLists.txt
  9. 7 2
      DevAdapter/nantian/cardissuer.1.1/cardissuer.nantian.1.1.cpp
  10. 4 4
      DevAdapter/nantian/cardissuer.1.1/cardissuer.nantian.1.1.h
  11. 2 2
      DevAdapter/nantian/contactlesscard.1.1/contactless.nantian.1.1.cpp
  12. 20 11
      DevAdapter/nantian/gpio.1.1/Gpio.nantian.cpp
  13. 13 4
      DevAdapter/nantian/hspscanner.1.1/Gvar.cpp
  14. 2 1
      DevAdapter/nantian/hspscanner.1.1/Gvar.h
  15. 131 42
      DevAdapter/nantian/hspscanner.1.1/hspscanner.nantian.1.1.cpp
  16. 4 4
      DevAdapter/nantian/idcer.1.1/GVar.h
  17. 50 16
      DevAdapter/nantian/idcer.1.1/idcertificate.nantian.1.1.cpp
  18. 3 1
      DevAdapter/nantian/pinpad.1.1/CMakeLists.txt
  19. 40 2
      DevAdapter/nantian/pinpad.1.1/pinpad.nantian.1.1.cpp
  20. 1 0
      DevAdapter/nantian/pinpad.1.1/pinpad.nantian.1.1.h
  21. 3989 0
      DevAdapter/nantian/termalprint.1.1/POSSDK.h
  22. 673 182
      DevAdapter/nantian/termalprint.1.1/ThermalPrint.Nantian.cpp
  23. 238 52
      DevAdapter/nantian/termalprint.1.1/ThermalPrint.Nantian.h
  24. 22 2
      DevAdapter/nantian/ups.1.1/ups.nantian.1.1.cpp
  25. 75 17
      DevAdapter/nantian/watchdog.1.1/watchdog.nantian.cpp
  26. 3 0
      DevAdapter/nantian/watchdog.1.1/watchdog.nantian.h

+ 1 - 1
DevAdapter/CMakeLists.txt

@@ -140,7 +140,7 @@ message(STATUS "vendor log library: ${VENDOR_LOG_LIB_NAME}")
 # 通过conan的方式管理厂商库
 if(DEVADAPTER_USING_CONAN)
     set(KEBA_CONAN_LIB_NAME keba/2021.0201.01@LR04.02_VendorLib/testing)
-	set(NANTIAN_CONAN_LIB_NAME nantian/2021.0119.01@LR04.02_VendorLib/testing)
+	set(NANTIAN_CONAN_LIB_NAME nantian/2021.0310.01@LR04.02_VendorLib/testing)
 	set(GRG_CONAN_LIB_NAME grg/2021.0111.01@LR04.02_VendorLib/testing)
 	set(CW_CONAN_LIB_NAME cw/2021.0310.01@LR04.02_VendorLib/testing)
     set(GWI_CONAN_LIB_NAME gwi/2021.0119.01@LR04.02_VendorLib/testing)

+ 0 - 0
DevAdapter/nantian/watchdog.1.1/CILIX_AUX_UTILS.h → DevAdapter/nantian/FingerPrint.1.1/CILIX_AUX_UTILS.h


+ 1 - 1
DevAdapter/nantian/FingerPrint.1.1/CMakeLists.txt

@@ -16,7 +16,7 @@ set(${MODULE_PREFIX}_SRCS SHARED
 rvc_dev_config_library(${MODULE_NAME} ${MODULE_PREFIX})
 
 # ${MODULE_FULL_NAME} ĘÇ TAGET ĂűłĆŁŹÔÚ rvc_dev_config_library ÖĐś¨Ňĺ
-target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_INCLUDE_DIR}")
+# target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_INCLUDE_DIR}")
 target_link_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_LIB_DIR}")
 
 #target_link_libraries(${MODULE_FULL_NAME} demo)

+ 2 - 2
DevAdapter/nantian/FingerPrint.1.1/Gvar.cpp

@@ -3,7 +3,7 @@
 //////////////////////////////////////////////////////////////////////
 
 #include "Gvar.h"
-#include "../../include/log4vendor.h"
+#include "log4vendor.h"
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
@@ -50,7 +50,7 @@ Gvar::Gvar()
 
 	LOG4VTM(WARN, "<Gvar> - "<<"Enter-");
 
-	LOG4VTM(WARN, "<Gvar> - "<<"fingerprint.nantian.1.1.so - 版本:V1.0.0.7");
+	LOG4VTM(WARN, "<Gvar> - "<<"fingerprint.nantian.1.1.so - 版本:V1.0.0.8");
 	LoadDll();
 	LOG4VTM(WARN, "<Gvar> - "<<"Exit-");
 }

+ 1 - 1
DevAdapter/nantian/FingerPrint.1.1/Gvar.h

@@ -3,7 +3,7 @@
 //////////////////////////////////////////////////////////////////////
 
 
-#include "./CILIX_AUX_UTILS.h"
+#include "CILIX_AUX_UTILS.h"
 
 
 /*---获取硬件版本---*/

+ 4 - 4
DevAdapter/nantian/FingerPrint.1.1/fingerprint.nantian.1.1.cpp

@@ -1,5 +1,5 @@
 #include "fingerprint.nantian.1.1.h"
-#include "../../include/log4vendor.h"
+#include "log4vendor.h"
 FINGERPRINTNANTIAN21_API ErrorCodeEnum CreateDevComponent(DeviceBaseClass *&baseObj)
 {
 	baseObj = new FingerPrintNantian21();
@@ -444,13 +444,13 @@ ErrorCodeEnum FingerPrintNantian21::GetDevCategory(DevCategoryInfo &devCategory)
 	int iret = Error_Succeed;
 	CILIXAutoTrace _at(m_gvar->m_trace, "GetDevCategory", &iret);
 	LOG4VTM(WARN, "<GetDevCategory> - "<<"Enry-");
-	strcpy(devCategory.szType, "fingerprint");
+	strcpy(devCategory.szType, "PVER=TCS#MID=TCS316N");
 	strcpy(devCategory.szVendor, "nantian");
-	strcpy(devCategory.szModel, "TCM");
+	strcpy(devCategory.szModel, "FWID=1.00.25");
 	devCategory.version.wMajor = 1;
 	devCategory.version.wMinor = 0;
 	devCategory.version.wRevision = 0;
-	devCategory.version.wBuild = 4;
+	devCategory.version.wBuild = 8;
 	devCategory.eState = DEVICE_STATUS_NOT_READY;
 
 	if (!m_gvar->m_isLoad)

+ 1 - 1
DevAdapter/nantian/FingerPrint.1.1/fingerprint.nantian.1.1.h

@@ -6,7 +6,7 @@
 // 符号视为是被导出的。
 
 
-#include "../../include/FingerPrintClass.h"
+#include "FingerPrintClass.h"
 #include "Gvar.h"
 
 // 此类是从 FingerPrint.Nantian.4.1.dll 导出的

+ 2 - 1
DevAdapter/nantian/cardissuer.1.1/CMakeLists.txt

@@ -11,7 +11,8 @@ set(${MODULE_PREFIX}_SRCS SHARED
 rvc_dev_config_library(${MODULE_NAME} ${MODULE_PREFIX})
 
 # ${MODULE_FULL_NAME} 是 TAGET 名称,在 rvc_dev_config_library 中定义
-#target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_DEPS_DIR}/cmbsz.sample")
+# target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_INCLUDE_DIR}")
+
 target_link_libraries(${MODULE_FULL_NAME} ${VENDOR_LOG_LIB_NAME})
 
 #  =-=-=-=-=-=-=-=-=-= {适配器工程}/CMakeLists.txt 文件最后必须声明如下内容=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=

+ 7 - 2
DevAdapter/nantian/cardissuer.1.1/cardissuer.nantian.1.1.cpp

@@ -105,8 +105,13 @@ ErrorCodeEnum CardIssuerClassImpl::GetDevCategory(DevCategoryInfo &devCategory)
 	WAITING_LOOP();
 	
     ErrorCodeEnum err = Error_Succeed;
-    std::strcpy(devCategory.szModel, "ACT_F55570");
-    std::strcpy(devCategory.szType, "CardIssuer");
+    std::strcpy(devCategory.szModel, "FWID=");
+	char *sDevInfo[10] = {NULL};
+	char szDevInfo[200] = "";
+	sDevInfo[2] = szDevInfo;
+	DRVCardDispenser->GetDevInfo(2,sDevInfo);
+	std::strncpy(devCategory.szModel + 5, szDevInfo,8);
+    std::strcpy(devCategory.szType, "PVER=ACTT#MID=ACT-F55570");
     std::strcpy(devCategory.szVendor, "nantian");
 	
 	m_busy_flag = false;

+ 4 - 4
DevAdapter/nantian/cardissuer.1.1/cardissuer.nantian.1.1.h

@@ -1,14 +1,14 @@
 #ifndef LIBFRAMEWORK_CARDISSUER_IMPL_H
 #define LIBFRAMEWORK_CARDISSUER_IMPL_H
 
-#include "../../DevAdapter/include/CardIssuerClass.h"
+#include "CardIssuerClass.h"
 
-#include "../include/CILIX_AUX_UTILS.h"
+#include "CILIX_AUX_UTILS.h"
 
-#include "../include/log4vendor.h"
+#include "log4vendor.h"
 
 //DRV头文件
-#include "../include/DRV_CardDispenser.h"
+#include "DRV_CardDispenser.h"
 
 #include "dlfcn.h"
 #include "stddef.h"

+ 2 - 2
DevAdapter/nantian/contactlesscard.1.1/contactless.nantian.1.1.cpp

@@ -108,8 +108,8 @@ ErrorCodeEnum ContactlessCardImpl::GetDevCategory(DevCategoryInfo &devCategory)
     LOG4VTM(WARN, "<Contactless::GetDevCategory> - "
                       << "Enter-");
     ErrorCodeEnum err = Error_Succeed;
-    std::strcpy(devCategory.szModel, "DeCard_T10N");
-    std::strcpy(devCategory.szType, "Contactless");
+    std::strcpy(devCategory.szModel, "FWID=1.0.2");
+    std::strcpy(devCategory.szType, "PVER=DeCard#MID=DeCard_T10N");
     std::strcpy(devCategory.szVendor, "nantian");
     LOG4VTM(WARN, "<Contactless::GetDevCategory> - "
                       << "Exit-");

+ 20 - 11
DevAdapter/nantian/gpio.1.1/Gpio.nantian.cpp

@@ -174,13 +174,13 @@ ErrorCodeEnum GPIO_NT_NAC::DevOpen(GpioInitParam initParam)
 
 	//端口由应用传入,传入的是设备2的端口号;
 	//打开设备
-	int iret1 = m_device->OpenDevice(initParam.dwPort-1, initParam.dwBaudRate);
-	m_trace->WriteTrace("DevOpen", "Invoke OpenDevice(%d,%d) return %d", initParam.dwPort-1, initParam.dwBaudRate, iret1);
+	iret = m_device->OpenDevice(initParam.dwPort-1, initParam.dwBaudRate);
+	m_trace->WriteTrace("DevOpen", "Invoke OpenDevice(%d,%d) return %d", initParam.dwPort-1, initParam.dwBaudRate, iret);
 
 	LOG4VTM(WARN, "DevOpen "
-					  << "Invoke OpenDevice Port = " <<  initParam.dwPort << "Rate = " << initParam.dwBaudRate-1 << "return  " << iret1);
+					  << "Invoke OpenDevice Port = ttyXRUSB" <<  initParam.dwPort -1 << "Rate = " << initParam.dwBaudRate << "return  " << iret);
 
-	if (iret1 != 0)
+	if (iret != 0)
 	{
 		memset(m_errorInfo.szErrMsg, 0, sizeof(m_errorInfo.szErrMsg));
 		strcpy(m_errorInfo.szErrMsg, "connect to device failed!");
@@ -232,8 +232,8 @@ ErrorCodeEnum GPIO_NT_NAC::GetDevCategory(DevCategoryInfo &devCategory)
 	LOG4VTM(WARN, "GetDevCategory "
 					  << "Enter ");
 	//赋值
-	strcpy(devCategory.szType, "Gpio");
-	strcpy(devCategory.szVendor, "Nantian");
+	strcpy(devCategory.szType, "PVER=NT#MID=TN_NAC");
+	strcpy(devCategory.szVendor, "nantian");
 	devCategory.version.wMajor = 1;
 	devCategory.version.wMinor = 0;
 	devCategory.version.wRevision = 0;
@@ -264,7 +264,9 @@ ErrorCodeEnum GPIO_NT_NAC::GetDevCategory(DevCategoryInfo &devCategory)
 	m_trace->WriteTrace(CILIXTRACE_L_DEBUG, "GetDevCategory", "[2]Invoke GetFirmwareVersion return %d", iret2);
 	LOG4VTM(WARN, "GetDevCategory "
 					  << "Invoke GetFirmwareVersionEx return " << iret2);
-	strcpy(devCategory.szModel, sDevVer);
+    char sDevVerModel[100] = "";
+    sprintf(sDevVerModel,"FWID=%s",sDevVer);
+	strcpy(devCategory.szModel, sDevVerModel);
 
 	if (iret1 == 0 && iret2 == 0)
 		devCategory.eState = DEVICE_STATUS_NORMAL;
@@ -519,17 +521,17 @@ ErrorCodeEnum GPIO_NT_NAC::ReadPort(DWORD dwPort, BYTE &btStatus)
 		//if(p24 == 1)		p24 = 0;
 		//else if(p24 == 0)	p24 = 1;
 		//***P2.5,卡嘴检测
-		//p25 = m_device->GetInputStatus(3);
+		p25 = m_device->GetInputStatus(1);
 		//***P2.6,开机盖检测,设备1,IN7
 		p26 = m_device->GetInputStatus(7);
 		if (p26 == 1)
 			p26 = 0;
 		else if (p26 == 0)
 			p26 = 1;
-
-		if (p21 >= 0 && p22 >= 0 && p23 >= 0 && p24 >= 0 && p26 >= 0)
+		
+		if (p21 >= 0 && p22 >= 0 && p23 >= 0 && p24 >= 0 && p25 >=0&& p26 >= 0)
 		{
-			btStatus = p21 | (p22 << 1) | (p23 << 2) | (p24 << 3) | (p26 << 5);
+			btStatus = p21 | (p22 << 1) | (p23 << 2) | (p24 << 3) | (p25 << 4) | (p26 << 5);
 		}
 		else
 		{
@@ -553,3 +555,10 @@ ErrorCodeEnum GPIO_NT_NAC::ReadPort(DWORD dwPort, BYTE &btStatus)
 }
 
 
+
+
+
+
+
+
+

+ 13 - 4
DevAdapter/nantian/hspscanner.1.1/Gvar.cpp

@@ -28,6 +28,7 @@ Gvar::Gvar()
 	HIGH_GetHPixelByIndex = NULL;
 	HIGH_GetVPixelByIndex = NULL;
 	HIGH_CloseWindow = NULL;
+	HIGH_HideWindow = NULL;
 	char INIPath[100] = "";
 	CILIX_AUX_X::CILIX_GetModuleCurPath(INIPath);
 	strcat(INIPath, "hspscanner.nantian.ini");
@@ -47,7 +48,7 @@ Gvar::Gvar()
 
 	LOG4VTM(WARN, "<Gvar> - "<<"Enter-");
 
-	LOG4VTM(WARN, "<Gvar> - "<<"hspscanner.nantian.1.1.so - 版本:V1.0.0.4");
+	LOG4VTM(WARN, "<Gvar> - "<<"hspscanner.nantian.1.1.so - 版本:V1.0.0.8");
 	LoadDll();
 	LOG4VTM(WARN, "<Gvar> - "<<"Exit-");
 }
@@ -71,15 +72,15 @@ void Gvar::LoadDll()
 	CILIX_AUX_X::CILIX_GetModuleCurPath(confile);
 	char dllPath[1024] = "";
 	strcpy(dllPath,confile);
-	strcat(dllPath,"/nantian/libBHCamBase.nantian.so");
+	strcat(dllPath,"nantian/libBHCamBase.nantian.so");
 
-	m_trace->WriteTrace(CILIXTRACE_L_INFO,"LoadDll","版本:V1.0.0.4");
+	m_trace->WriteTrace(CILIXTRACE_L_INFO,"LoadDll","版本:V1.0.0.8");
 	m_trace->WriteTrace(CILIXTRACE_L_INFO,"LoadDll","驱动库路径dll1Path=%s",dllPath);
 	LOG4VTM(WARN, "<LoadDll> - "<<"驱动库路径dllPath = "<<dllPath);
 	m_hDll = dlopen(dllPath,RTLD_LAZY);
 	if (m_hDll == NULL)
 	{
-		m_trace->WriteTrace(CILIXTRACE_L_ERROR,"LoadDll","动态库“libBHCamBase.so”加载失败");
+		m_trace->WriteTrace(CILIXTRACE_L_ERROR,"LoadDll","动态库:%s加载失败",dllPath);
 		LOG4VTM(WARN, "<LoadDll> - "<<"动态库“libBHCamBase.so”加载失败");
 		LOG4VTM(WARN, "<LoadDll> - "<<"Exit-");
 		return;
@@ -188,6 +189,14 @@ void Gvar::LoadDll()
 		LOG4VTM(WARN, "<LoadDll> - "<<"Exit-");
 		return;
 	}
+	HIGH_HideWindow = (pHIGH_HideWindow)dlsym(m_hDll,"HIGH_HideWindow");
+	if (HIGH_HideWindow == NULL)
+	{
+		m_trace->WriteTrace(CILIXTRACE_L_ERROR,"LoadDll","动态库函数HIGH_HideWindow加载失败");
+		LOG4VTM(WARN, "<LoadDll> - "<<"动态库函数HIGH_HideWindow加载失败");
+		LOG4VTM(WARN, "<LoadDll> - "<<"Exit-");
+		return;
+	}
 	m_isLoad = TRUE;
 	m_trace->WriteTrace(CILIXTRACE_L_INFO,"LoadDll","动态库加载成功退出接口");
 	LOG4VTM(WARN, "<LoadDll> - "<<"动态库加载成功退出接口");

+ 2 - 1
DevAdapter/nantian/hspscanner.1.1/Gvar.h

@@ -18,6 +18,7 @@ typedef int (*pHIGH_SetCameraPixel)(int nHPixel, int nVPixel);
 typedef int (*pHIGH_GetHPixelByIndex)(int nIndex);
 typedef int (*pHIGH_GetVPixelByIndex)(int nIndex);
 typedef int (*pHIGH_CloseWindow)();
+typedef int (*pHIGH_HideWindow)(bool isPause);
 
 
 class Gvar  
@@ -48,6 +49,6 @@ public:
 	pHIGH_GetHPixelByIndex     HIGH_GetHPixelByIndex;
 	pHIGH_GetVPixelByIndex     HIGH_GetVPixelByIndex;
 	pHIGH_CloseWindow          HIGH_CloseWindow;
-
+	pHIGH_HideWindow           HIGH_HideWindow; 
 };
 

+ 131 - 42
DevAdapter/nantian/hspscanner.1.1/hspscanner.nantian.1.1.cpp

@@ -8,7 +8,6 @@ positionType g_position = pNOANGLE;
 int g_X=-1, g_Y=-1, g_Width=-1, g_Height=-1;
 BOOL g_isshow = FALSE;
 BOOL g_ishide = TRUE;
-BOOL g_sethide = FALSE;
 BOOL m_isOnline = FALSE;
 DevErrorInfo m_Error;   //标记错误码
 char Idx[100] = "";
@@ -24,6 +23,10 @@ int g_SetPara = -1;
 #include <limits.h>
 #include <limits.h>
 #include "log4vendor.h"
+
+#include <fstream>
+using namespace std;
+
 int FileSize(const char* fname)
 {
 	struct stat statbuf;
@@ -31,7 +34,28 @@ int FileSize(const char* fname)
 		return statbuf.st_size;
 	return -1;
 }
-
+int FileSizeEx(const char* fname)
+{
+// 1. 打开图片文件
+	ifstream is(fname, ifstream::in | ios::binary);
+	// 2. 计算图片长度
+	is.seekg(0, is.end);  //将文件流指针定位到流的末尾
+	int length = is.tellg();
+	is.seekg(0, is.beg);  //将文件流指针重新定位到流的开始
+	return length;
+}
+int GetFileSizeEx(const char* fname)
+{
+	unsigned long lsize = -1;
+	FILE *fp = NULL;
+	fp = fopen(fname,"r");
+	if (fp == NULL)
+		return lsize;
+	fseek(fp,0L,SEEK_END);
+	lsize = ftell(fp);
+	fclose(fp);
+	return lsize;
+}
 bool is_dir(const char *path)
 {
     struct stat statbuf;
@@ -65,7 +89,23 @@ void get_file_path(const char *path, const char *file_name,  char *file_path)
         strcat(file_path, "/");
     strcat(file_path, file_name);
 }
-
+void CreateDir(const char *path)
+{
+    int i = 0;
+    char FilePath[100] = "";
+    FilePath[0] = path[0];
+    for(i= 1; i<=strlen(path); i++)
+    {
+        FilePath[i] = path[i];
+        if(path[i] == '/')
+        {
+            if(access(FilePath, F_OK) != 0)
+                mkdir(FilePath,ACCESSPERMS);
+			else
+				chmod(FilePath,ACCESSPERMS);
+        }
+	}
+}
 void delete_file(const char *path)
 {
     DIR *dir;
@@ -689,11 +729,11 @@ ErrorCodeEnum CHSPScanner::SetParam(ParamType type, ParamTypeValue value)
 				LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
 				return Error_Succeed;
 			}
-			iretval = g_var->HIGH_CloseWindow();
-			CILIX_AUX_X::Sleep(1000);
+			iretval = g_var->HIGH_HideWindow(true);
+			CILIX_AUX_X::Sleep(200);
 			if (iretval != 0)
 			{
-				g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"SetParam","窗口隐藏设置失败,HIGH_CloseWindow return %d",iretval);
+				g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"SetParam","窗口隐藏设置失败,HIGH_HideWindow return %d",iretval);
 				memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
 				strcpy(m_Error.szErrMsg,"窗口隐藏设置失败");
 				m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
@@ -706,8 +746,6 @@ ErrorCodeEnum CHSPScanner::SetParam(ParamType type, ParamTypeValue value)
 			strcpy(m_Error.szErrMsg,"窗口隐藏设置成功");
 			m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
 			g_ishide = TRUE;
-			g_isshow = FALSE;
-			g_sethide = TRUE;
 			g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"SetParam","窗口隐藏设置成功");
 			LOG4VTM(WARN, "<SetParam> - "<<"窗口隐藏设置成功");
 			LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
@@ -715,35 +753,36 @@ ErrorCodeEnum CHSPScanner::SetParam(ParamType type, ParamTypeValue value)
 		}
 		if (value == HSPS_VIEW_SHOW)
 		{
-			if(g_isshow)
+			if(!g_isshow)
 			{
 				memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
-				strcpy(m_Error.szErrMsg,"窗口已创建,直接返回成功");
+				strcpy(m_Error.szErrMsg,"窗口未创建,不能直接显示");
 				m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
-				LOG4VTM(WARN, "<SetParam> - "<<"窗口已创建,直接返回成功");
+				LOG4VTM(WARN, "<SetParam> - "<<"窗口未创建,不能直接显示");
 				LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
-				return Error_Succeed;
+				return Error_NotExist;
 			}
-			iretval = g_var->HIGH_CreateWindow(g_X,g_Y,g_Width,g_Height);
-			CILIX_AUX_X::Sleep(1000);
-			g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"SetParam","HIGH_CreateWindow return %d",iretval);
-			if (iretval != 0)
-			{
-				g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"SetParam","窗口显示设置失败,HIGH_CreateWindow return %d",iretval);
-				memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
-				strcpy(m_Error.szErrMsg,"窗口显示设置失败");
-				m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
-				iret = Error_DevCommFailed;
-				LOG4VTM(WARN, "<SetParam> - "<<"窗口显示设置失败,HIGH_CreateWindow return "<<iretval);
-				LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
-				return iret;
+			if (g_ishide)
+			{	
+				iretval = g_var->HIGH_HideWindow(false);
+				CILIX_AUX_X::Sleep(200);
+				g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"SetParam","HIGH_HideWindow return %d",iretval);
+				if (iretval != 0)
+				{
+					g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"SetParam","隐藏窗口显示设置失败,HIGH_HideWindow return %d",iretval);
+					memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+					strcpy(m_Error.szErrMsg,"隐藏窗口显示设置失败");
+					m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+					iret = Error_DevCommFailed;
+					LOG4VTM(WARN, "<SetParam> - "<<"隐藏窗口显示设置失败,HIGH_CreateWindow return "<<iretval);
+					LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
+					return iret;
+				}
+				g_ishide = FALSE;
 			}
 			memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
 			strcpy(m_Error.szErrMsg,"窗口显示设置成功");
 			m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
-			g_ishide = FALSE;
-			g_isshow = TRUE;
-			g_sethide = FALSE;
 			g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"SetParam","窗口显示设置成功");
 			LOG4VTM(WARN, "<SetParam> - "<<"窗口显示设置成功");
 			LOG4VTM(WARN, "<SetParam> - "<<"Exit-");
@@ -974,6 +1013,8 @@ ErrorCodeEnum CHSPScanner::ScanImage(const char* pszFileName)
 		LOG4VTM(WARN, "<ScanImage> - "<<"Exit-");
 		return iret;
 	}
+	//创建路径并赋权限
+	CreateDir((char*)pszFileName);
 	//保存图像
 	iretval = g_var->HIGH_TakePicture((char*)pszFileName);
 	if (iretval != 0)
@@ -987,6 +1028,18 @@ ErrorCodeEnum CHSPScanner::ScanImage(const char* pszFileName)
 		LOG4VTM(WARN, "<ScanImage> - "<<"Exit-");
 		return iret;
 	}
+	//判定图片是否生成
+	if (access(pszFileName,F_OK) != 0)
+	{
+		iret = Error_NotExist;
+		g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"ScanImage","图片未保存成功");
+		memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+		strcpy(m_Error.szErrMsg,"图片未保存成功");
+		m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+		LOG4VTM(WARN, "<ScanImage> - "<<"图片未保存成功");
+		LOG4VTM(WARN, "<ScanImage> - "<<"Exit-");
+		return iret;
+	}
 	memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
 	strcpy(m_Error.szErrMsg,"拍照成功");
 	m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
@@ -1049,9 +1102,12 @@ ErrorCodeEnum CHSPScanner::ScanImageEx(BYTE* pBtImg,  int& nBtLen, const char* p
 		LOG4VTM(WARN, "<ScanImageEx> - "<<"Exit-");
 		return iret;
 	}
+	//创建路径并赋权限
+	CreateDir(cPicpath);
 	//保存图片
 	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","cPicpath=%s",cPicpath);
 	iretval = g_var->HIGH_TakePicture(cPicpath);
+	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","HIGH_TakePicture return %d",iretval);
 	if (iretval != 0)
 	{
 		iret = Error_DevCommFailed;
@@ -1063,10 +1119,35 @@ ErrorCodeEnum CHSPScanner::ScanImageEx(BYTE* pBtImg,  int& nBtLen, const char* p
 		LOG4VTM(WARN, "<ScanImageEx> - "<<"Exit-");
 		return iret;
 	}
+	//判定图片是否生成
+	if (access(cPicpath,F_OK) != 0)
+	{
+		iret = Error_NotExist;
+		g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"ScanImageEx","图片未保存成功");
+		memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+		strcpy(m_Error.szErrMsg,"图片未保存成功");
+		m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+		LOG4VTM(WARN, "<ScanImageEx> - "<<"图片未保存成功");
+		LOG4VTM(WARN, "<ScanImageEx> - "<<"Exit-");
+		return iret;
+	}
 	//获取图像数据输出给应用
+	chmod(cPicpath,ACCESSPERMS);
 	//获取图片的大小
 	int imagelen = 0;
-	imagelen = FileSize(cPicpath);
+	imagelen = GetFileSizeEx(cPicpath);
+	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","GetFileSizeEx return %d",imagelen);
+	if (imagelen == -1)
+	{
+		iret = Error_NotExist;
+		g_var->m_trace->WriteTrace(CILIXTRACE_L_ERROR,"ScanImageEx","操作打开图片文件失败");
+		memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+		strcpy(m_Error.szErrMsg,"操作打开图片文件失败");
+		m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+		LOG4VTM(WARN, "<ScanImageEx> - "<<"操作打开图片文件失败");
+		LOG4VTM(WARN, "<ScanImageEx> - "<<"Exit-");
+		return iret;
+	}
 	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","图片数据长度:imagelen=%d",imagelen);
 	LOG4VTM(WARN, "<ScanImageEx> - "<<"图片数据长度::"<<imagelen);
 	//申请空间获取图像数据
@@ -1092,10 +1173,10 @@ ErrorCodeEnum CHSPScanner::ScanImageEx(BYTE* pBtImg,  int& nBtLen, const char* p
 	m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
 	//赋值输出
 	memcpy(pBtImg,cImageData,ilen);
-	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","拍照成功退出");
 	if (iFlag == 0)
 		delete_file(cPicpath);
 	delete[] cImageData;
+	g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"ScanImageEx","拍照成功退出");
 	LOG4VTM(WARN, "<ScanImageEx> - "<<"拍照成功退出");
 	LOG4VTM(WARN, "<ScanImageEx> - "<<"Exit-");
 	return Error_Succeed;
@@ -1197,6 +1278,8 @@ ErrorCodeEnum CHSPScanner::GetDevStatus(HspsDevStatus& status)
 	}
 	int istatus = -1;
 	g_var->HIGH_GetStatus(&istatus);
+	g_var->m_trace->WriteTrace(CILIXTRACE_L_DEBUG,"GetDevStatus","获取高拍仪的状态istatus=%d",istatus);
+	g_var->m_trace->WriteTrace(CILIXTRACE_L_DEBUG,"GetDevStatus","g_isshow=%d,g_ishide=%d",g_isshow,g_ishide);
 	if (istatus != 0 && istatus != 2)
 		m_isOnline = FALSE;
 	else
@@ -1204,18 +1287,24 @@ ErrorCodeEnum CHSPScanner::GetDevStatus(HspsDevStatus& status)
     if (m_isOnline)//分析目前是预览、非预览和还是隐藏状态
     {
         status.isConnected = 1;
-        if ((g_isshow)&&(g_sethide == FALSE))//预览
-            status.inPreview = 1;
-        else
-        {
+		if (!g_isshow)
+		{	
 			status.inPreview = 0;
 			status.inShow = 0;
-        }
+		}
+		else
+		{
+			status.inPreview = 1;
+			if (!g_ishide)	
+				status.inShow = 1;
+			else
+				status.inShow = 0;
+		}
     }
     else//判断到如果是不在线,如果处于预览或隐藏状态需要销毁窗口
     {
         status.isConnected = 0;
-        if (!g_ishide || g_isshow || !g_sethide)//预览
+        if (g_isshow)//预览
         { 
 			iretval = g_var->HIGH_CloseWindow();
 			g_var->m_trace->WriteTrace(CILIXTRACE_L_INFO,"GetDevStatus","HIGH_CloseWindow return %d",iretval);
@@ -1239,19 +1328,19 @@ ErrorCodeEnum CHSPScanner::GetDevStatus(HspsDevStatus& status)
 ErrorCodeEnum CHSPScanner::GetDevCategory(DevCategoryInfo &devCategory)
 {
         memset(devCategory.szType,0,sizeof(devCategory.szType));
-        strcpy(devCategory.szType,"HSPScanner");
+        strcpy(devCategory.szType,"PVER=KGR#MID=KGR-Q800F");
         memset(devCategory.szModel,0,sizeof(devCategory.szModel));
-        strcpy(devCategory.szModel,"S500P");
+        strcpy(devCategory.szModel,"FWID=1.0.1");
         memset(devCategory.szVendor,0,sizeof(devCategory.szVendor));
-        strcpy(devCategory.szVendor,"NANTIAN");
+        strcpy(devCategory.szVendor,"nantian");
         if (m_isOnline)
                 devCategory.eState = DEVICE_STATUS_CONNECTING;
         else
                 devCategory.eState = DEVICE_STATUS_FAULT;
-        devCategory.version.wMajor = 2;
+        devCategory.version.wMajor = 1;
         devCategory.version.wMinor = 0;
-        devCategory.version.wRevision = 10;
-        devCategory.version.wBuild = 6;
+        devCategory.version.wRevision = 0;
+        devCategory.version.wBuild = 8;
         return Error_Succeed;
 }
 //	Reset device.

+ 4 - 4
DevAdapter/nantian/idcer.1.1/GVar.h

@@ -5,10 +5,10 @@
 #define MAX_LEN 1024
 #define MIN_LEN 16
 
-#include "../include/DRV_IDCardReader.h"
-#include "../../include/IDCerClass.h"
-#include "../include/CILIX_AUX_UTILS.h"
-#include "../include/log4vendor.h"
+#include "DRV_IDCardReader.h"
+#include "IDCerClass.h"
+#include "CILIX_AUX_UTILS.h"
+#include "log4vendor.h"
 #include <iostream>
 #include <algorithm>
 #include <functional>

+ 50 - 16
DevAdapter/nantian/idcer.1.1/idcertificate.nantian.1.1.cpp

@@ -212,8 +212,8 @@ ErrorCodeEnum IDCardReaderNantian::DevOpen(DWORD dwPort)
 	
 	try
 	{
-		strcpy(devCategory.szType, "IDCertificate");
-		strcpy(devCategory.szVendor, "Nantian");
+		strcpy(devCategory.szType, "PVER=NT#MID=NTIDC-600B");
+		strcpy(devCategory.szVendor, "nantian");
 		strcpy(devCategory.szModel, "STYLE=IG#FUNCTION=ITF");
 		devCategory.version.wMajor = 1;
 		devCategory.version.wMinor = 0;
@@ -409,12 +409,7 @@ ErrorCodeEnum IDCardReaderNantian::DevOpen(DWORD dwPort)
 				"Load library error");
 			throw Error_DevLoadFileFailed;
 		}
-        if(g_pGvar.ReadFlg)
-        {
-            iRet = g_pGvar.m_pDRVObj->EjectCard();
-            usleep(500000);
-            iRet = g_pGvar.m_pDRVObj->InsertCard(NULL);       
-        }
+      
 		//查询设备状态
 		for (int i = 0; i < MIN_LEN; i++)
 		{
@@ -938,7 +933,6 @@ g_pGvar.m_pTrace->WriteTrace(CILIXTRACE_L_DEBUG, "GAT","11");
 				throw Error_Hardware;
 			
 		}
-		g_pGvar.ReadFlg = false;
 		throw Error_Succeed;
 	}
 	catch (ErrorCodeEnum errcode)
@@ -956,6 +950,12 @@ void* thread( void *arg )
 	int iDRVRet = 0;
 	char sInserted[MIN_LEN] = {0};
 	int iTryTime = 0;
+	char *sDevStatus[MIN_LEN];
+		for (int i = 0; i < MIN_LEN; i++)
+		{
+			sDevStatus[i] = new char[MID_LEN];
+			memset(sDevStatus[i], 0, MID_LEN);
+		}
 	while (1)
 	{
 		if (g_pGvar.m_bIsCancel)
@@ -963,6 +963,16 @@ void* thread( void *arg )
 			g_pGvar.g_flag = false;
 			break;
 		}
+		iDRVRet = g_pGvar.m_pDRVObj->GetDevStatus(0, sDevStatus);
+		if (iDRVRet != E_DRVBASE_SUCCESS || atoi(sDevStatus[1]) != IDCARDREADER_DEVONLINE)
+		{
+			iDRVRet = g_pGvar.m_pDRVObj->CloseDev();
+			char sPort[32] = { 0 };
+			int iBaud = 0;
+			iDRVRet = g_pGvar.m_pDRVObj->OpenDev(sPort, iBaud);
+			g_pGvar.m_pTrace->WriteTrace(CILIXTRACE_L_INFO, "IDCerRFControl",
+				"DRV OpenDev return:[%d]", iDRVRet);
+		}
 		//检查是否放入卡
         iDRVRet = g_pGvar.m_pDRVObj->InsertCard(sInserted);
 			if (iDRVRet != E_DRVBASE_SUCCESS)
@@ -1019,7 +1029,12 @@ g_pGvar.TheardEnd = false;
 	pthread_t th;
 	int arg = 0;
 	int *thread_ret = NULL;
-	char *sDevStatus[MIN_LEN] = {0};		
+	char *sDevStatus[MIN_LEN] = {0};	
+	for (int i = 0; i < MIN_LEN; i++)
+			{
+				sDevStatus[i] = new char[MID_LEN];
+				memset(sDevStatus[i], 0, MID_LEN);
+			}	
 	try
 	{
 		if (g_pGvar.m_pDRVObj == NULL)
@@ -1031,6 +1046,29 @@ g_pGvar.TheardEnd = false;
 				"Load library error");
 			throw Error_DevLoadFileFailed;
 		}
+		iRet = g_pGvar.m_pDRVObj->GetDevStatus(0, sDevStatus);
+		if (iRet != E_DRVBASE_SUCCESS || (atoi(sDevStatus[1]) != IDCARDREADER_DEVONLINE))
+		{
+			iRet = g_pGvar.m_pDRVObj->CloseDev();
+			char sPort[32] = { 0 };
+			int iBaud = 0;
+			iRet = g_pGvar.m_pDRVObj->OpenDev(sPort, iBaud);
+			g_pGvar.m_pTrace->WriteTrace(CILIXTRACE_L_INFO, "IDCerRFControl",
+				"DRV OpenDev return:[%d]", iRet);
+		}
+		else
+		{
+			if(atoi(sDevStatus[1]) != IDCARDREADER_DEVONLINE)
+			{
+				iRet = g_pGvar.m_pDRVObj->CloseDev();
+				char sPort[32] = { 0 };
+				int iBaud = 0;
+				iRet = g_pGvar.m_pDRVObj->OpenDev(sPort, iBaud);
+				g_pGvar.m_pTrace->WriteTrace(CILIXTRACE_L_INFO, "IDCerRFControl",
+				"DRV OpenDev return:[%d]", iRet);
+				
+			}
+		}
 		//accecpt insert card
 		if (bControl)
 		{
@@ -1059,11 +1097,7 @@ g_pGvar.TheardEnd = false;
 				//throw Error_Succeed;
 				//get device status 
 				//查询设备状态
-			for (int i = 0; i < MIN_LEN; i++)
-			{
-				sDevStatus[i] = new char[MID_LEN];
-				memset(sDevStatus[i], 0, MID_LEN);
-			}
+			
 			iRet = g_pGvar.m_pDRVObj->GetDevStatus(0, sDevStatus);
 			if (iRet != E_DRVBASE_SUCCESS)
 			{
@@ -1097,7 +1131,7 @@ g_pGvar.TheardEnd = false;
 					sprintf(g_pGvar.m_errMsg, "force eject card error, code:%d", iRet);
 					throw Error_Hardware;
 			}
-			g_pGvar.ReadFlg = false;
+	
 		}
 				
 		throw Error_Succeed;

+ 3 - 1
DevAdapter/nantian/pinpad.1.1/CMakeLists.txt

@@ -15,7 +15,7 @@ set(${MODULE_PREFIX}_SRCS SHARED
 rvc_dev_config_library(${MODULE_NAME} ${MODULE_PREFIX})
 
 # ${MODULE_FULL_NAME} 是 TAGET 名称,在 rvc_dev_config_library 中定义
-#target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_DEPS_DIR}/cmbsz.sample")
+#target_include_directories(${MODULE_FULL_NAME} PRIVATE "${VENDOR_CURRENT_INCLUDE_DIR}")
 target_link_libraries(${MODULE_FULL_NAME} ${VENDOR_LOG_LIB_NAME})
 
 #  =-=-=-=-=-=-=-=-=-= {适配器工程}/CMakeLists.txt 文件最后必须声明如下内容=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=
@@ -24,3 +24,5 @@ rvc_dev_target_install(${MODULE_FULL_NAME})
 
 
 
+
+

+ 40 - 2
DevAdapter/nantian/pinpad.1.1/pinpad.nantian.1.1.cpp

@@ -65,6 +65,7 @@ PinPadNantian::PinPadNantian()
     SUNSON_MakeMac=(int(*)(int, int, int, unsigned char *, unsigned char *))dlsym(handle, "SUNSON_MakeMac");
     SUNSON_ScanKeyPress=(int(*)(unsigned char *))dlsym(handle, "SUNSON_ScanKeyPress");
     SUNSON_OpenLogEx=(void(*)(unsigned char, int))dlsym(handle, "SUNSON_OpenLogEx");
+    SUNSON_GetSerialNo=(int(*)(unsigned char *))dlsym(handle,"SUNSON_GetSerialNo");
 
     LOG4VTM(WARN, "<PinPadNantian> - "<<"Exit-");
 }
@@ -106,7 +107,7 @@ ErrorCodeEnum PinPadNantian::GetDevCategory(DevCategoryInfo &devCategory)
     LOG4VTM(WARN, "<GetDevCategory> - "<<"Enter-");
 
     //赋值
-    strcpy(devCategory.szType,"PinPad");
+    strcpy(devCategory.szType,"PVER=SUNSON#MID=SE8098B");
     strcpy(devCategory.szVendor,"nantian");
     devCategory.version.wMajor = 1;
     devCategory.version.wMinor = 0;
@@ -126,7 +127,7 @@ ErrorCodeEnum PinPadNantian::GetDevCategory(DevCategoryInfo &devCategory)
             return Error_Succeed;
     }
 
-    strcpy(devCategory.szModel,"SE8098BV1.0");
+    strcpy(devCategory.szModel,"PM=V2.0#PID=");
 
     char ver[100] = "";
     int sret = SUNSON_GetVersionNo((unsigned char *)ver);
@@ -141,6 +142,25 @@ ErrorCodeEnum PinPadNantian::GetDevCategory(DevCategoryInfo &devCategory)
             devCategory.eState = DEVICE_STATUS_FAULT;
     }
 
+    char number[100] = "";
+    sret = SUNSON_GetSerialNo((unsigned char *)number);
+    LOG4VTM(WARN, "<GetDevCategory> - "<<"执行SUNSON_GetSerialNo返回"<<sret);
+    if (sret == 0)
+    {
+            LOG4VTM(WARN, "<GetDevCategory> - "<<"查设备固件版本失败");
+            LOG4VTM(WARN, "<GetDevCategory> - "<<"Exit-");
+            memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+            strcpy(m_Error.szErrMsg,"查设备固件版本失败");
+            m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+            devCategory.eState = DEVICE_STATUS_FAULT;
+    }
+
+    strcat(devCategory.szModel,number);
+    strcat(devCategory.szModel,"#MID=");
+    strcat(devCategory.szModel,number);
+    strcat(devCategory.szModel,"#FWID=");
+    strcat(devCategory.szModel,ver);
+
     LOG4VTM(WARN, "<GetDevCategory> - "<<"Exit-");
     devCategory.eState = DEVICE_STATUS_NORMAL;
     return Error_Succeed;
@@ -584,6 +604,15 @@ ErrorCodeEnum PinPadNantian::LoadMasterKey(MasterKeyParam masterKey)
         LOG4VTM(WARN, "<LoadMasterKey> - "<<"Exit-");
         return Error_Param;
     }
+    if (strlen((char*)masterKey.key) != 16 && strlen((char*)masterKey.key) != 32)
+    {
+        LOG4VTM(WARN, "<LoadMasterKey> - "<<"密钥长度错误");
+        memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+        strcpy(m_Error.szErrMsg,"密钥长度错误");
+        m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+        LOG4VTM(WARN, "<LoadMasterKey> - "<<"Exit-");
+        return Error_Param;
+    }
 
     //压缩数据
     unsigned char fswData[1025] = "";
@@ -685,6 +714,15 @@ ErrorCodeEnum PinPadNantian::LoadWorkingKey(WorkKeyParam wkKey)
         LOG4VTM(WARN, "<LoadWorkingKey> - "<<"Exit-");
         return Error_Param;
     }
+    if (strlen((char*)wkKey.key) != 16 && strlen((char*)wkKey.key) != 32)
+    {
+        LOG4VTM(WARN, "<LoadWorkingKey> - "<<"密钥长度错误");
+        memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+        strcpy(m_Error.szErrMsg,"密钥长度错误");
+        m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+        LOG4VTM(WARN, "<LoadWorkingKey> - "<<"Exit-");
+        return Error_Param;
+    }
 
     unsigned char fswData[1025] = "";
     CILIX_AUX_X::CILIX_uti_pack((unsigned char*)wkKey.key, fswData, 32);

+ 1 - 0
DevAdapter/nantian/pinpad.1.1/pinpad.nantian.1.1.h

@@ -61,6 +61,7 @@ public:
     int (*SUNSON_MakeMac)(int UserKeyId, int Mac_mode, int nMacDataLen, unsigned char *ucMacData, unsigned char *MacResult);
     int (*SUNSON_ScanKeyPress)(unsigned char *ucKeyValue);  
     void (*SUNSON_OpenLogEx)(unsigned char bFlag, int nLogLevel);  
+    int (*SUNSON_GetSerialNo)(unsigned char *SerialNumber);
 };
 
 

+ 3989 - 0
DevAdapter/nantian/termalprint.1.1/POSSDK.h

@@ -0,0 +1,3989 @@
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @file:    POSSDKDLL.h
+/// @brief:    Declares the bpladll class
+///
+///
+/// Copyright SNBC Corp. 2019
+/// ALL RGIHTS RESERVED.
+///
+/// @~Chinese
+/// @file:    POSSDKDLL.h
+/// @brief:
+///
+///
+/// 山东新北洋信息技术有限公司 2019\n
+/// 所有权利保留。
+////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma once
+
+
+// 接口函数导出形式定义
+#ifndef POSSDKCALL_MODE
+#ifdef _WIN32
+/// A macro that defines possdkcall mode
+#define POSSDKCALL_MODE    __stdcall
+#else
+#define POSSDKCALL_MODE
+#endif
+#endif
+
+/**************************************************************************************************************************
+ * 宏定义
+ ************************************************************************************************************************/
+#ifndef POSSDK_DATA_TYPE_DEF
+
+#define POSSDK_DATA_TYPE_DEF
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// type of return handle
+/// @~English
+/// Returns the handle type
+///
+///
+/// @~Chinese
+/// 返回句柄类型
+////////////////////////////////////////////////////////////////////////////////////////////////////
+typedef void*    DEVICEHANDLE;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Success
+/// @~Chinese
+/// @brief 无IO通讯
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_NONE = 0;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Serial port
+/// @~Chinese
+/// @brief 串口
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_SERIAL = 1;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief API mode
+/// @~Chinese
+/// @brief API模式
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_USBDEVICE_API = 2;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief USB class mode
+/// @~Chinese
+/// @brief USB 类模式
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_USBDEVICE_CLASS = 3;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Net port
+/// @~Chinese
+/// @brief 网口
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_ETHERNET = 4;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Lpt port
+/// @~Chinese
+/// @brief 并口
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_LPT = 5;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Print Driver
+/// @~Chinese
+/// @brief 打印机驱动
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_DRIVER = 6;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Bluetooth
+/// @~Chinese
+/// @brief 蓝牙
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_BLT = 7;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Bluetooth_MFI
+/// @~Chinese
+/// @brief 蓝牙MFI
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int PORT_BLT_MFI = 8;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Success
+/// @~Chinese
+/// @brief 成功
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_SUCCESS = 0;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Fail
+/// @~Chinese
+/// @brief 失败
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_FAIL = -1;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Invalid handle
+/// @~Chinese
+/// @brief 无效句柄
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_HANDLE = -2;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Invalid parameter
+/// @~Chinese
+/// @brief 无效参数
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_PARAMATER = -3;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Parameter file error
+/// @~Chinese
+/// @brief 参数文件错误
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_FILE = -4;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Error reading file or data
+/// @~Chinese
+/// @brief 读取文件或数据错误
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_READ = -5;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Error in issuing file or data
+/// @~Chinese
+/// @brief 下发文件或数据错误
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_WRITE = -6;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief This feature is not supported
+/// @~Chinese
+/// @brief 此功能不支持
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_NOT_SUPPORT = -7;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Bitmap error
+/// @~Chinese
+/// @brief 位图错误
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_BITMAP_INVAILD = -8;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Dynamic library failed to load
+/// @~Chinese
+/// @brief 动态库加载失败
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_LOADDLL_FAILURE = -9;
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief Firmware does not support
+/// @~Chinese
+/// @brief 固件不支持
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_FIRNOSUPPORT = -10;
+
+//在此继续添加错误.........
+////////////////////////////////////////////////////////////////////////////////////////////////////
+/// @~English
+/// @brief An unknown error
+/// @~Chinese
+/// @brief 未知错误
+////////////////////////////////////////////////////////////////////////////////////////////////////
+const int ERR_UNKOWN_ERROR = -127;
+
+#endif
+
+
+/**************************************************************************************************************************
+ * 参数设置
+ ************************************************************************************************************************/
+/// TCP协议
+const int     TCP_PROTOCOL = 0;
+
+/// UDP协议
+const int     UDP_PROTOCOL = 1;
+
+/// 不广播
+const int   NOTBROADCAST = 0;
+
+/// 广播
+const int   BROADCAST = 1;
+
+
+#ifdef __cplusplus
+/// .
+extern "C"
+{
+#endif // __cplusplus
+    //*****************API function************************************************
+    //通讯
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Enumerate device names
+    ///
+    /// @param [in]    nOperationType Port type, The effective parameters are as follows:
+    ///             |Valid value|Meaning|
+    ///             |---------|---------|
+    ///             | ::PORT_USBDEVICE_CLASS     |USB Class mode|
+    ///             | ::PORT_USBDEVICE_API     |USB API mode|
+    ///             | ::PORT_SERIAL     |Serial port|
+    ///             | ::PORT_ETHERNET     |Network port|
+    ///             | ::PORT_DRIVER    |Printer driver|
+    ///             | ::PORT_BLT    |Bluetooth|
+    ///             | ::PORT_BLT_MFI    |Bluetooth MFI|
+    ///             | ::PORT_LPT    |Lpt port|
+    /// @param [out] szDeviceNameBuf The buffer of name list each name terminator with \@, This terminator is not used as the name information for the enumeration. It is only used to divide multiple name applications.Such as "BTP-L540@BTP-L520@".
+    /// @param [in]     nBufLen        Buffer size must match the name list buffer size.
+    /// @param [out] npNumber        The number of name list.
+    ///
+    /// <b>Sample code\n</b>
+    /// See details @ref EG_EnumDeviceInfo
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 枚举设备名称
+    ///
+    /// @param [in]  nOperationType 端口类型,有效参数如下:
+    ///             |有效值|含义|
+    ///             |---------|---------|
+    ///             | ::PORT_USBDEVICE_CLASS     |USB 类模式|
+    ///             | ::PORT_USBDEVICE_API     |USB API模式|
+    ///             | ::PORT_SERIAL     |串口|
+    ///             | ::PORT_ETHERNET     |网口|
+    ///             | ::PORT_DRIVER    |打印机驱动|
+    ///             | ::PORT_BLT    |蓝牙|
+    ///             | ::PORT_BLT_MFI    |蓝牙 MFI|
+    ///             | ::PORT_LPT    |并口|
+    /// @param [out] szDeviceNameBuf 名称列表缓冲区 每个名称结束符为\@,此结束符不作为枚举的名称信息,只用于划分多个名称应用。如“BTP-L540\@BTP-L520\@”。
+    /// @param [in]     nBufLen        缓冲区大小 必须与名称列表缓冲区大小一致。
+    /// @param [out] npNumber        名称列表数量。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_EnumDeviceInfo
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    int POSSDKCALL_MODE EnumDeviceInfo(int nOperationType, char *szDeviceNameBuf, int nBufLen, int *npNumber);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Initializes the device
+    ///
+    /// @param [in]    szDeviceName    Device name, According to the different printer input specific character string.
+    ///             Btp-s80 and other receipt printers use "POS", BK series unit printers use "KIOSK", BT series unit printers use "TKIOSK", BTP_M300 and other impact printers use "IMPACT".
+    ///
+    /// <b>Remark\n</b>
+    /// 1.iOS only support POS and IMPACT machine.
+    ///
+    /// @return
+    /// Success:Returns the device handle,this handle is the first parameter of the execution function interface.\n
+    /// Fail:\n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 初始化设备
+    ///
+    /// @param [in]    szDeviceName    设备名称,根据不同的打印机输入特定的字符串。
+    ///             BTP-S80等收据类打印机使用“POS”,BK系列单元类打印机使用“KIOSK”,BT系列单元类打印机使用“TKIOSK”,BTP_M300等针打打印机使用“IMPACT”。
+    ///
+    /// <b>备注\n</b>
+    /// 1、iOS只支持POS和IMPACT类设备。
+    ///
+    /// @return
+    /// 成功:返回设备句柄,此句柄为执行功能接口的第一个参数。\n
+    /// 失败:\n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    DEVICEHANDLE POSSDKCALL_MODE Init(char *szDeviceName);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Open serial port
+    ///
+    /// @param            hDev            The device handle.
+    /// @param [in]    szName            The name of serial port, such as "COM1", "COM2", "COM3", "COM4".
+    /// @param            nComBaudrate    The com baud rate. Can be these values:2400,4800,9600,19200,38400,57600,115200etc.
+    ///                             The baud rate value is related to the printer port parameters, the maximum should not exceed 256000.
+    /// @param            nComDataBits    The com data bits. Valid values are 4,5,6,7,8. The value is related to the printer port parameters.
+    /// @param            nComStopBits    The com stop bits.
+    ///             |Valid value|Actual value|
+    ///             |---------|---------|
+    ///             |0     |1|
+    ///             |1     |1.5|
+    ///             |2     |2|
+    /// @param [in]    nComParity      The parity method for the specifies serial port.\n
+    ///             |Valid value|Actual value|
+    ///             |---------|---------|
+    ///             |0     |No checkout|
+    ///             |1     |Odd parity|
+    ///             |2     |Parity checking|
+    ///             |3     |Mark inspection|
+    ///             |4     |empty-cell test|
+    /// @param [in]    nParam            The flow control mode of the specify serial port.
+    ///             |Valid value|Actual value|
+    ///             |---------|---------|
+    ///             |0     |DTR/DSR|
+    ///             |1     |RTS/CTS|
+    ///             |2     |XON/XOFF|
+    ///             |3     |NULL|
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese.
+    ///
+    /// @brief 打开串口设备
+    ///
+    /// @param [in]    hDev            设备句柄。
+    /// @param [in]    szName            串口名称,如“COM1”,“COM2”,“COM3”,“COM4”。
+    /// @param [in]    nComBaudrate    指定串口的波特率(bps)。 可以为以下值之一:
+    ///                             2400,4800,9600,19200,38400,57600,115200等。
+    ///                             具体的值与打印机的端口参数有关,不过最大不应超过256000。
+    /// @param [in]    nComDataBits    指定串口通讯时的数据位数。有效值为4、5、6、7、8。具体的值与打印机的端口参数有关。
+    /// @param [in]    nComStopBits    指定串口通讯时的数据停止位数。
+    ///             |有效值|实际值|
+    ///             |---------|---------|
+    ///             |0     |1|
+    ///             |1     |1.5|
+    ///             |2     |2|
+    /// @param [in]    nComParity      指定串口的奇偶校验方法。\n
+    ///             |有效值|实际值|
+    ///             |---------|---------|
+    ///             |0     |无校验|
+    ///             |1     |奇校验|
+    ///             |2     |偶校验|
+    ///             |3     |标志检验|
+    ///             |4     |空格检验|
+    /// @param [in]    nParam            指定串口的流控制(握手)方式、或表示通讯方式。
+    ///             |有效值|实际值|
+    ///             |---------|---------|
+    ///             |0     |DTR/DSR|
+    ///             |1     |RTS/CTS|
+    ///             |2     |XON/XOFF|
+    ///             |3     |无|
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenCOMPort(DEVICEHANDLE hDev, char *szName, int nComBaudrate, int nComDataBits, int nComStopBits, int nComParity, int nParam);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Opens lpt port device
+    ///
+    /// @param [in] hDev      Device handle.
+    /// @param [in]    szName    Lpt port name, such as:"LPT1","LPT2","LPT3".
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开字节并口设备
+    ///
+    /// @param [in]    hDev      设备句柄。
+    /// @param [in]    szName    字节并口名称,如:“LPT1”,“LPT2”,“LPT3”。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenLPTPort(DEVICEHANDLE hDev, char *szName);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    ///
+    /// @brief Opens USB API mode device
+    ///
+    /// @param    hDev         Device handle.
+    /// @param    nDeviceId    Identifier for the device.Range: must be greater than -1.
+    ///
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The identifier can be viewed by "register-HKEY_LOCAL_MACHINE--SOFTWARE--BEIYANG--PRINTERPORT"\n
+    /// 2.When nDeviceId equals -1, opens the currently connected device by default.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开USB API模式设备
+    ///
+    /// @param [in]    hDev      设备句柄。
+    /// @param [in] nDeviceId    设备内部ID号,范围:必须大于-1。
+    ///
+    ///
+    /// <b>备注\n</b>
+    /// 1、内部ID号可通过"注册表-HKEY_LOCAL_MACHINE--SOFTWARE--BEIYANG--PRINTERPORT"查看。\n
+    /// 2、此功能nDeviceId等于-1时,默认打开当前已连接的设备。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenUsbApiPort(DEVICEHANDLE hDev, int nDeviceId);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Opens USB class mode device
+    ///
+    /// @param [in] hDev    Device handle.
+    /// @param [in]    szName              The printer name, it can be viewed by device enumeration interface or computer device and printer page.
+    /// @param [in] nIsSplitStatus    Automatic status returns whether to split. When value is 1, the AutoQueryStatus interface is not available.
+    ///             |Valid value|Actual value|
+    ///             |---------|---------|
+    ///             |0     |unsplit|
+    ///             |1     |split|
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开USB 类模式设备
+    ///
+    /// @param [in]    hDev      设备句柄。
+    /// @param [in]    szName              打印机名称,可通过枚举设备接口查看或者电脑的设备和打印机页面。
+    /// @param [in] nIsSplitStatus    自动状态返回是否拆分。当取值为1时,AutoQueryStatus 接口无法使用。
+    ///             |有效值|实际值|
+    ///             |---------|---------|
+    ///             |0     |不拆分|
+    ///             |1     |拆分|
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenUsbClassPort(DEVICEHANDLE hDev, char *szName, int nIsSplitStatus);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens net port device(by enumeration of device names)
+    ///
+    /// @param [in]    hDev      Device handle.
+    /// @param [in,out]    szName    Enumeration of device names.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 打开网口设备(通过枚举的设备名称)
+    ///
+    /// @param [in]    hDev      设备句柄。
+    /// @param [in]    szName    枚举的设备名称。
+    ///
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenNetPortByName(DEVICEHANDLE hDev, char *szName);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens net port device(by IP address)
+    ///
+    /// @param [in] hDev             Device handle.
+    /// @param [in]    szNetIP             The IP address of Device, such as:"192.168.1.251".
+    /// @param [in] nPort             The port, such as :"9100".
+    /// @param [in]    nProtocalType    Type of the protocal, 0:TCP,1:UDP.
+    /// @param [in]    nBroadcast       0:Don't broadcast, 1:Broadcast.
+    ///
+    /// <b>Remark\n</b>
+    /// This interface supports JK-E02,JK-E04,JK-E05,JK-W01,JK-W03 network board.\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 打开网口设备(通过IP地址)
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [in]    szNetIP             设备IP地址,如:“192.168.1.251”。
+    /// @param [in]    nPort             设备端口号,如:“9100”。
+    /// @param [in]    nProtocalType    协议类型,0:TCP,1:UDP。
+    /// @param [in]    nBroadcast       0:不广播,1;广播。
+    ///
+    /// <b>备注\n</b>
+    /// 此接口支持JK-E02、JK-E04、JK-E05、JK-W01、JK-W03网口板。\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenNetPort(DEVICEHANDLE hDev, char *szNetIP, int nPort, int nProtocalType, int nBroadcast);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens blue tooth port device(by enumeration of device names)
+    ///
+    /// @param [in]    hDev      Device handle.
+    /// @param [in,] szName    Enumeration of device names.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开蓝牙设备(通过枚举的设备名称)
+    ///
+    /// @param [in]    hDev      设备句柄。
+    /// @param [in]    szName    枚举的设备名称。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenBlueToothPortByName(DEVICEHANDLE hDev, char *szName);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens blue tooth port device(by MAC address)
+    ///
+    /// @param [in]    hDev            Device handle.
+    /// @param [in]    szMACAddress    Device MAC address, such as:"00:15:5:81:DF:F4:5B".
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开蓝牙设备(通过MAC地址)
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [in]    szMACAddress    设备MAC地址,如:“00:15:81:DF:F4:5B”。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenBlueToothPort(DEVICEHANDLE hDev, char *szMACAddress);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens blue tooth MFI port device(by MAC address)
+    ///
+    /// @param [in]    hDev            Device handle.
+    /// @param [in]    szMACAddress    Device MAC address.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开蓝牙设备(通过MAC地址)
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [in] szMACAddress     设备MAC地址。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenBlueToothPortMFI(DEVICEHANDLE hDev, char *szMACAddress);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Opens printer driver port
+    ///
+    /// @param [in] hDev      Device handle.
+    /// @param [in]    szName    The name of the installed printer name, it same as the device and printer in the control panel,such as:"BTP-S80(U)1".
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打开打印机驱动端口
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in]    szName    已经安装的打印机驱动名称,与控制面板中的设备和打印机名称一致,例如:"BTP-S80(U)1"。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE OpenDriverPort(DEVICEHANDLE hDev, char *szName);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Closes open ports
+    ///
+    /// @param [in] hDev    Device handle.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 关闭已打开的端口
+    ///
+    /// @param [in] hDev 设备句柄。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE ClosePort(DEVICEHANDLE hDev);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Sends a port data
+    ///
+    /// @param [in]    hDev           Port handle.
+    /// @param [in]    szData           Data buffer to be sent.
+    /// @param [in]    nDataLength    The number of bytes of data to be sent.
+    /// @param [out] npReturnLen    The number of bytes actually sent.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 发送数据
+    ///
+    /// @param [in]    hDev           端口句柄。
+    /// @param [in]    szData           将要发送的数据缓冲区。
+    /// @param [in]    nDataLength    将要发送的数据的字节数。
+    /// @param [out] npReturnLen    实际下发的字节数。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SendPortData(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///  @~English
+    /// @brief Reads data from the device to the specified buffer
+    ///
+    /// @param [in]    hDev           Port handle.
+    /// @param [in]    szData           Data buffer to be read.
+    /// @param [in] nDataLength    The number of bytes of data to be read.
+    /// @param [in]    npReturnLen    The number of bytes actually read.
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The number of bytes read by the USB port must be greater than the number of bytes actually read.\n
+    /// 2.Driver port does not support this feature.\n
+    /// 3.In the case of reading windows serial port contents, nDataLength can not larger than the data length in the serial port buffer,set nDataLength to 0 to read out all the data in the serial port buffer.\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 从设备读取数据到指定的缓冲区
+    ///
+    /// @param [in]    hDev           端口句柄。
+    /// @param [in]    szData           将要读取的数据缓冲区。
+    /// @param [in]    nDataLength    将要读取的数据的字节数。
+    /// @param [in]    npReturnLen    实际读取的数据的字节数。
+    ///
+    /// <b>备注\n</b>
+    /// 1、USB口的读取字节数必须大于实际读取的字节数。\n
+    /// 2、驱动接口不支持此功能。\n
+    /// 3、读取Winodws串口内容的情况下,参数nDataLength不能大于串口缓冲区内数据长度,将nDataLength设为0可以把串口缓冲区内所有数据读出。\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE ReadPortData(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///  @~English
+    /// @brief Sets read and write timeout
+    ///
+    /// @param [in] hDev             Device handle.
+    /// @param [in] nWriteTimeout    The write timeout, unit:ms, default setting:5000ms.
+    /// @param [in] nReadTimeout     The read timeout, unit:ms, default setting:3000ms.
+    ///
+    ///  <b>Remark\n</b>
+    /// 1.Driver port does not support this feature.\n
+    /// 2.The default parameter is -1, set the last read or write data timeout.\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// ::ERR_NOT_SUPPORT    --@copybrief ::ERR_NOT_SUPPORT \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置读写超时时间
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [in] nWriteTimeout    读数据的超时时间,单位:ms,默认设置为5000ms。
+    /// @param [in] nReadTimeout     写数据的超时时间,单位:ms,默认设置为3000ms。
+    ///
+    ///  <b>备注\n</b>
+    /// 1、驱动接口不支持此功能。\n
+    /// 2、缺省参数-1,设置上一次的读或写数据超时时间。\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// ::ERR_NOT_SUPPORT    --@copybrief ::ERR_NOT_SUPPORT \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetPortTimeout(DEVICEHANDLE hDev, int nWriteTimeout, int nReadTimeout);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///  @~English
+    /// @brief Gets the read and write timeout
+    ///
+    /// @param [in] hDev             Device handle.
+    /// @param [out] nWriteTimeout    Write data timeout,Unit: ms.
+    /// @param [out] nReadTimeout     Read data timeout,Unit: ms.
+    ///
+    /// @return    A POSSDKCALL_MODE.
+    ///
+    ///  <b>Remark\n</b>
+    /// 1.The driver interface does not support this function.\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// ::ERR_NOT_SUPPORT    --@copybrief ::ERR_NOT_SUPPORT \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 获取读写超时时间
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [out] nWriteTimeout      写数据的超时时间,单位:ms。
+    /// @param [out] nReadTimeout         读数据的超时时间,单位:ms。
+    ///
+    ///  <b>备注\n</b>
+    /// 1、驱动接口不支持此功能。\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// ::ERR_NOT_SUPPORT    --@copybrief ::ERR_NOT_SUPPORT \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE GetPortTimeout(DEVICEHANDLE hDev, int *nWriteTimeout, int *nReadTimeout);
+    
+    // 位图
+    //
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///  @~English
+    /// @brief Print bitmap
+    /// @param [in]    hDev       Device handle.
+    /// @param [in]    szFilePath      Points to a null string representing the image path and its file name, or to standard bitmap data. This image only supports 1-bit / 8-bit / 24-bit images.
+    /// @param [in]    nStartX    The distance (point/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY    Specifies the distance (point/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nType      Printed bitmap effect.
+    ///                     Valid values | Meaning
+    ///                     -------|---------------------------
+    ///                     0      | Grayscale printing (clearest, but with large data volume and slow printing)
+    ///                     1      | Dither printing (relatively clear, recommended)
+    ///                     2      | Briary printing (the effect is poorer,Monochrome image are recommended) \n
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBitmapExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.IMPACT class printers do not support nType 0 or 2.\n
+    /// 2.When nType is equal to 1, only partial POS printers that support grayscale printing instructions are supported.\n
+    /// 3.Linux only supports JPG, PNG, BMP images.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 打印位图
+    /// @param [in] hDev       设备句柄。
+    /// @param [in] szFilePath      指向以 null 结尾的表示图片路径及其文件名的字符串或标准的位图数据。该图片只支持1位/8位/24位图片。
+    /// @param [in] nStartX    指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY    指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in] nType      打印的位图效果。
+    ///                     有效值 | 含义
+    ///                     -------|---------------------------
+    ///                     0      | 灰度打印(最清晰,但数据量大,打印慢)
+    ///                     1      | 抖动打印(比较清晰,建议使用)
+    ///                     2      | 二值化打印(效果较差,建议单色图片打印使用)  \n
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBitmapExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、此功能IMPACT类打印机不支持nType等于0或2。\n
+    /// 2、此功能nType等于1时,仅部分支持灰度打印指令的POS类打印机支持。\n
+    /// 3、Linux仅支持JPG、PNG、BMP格式图片。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintBitmap(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nType);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Print monochrome bitmap (support for enlargement)
+    ///
+    /// @param [in]    hDev          Device handle.
+    /// @param [in]    szFilePath    Points to a null-terminated string representing the image path and its file name, or to standard 1-bit bitmap data. This image only supports 1 bit depth images.
+    /// @param [in]    nStartX       The distance (point/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points
+    /// @param [in]    nStartY       Specifies the distance (point/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nMode          Print mode for bitmaps.
+    ///             Valid values|Meaning
+    ///           -----------|-------------
+    ///             0       | 8 point single density
+    ///             1       | 8 point double density
+    ///             2       | 24 point sigle density
+    ///             3       | 24 point sigle density
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBitmapExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.IMPACT printers do not support nMode equals 2 or 3.\n.
+    /// 2.Linux only supports JPG, PNG, BMP images.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打印单色位图(支持放大)
+    ///
+    /// @param [in] hDev          设备句柄。
+    /// @param [in]    szFilePath    指向以 null 结尾的表示图片路径及其文件名的字符串或标准的1位位图数据。该图片只支持1位深度图片。
+    /// @param [in] nStartX       指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY       指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nMode          位图的打印模式。
+    ///             有效值  | 含义
+    ///           -----------|-------------
+    ///             0       | 8点单密度
+    ///             1       | 8点双密度
+    ///             2       | 24点单密度
+    ///             3       | 24点双密度
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBitmapExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、此功能IMPACT类打印机不支持nMode等于2或3。\n
+    /// 2、Linux仅支持JPG、PNG、BMP格式图片。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintBitmapByMode(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Print TrueType fonts
+    ///
+    /// @param [in]    hDev           Device handle.
+    /// @param [in]    szText           Null-terminated string buffers.
+    /// @param [in]    nStartX           The distance (point/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY           Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    szFontName     Font name, and valid values are Windows system fonts, such as "song type", "Calibri".
+    /// @param [in]    nFontHeight    Font height, effective range is greater than 0, please choose the appropriate font size.
+    /// @param [in]    nFontWidth     Font width, effective range is greater than 0, please choose the appropriate font size.
+    /// @param [in]    nBold           Bold, 0: no bold; 1: bold.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.This function is not supported by IMPACT printers.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    --    @copybrief ::ERR_FILE    \n
+    ///
+    /// @~Chinese
+    /// @brief 打印TrueType字体
+    ///
+    /// @param [in] hDev           设备句柄。
+    /// @param [in]    szText           以 null 结尾的字符串缓冲区。
+    /// @param [in]    nStartX           指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY           指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    szFontName     字体名称,有效值为Windows系统字体,如"宋体"、"Calibri"。
+    /// @param [in]    nFontHeight    字体高度,有效范围为大于0,请根据具体字体选择适合的字号。
+    /// @param [in]    nFontWidth     字体宽度,有效范围为大于0,请根据具体字体选择适合的字号。
+    /// @param [in]    nBold           加粗,0:不加粗;1:加粗。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、此功能IMPACT类打印机不支持。
+    ///    2、iOS系统下,nFontWidth参数实际意义为字体大小,nFontHeight参数无实际意义,nBold参数无实际意义,字体名称对应有是否加粗。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    --    @copybrief ::ERR_FILE    \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintTrueType(DEVICEHANDLE hDev, char *szText, int nStartX, int nStartY, char *szFontName, int nFontHeight, int nFontWidth, int nBold);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Predownload a bitmap to the RAM of the printer and specify the ID number of the bitmap
+    ///
+    /// @param [in] hDev          Device handle.
+    /// @param [in]    szFilePath    Points to a null string representing the image path and its file name, or to standard bitmap data.
+    /// @param [in] nImageID      Specifies the ID number of the bitmap to be downloaded. Valid values are 0-7.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_RAMExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.The bitmap size to be downloaded should not exceed 900 square millimeters (approximately 240 dots by 240 dots).\n
+    ///    2.Bitmaps must be monochrome.\n
+    ///    3.The available RAM space inside a typical printer is 8K bytes.\n
+    ///    4.Bitmap ID number does not require consistent.\n
+    ///    5.Bitmaps downloaded into RAM will not be saved after power off.\n
+    ///    6.This function, IMPACT printer, is not supported.\n
+    ///    7.Linux only supports JPG, PNG, BMP images.\n
+    ///    8.Non-monochrome images will be dithered and downloaded.\n
+    ///    9.This image only supports 1-bit / 8-bit / 24-bit images.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ///
+    /// @~Chinese
+    /// @brief 预下载一幅位图到打印机的 RAM 中,同时指定此位图的 ID 号
+    ///
+    /// @param [in]    hDev          设备句柄。
+    /// @param [in]    szFilePath    指向以 null 结尾的表示图片路径及其文件名的字符串或标准的位图数据。
+    /// @param [in]    nImageID      指定将要下载的位图的 ID 号。有效值为0 - 7。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_RAMExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、将要下载的位图大小不能超过 900 平方毫米 (大约为 240点 × 240 点)。\n
+    ///    2、位图必须是单色的。\n
+    ///    3、一般打印机内部的可用 RAM 空间为 8K 字节。\n
+    ///    4、位图的 ID 号不要求是连续的。\n
+    ///    5、下载到RAM中的位图在打印机关电后不被保存。\n
+    ///    6、此功能IMPACT类打印机不支持。\n
+    ///    7、Linux仅支持JPG、PNG、BMP格式图片。\n
+    ///    8、非单色位图会进行抖动处理后下载。\n
+    ///    9、仅支持1位/8位/24位深图片。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE DownloadRAMBitmapByFile(DEVICEHANDLE hDev, char *szFilePath, int nImageID);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Print the bitmap that has been downloaded to RAM
+    ///
+    /// @param [in]    hDev        Device handle.
+    /// @param [in]    nImageID    The ID number of the bitmap downloaded. Valid values are 0-7.
+    /// @param [in]    nStartX     The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY     Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nMode       Specifies the print mode for the bitmap. Can be one of the values listed in the following list:
+    ///              Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Normal
+    ///             1     | Times as wide
+    ///             2     | Times as high
+    ///             3     | Times as wide and times as high
+    ///
+    /// <b>The sample code\n</b>
+    ///  See details @ref EG_RAMExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.This function is not supported by IMPACT printers.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 打印已经下载到 RAM 中的位图
+    ///
+    /// @param [in] hDev        设备句柄。
+    /// @param [in] nImageID    下载的位图的 ID 号。有效值为0 - 7。
+    /// @param [in] nStartX     指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY     指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in] nMode       指定位图的打印模式。可以为以下列表中所列值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 正常
+    ///             1     | 倍宽
+    ///             2     | 倍高
+    ///             3     | 倍宽且倍高
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_RAMExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、此功能IMPACT类打印机不支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintRAMBitmap(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Predownload one or more bitmaps to the printer's Flash
+    ///
+    /// @param [in]    hDev          Device handle.
+    /// @param [in]    szFilePath    Points to an array of strings containing file paths and their names for several bitmaps.
+    /// @param [in] nImageID      Specifies the number of bitmaps to be downloaded. The valid range is 1-255.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_FlashExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.The data size of each bitmap cannot exceed 8K bytes (approximately 256 x 256 points).\n
+    ///    2.Non-monochrome images will be dithered and downloaded.\n
+    ///    3.The number of images downloaded into Flash is related to the number and order of bitmaps. Bitmaps are downloaded in the same order as file names in the array, and are sequential. For example, the first bitmap number is 1, the second bitmap number is 2, and so on.\n
+    ///    4.Each download will clear the bitmap from the last download to Flash.\n
+    ///    5.It will not be cleaned when the power is turned off.\n
+    ///    6.The amount of Flash available inside a printer depends on the type of printer.\n
+    ///    7.The bitmaps downloaded into FLASH are saved after the printer turns off the power.\n
+    ///    8.Linux only supports JPG, PNG, BMP images.\n
+    ///    9.This image only supports 1-bit / 8-bit / 24-bit images.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ///
+    /// @~Chinese
+    /// @brief 预下载一幅或若干幅位图到打印机的 Flash 中
+    ///
+    /// @param [in] hDev          设备句柄。
+    /// @param [in] szFilePath    指向包含若干位图的文件路径及其名称的字符串数组。
+    /// @param [in] nImageCount      指定将要下载的位图幅数。有效范围为1-255。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_FlashExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、每幅位图的数据大小不能超过 8K 字节(大约为 256 点 × 256 点)。\n
+    ///    2、非单色位图会进行抖动处理后下载。\n
+    ///    3、下载到 Flash 中的图片的图号与位图的个数和排列顺序相关。位图的下载顺序和文件名在数组中的顺序一致,是连续的。如:第一个位图的图号为 1,第二个为 2,以此类推。\n
+    ///    4、每次下载都会把上次下载到 Flash 中的位图都清除。\n
+    ///    5、关电后不会被清除。\n
+    ///    6、打印机内部Flash 的可使用空间与具体打印机型号有关。\n
+    ///    7、下载到FLASH中的位图在打印机关电后仍然被保存。\n
+    ///    8、Linux仅支持JPG、PNG、BMP格式图片。\n
+    ///    9、仅支持1位/8位/24位深图片。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_BITMAP_INVAILD    -- @copybrief ::ERR_BITMAP_INVAILD \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE DownloadFlashBitmapByFile(DEVICEHANDLE hDev, char *szFilePath[], int nImageCount);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Print the bitmap that has been downloaded into Flash
+    ///
+    /// @param [in]    hDev        Device handle.
+    /// @param [in]    nImageID    Specifies the bitmap ID number. The valid range is 1-255.
+    /// @param [in]    nStartX     The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY     Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nMode       Specifies the print mode for the bitmap. Can be one of the values listed in the following list:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Normal
+    ///             1     | Times as wide
+    ///             2     | Times as high
+    ///             3     | Times as wide and times as high
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_FlashExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 打印已经下载到 Flash 中的位图
+    ///
+    /// @param [in] hDev        设备端口。
+    /// @param [in] nImageID    指定位图ID号。有效范围为1-255。
+    /// @param [in] nStartX     指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY     指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in] nMode       指定位图的打印模式。可以为以下列表中所列值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 正常
+    ///             1     | 倍宽
+    ///             2     | 倍高
+    ///             3     | 倍宽且倍高
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_FlashExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintFlashBitmap(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set and print barcode
+    ///
+    /// @param [in]    hDev                Device handle.
+    /// @param [in]    szDataBuffer        Points to a null-terminated string. The range and format allowed per character depends on the specific barcode type.
+    /// @param [in] nStartX                The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY                Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nType                Specifies the type of barcode. Can be one of the values listed in the following list:
+    ///               Valid values | Meaning
+    ///             ---------|----------------
+    ///             65     | UPC-A
+    ///             66     | UPC-C
+    ///             67     | JAN13(EAN13)
+    ///             68     | JAN8(EAN8)
+    ///             69     | CODE39
+    ///             70     | INTERLEAVED 2 OF 5
+    ///             71     | CODEBAR
+    ///             72     | CODE 93
+    ///             73     | CODE 128
+    /// @param [in]    nBasicWidth            Specifies the number of base element widths of the bar code. \n ranges from 1 to 6 points.
+    /// @param [in]    nHeight                Specifies the height of the bar code (dot/mm). \n valid range is 1-255 points.
+    /// @param [in]    nHriFontType        Specify the type of font for HRI (Human Readable Interpretation) characters. Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Standard ASCII
+    ///             1     | Compression ASCII
+    /// @param [in]    nHriFontPosition    Specify the location of the HRI (Human Readable Interpretation) characters. Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Don't print
+    ///             1     | Print above barcode only
+    ///             2     | Print below the barcode only
+    ///             3     | Print above and below the barcode
+    /// @param [in]    nBytesToPrint       Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b> Remark\n </b>
+    ///    1.In page mode, this function does not print the barcode immediately, until the call function ::PageModePrint.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印条码
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。每个字符允许的范围和格式与具体条码类型有关。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nType                  指定条码的类型。可以为以下列表中所列值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             65     | UPC-A
+    ///             66     | UPC-C
+    ///             67     | JAN13(EAN13)
+    ///             68     | JAN8(EAN8)
+    ///             69     | CODE39
+    ///             70     | INTERLEAVED 2 OF 5
+    ///             71     | CODEBAR
+    ///             72     | CODE 93
+    ///             73     | CODE 128
+    /// @param [in]    nBasicWidth          指定条码的基本元素宽度点数。\n取值范围 1 - 6 点。
+    /// @param [in]    nHeight              指定条码的高度(点/毫米)。\n 有效范围为 1 - 255 点。
+    /// @param [in]    nHriFontType          指定 HRI(Human Readable Interpretation)字符的字体类型。可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 标准ASCII
+    ///             1     | 压缩ASCII
+    /// @param [in]    nHriFontPosition      指定HRI(Human Readable Interpretation)字符的位置。可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 不打印
+    ///             1     | 只在条码上方打印
+    ///             2     | 只在条码下方打印
+    ///             3     | 条码上、下方都打印
+    /// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串长度,即将要发送给打印机的字符总数,不可大于szDataBuffer有效数据长度。具体值与条码类型有关。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b> 备注\n </b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数  ::PageModePrint时才打印。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintBarcode(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nBasicWidth, int nHeight, int nHriFontType, int nHriFontPosition, int nBytesToPrint);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set and print barcode (simple interface)
+    ///
+    /// @param [in]    hDev                Device handle.
+    /// @param [in]    szDataBuffer        Points to a null-terminated string. The range and format allowed per character depends on the specific barcode type.
+    /// @param [in]    nStartX                The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY                Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nType                Specifies the type of barcode. Can be one of the values listed in the following list:
+    ///               Valid values | Meaning
+    ///             ---------|----------------
+    ///             65     | UPC-A
+    ///             66     | UPC-C
+    ///             67     | JAN13(EAN13)
+    ///             68     | JAN8(EAN8)
+    ///             69     | CODE39
+    ///             70     | INTERLEAVED 2 OF 5
+    ///             71     | CODEBAR
+    ///             72     | CODE 93
+    ///             73     | CODE 128
+    /// @param [in]    nWidth                Specifies the width of the barcode (dot/mm).
+    /// @param [in]    nHeight                Specifies the height of the bar code (dot/mm). \n Valid range is 1-255 points.
+    /// @param [in]    nHriFontPosition    Specify the location of the HRI (Human Readable) characters. Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Don't print
+    ///             1     | Print above barcode only
+    ///             2     | Print below the barcode only
+    ///             3     | Print above and below the barcode
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not print the barcode immediately,until the PageModePrint function is called.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印条码(简易接口)
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。每个字符允许的范围和格式与具体条码类型有关。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nType                  指定条码的类型。可以为以下列表中所列值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             65     | UPC-A
+    ///             66     | UPC-C
+    ///             67     | JAN13(EAN13)
+    ///             68     | JAN8(EAN8)
+    ///             69     | CODE39
+    ///             70     | INTERLEAVED 2 OF 5
+    ///             71     | CODEBAR
+    ///             72     | CODE 93
+    ///             73     | CODE 128
+    /// @param [in]    nWidth              指定条码的宽度(点/毫米)。
+    /// @param [in]    nHeight              指定条码的高度(点/毫米)。\n 有效范围为 1 - 255 点。
+    /// @param [in]    nHriFontPosition      指定HRI(Human Readable Interpretation)字符的位置。可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 不打印
+    ///             1     | 只在条码上方打印
+    ///             2     | 只在条码下方打印
+    ///             3     | 条码上、下方都打印
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintBarcodeSimple(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nWidth, int nHeight, int nHriFontPosition);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set and print the QR code
+    ///
+    /// @param [in] hDev             Devcie handle.
+    /// @param [in]    szDataBuffer     Points to a null-terminated string.
+    /// @param [in]    nStartX             The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY             Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+    /// @param [in]    nBasicWidth      Specifies the number of base element widths of the bar code. \n valid range is 1-10 points.
+    /// @param [in]    nSymbolType      Symbol type. The effective range of \n is 1-2. \n 1: for primitive type 2: for enhanced type (recommended).
+    /// @param [in]    nLanguageMode    The language mode.\n valid range is 0-1. \n 0: for Chinese 1: for Japanese
+    /// @param [in]    nErrorCorrect    QR code error correction level. \n valid range is 0-3. \n 0: represents L level, 1 represents M level, 2 represents Q level, 3 represents H level.
+    /// @param [in]    nBytesToPrint    Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+    ///    2.This feature is only supported by POS class printers.
+	///	3.Please ensure that the szDataBuffer within the length of the nBytesToPrint parameter is valid data, otherwise it may cause a crash.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印QR码
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nBasicWidth          指定条码的基本元素宽度点数。\n 有效范围为 1 - 10 点。
+    /// @param [in]    nSymbolType          符号类型。\n 有效范围为 1 - 2。\n 1:表示原始类型  2: 表示增强类型(推荐使用)。
+    /// @param [in]    nLanguageMode          语言模式。\n 有效范围为 0 - 1。\n 0:表示汉字  1: 表示日文。
+    /// @param [in]    nErrorCorrect          QR码纠错等级。\n 有效范围为 0 - 3。\n 0:代表L级别  1代表M级别  2代表Q级别  3代表H级别。
+    /// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串个数,即将要发送给打印机的字符总数。\n 有效范围为 1 - 252且不可大于szDataBuffer有效数据长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+    ///    2、此功能针打类(IMPACT)打印机不支持。\n
+	///	3、请确保nBytesToPrint参数长度内szDataBuffer均为有效数据,否则可能引发崩溃。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodePrintQR(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nSymbolType, int nLanguageMode, int nErrorCorrect, int nBytesToPrint);
+
+	////////////////////////////////////////////////////////////////////////////////////////////////////
+	/// @~English
+	///
+	/// @brief Set and print the QR code
+	///
+	/// @param [in] hDev             Devcie handle.
+	/// @param [in]    szDataBuffer     Points to a null-terminated string.
+	/// @param [in]    nStartX             The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+	/// @param [in]    nStartY             Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed as "-1" when printed in standard mode (line mode).
+	/// @param [in]    nBasicWidth      Specifies the number of base element widths of the bar code. \n valid range is 1-16 points.
+	/// @param [in]    nErrorCorrect    QR code error correction level. \n valid range is 0-3. \n 0: represents L level, 1 represents M level, 2 represents Q level, 3 represents H level.
+	/// @param [in]    nBytesToPrint    Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+	///
+	/// <b>The sample code\n</b>
+	/// See details @ref EG_PrintBarcodeExample
+	///
+	/// <b>Remark\n</b>
+	///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+	///    2.This feature is not supported by the IMPACT class printer.\n
+	///	3.Please ensure that the szDataBuffer within the length of the nBytesToPrint parameter is valid data, otherwise it may cause a crash.
+	/// @return
+	/// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+	/// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+	/// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+	/// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+	/// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+	/// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+	///
+	/// @~Chinese
+	///
+	/// @brief 设置并打印QR码
+	///
+	/// @param [in]    hDev                  设备句柄。
+	/// @param [in]    szDataBuffer          指向以 null 结尾的字符串。
+	/// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+	/// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+	/// @param [in]    nBasicWidth          指定条码的基本元素宽度点数。\n 有效范围为 1 - 16 点。
+	/// @param [in]    nErrorCorrect          QR码纠错等级。\n 有效范围为 0 - 3。\n 0:代表L级别  1代表M级别  2代表Q级别  3代表H级别。
+	/// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串个数,即将要发送给打印机的字符总数。\n 有效范围为 1 - 7089且不可大于szDataBuffer有效数据长度。
+	///
+	/// <b>示例代码\n</b>
+	/// 详见 @ref EG_PrintBarcodeExample
+	///
+	/// <b>备注\n</b>
+	///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+	///    2、此功能仅POS类打印机支持。\n
+	///	3、请确保nBytesToPrint参数长度内szDataBuffer均为有效数据,否则可能引发崩溃。
+	/// @return
+	/// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+	/// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+	/// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+	/// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+	/// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+	/// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+	////////////////////////////////////////////////////////////////////////////////////////////////////
+
+	int POSSDKCALL_MODE BarcodePrintQREx(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nErrorCorrect, int nBytesToPrint);
+
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set and print PDF417
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    szDataBuffer          Points to a null-terminated string.
+    /// @param [in]    nStartX              The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY              Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in]    nBasicWidth          Specifies the number of base element widths of the bar code. \n valid range is 1-7 points.
+    /// @param [in]    nHeight              Specifies the height number of bar code elements. \n effective range is 2-25 points.
+    /// @param [in]    nLines              Specifies the number of lines in the barcode. \n valid range is 3-90.
+    /// @param [in]    nColumns              Specifies the number of columns of the barcode. \n valid range is 1-30.
+    /// @param [in]    nScaleH              Specifies the bar code appearance ratio height. The effective range of \n is 1-10.
+    /// @param [in]    nScaleV              Specifies the bar code appearance ratio width. \n valid range is 1-100.
+    /// @param [in]    nErrorCorrect          Specify bar code error correction level. \n effective range is 0-8.
+    /// @param [in]    nBytesToPrint         Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+    ///    2.This feature is not supported by the IMPACT class printer.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印PDF417码
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nBasicWidth          指定条码的基本元素宽度点数。\n 有效范围为 1 - 7 点。
+    /// @param [in]    nHeight              指定条码元素高度点数。\n 有效范围为 2 - 25 点。
+    /// @param [in]    nLines              指定条码的行数。\n 有效范围为 3 - 90。
+    /// @param [in]    nColumns              指定条码的列数。\n 有效范围为 1 - 30。
+    /// @param [in]    nScaleH              指定条码外观比高度。\n 有效范围为 1 - 10。
+    /// @param [in]    nScaleV              指定条码外观比宽度。\n 有效范围为 1 - 100。
+    /// @param [in]    nErrorCorrect          指定条码纠错级别。\n 有效范围为 0 - 8。
+    /// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串个数,即将要发送给打印机的字符总数,不可大于szDataBuffer有效数据长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+    ///    2、此功能IMPACT类打印机不支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodePrintPDF417(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nHeight, int nLines, int nColumns, int nScaleH, int nScaleV, int nCorrectGrade, int nBytesToPrint);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set and print PDF417 (simple interface)
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    szDataBuffer          Points to a null-terminated string.
+    /// @param [in]    nStartX              The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY              Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in]    nWidth              Specifies the width of the bar code (dot/mm).
+    /// @param [in]    nHeight              Specifies height of bar code element (dot/mm). \n effective range is 2-25 points.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+    ///    2.This feature is not supported by the IMPACT class printer.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印PDF417码(简易接口)
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nWidth              指定条码的宽度(点/毫米)。
+    /// @param [in]    nHeight              指定条码元素高度(点/毫米)。\n 有效范围为 2 - 25 点。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+    ///    2、此功能IMPACT类打印机不支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodePrintPDF417Simple(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nWidth, int nHeight);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set up and print the Maxicode barcode
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    szDataBuffer          Points to a null-terminated string.
+    /// @param [in]    nStartX              The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY              Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in]    nBytesToPrint         Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+    ///    2.This feature is only supported by POS class printers.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印Maxicode条码
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串个数,即将要发送给打印机的字符总数,不可大于szDataBuffer有效数据长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+    ///    2、此功能仅POS类打印机支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodePrintMaxicode(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBytesToPrint);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set and print the GS1 barcode
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    szDataBuffer          Points to a null-terminated string. The range and format allowed per character depends on the specific barcode type.
+    /// @param [in]    nStartX              The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in]    nStartY              Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in]    nBarcodeType          Specify barcode GS1 type and character set. \n valid range is 1-7.
+    /// @param [in]    nBasicWidth          Specifies the number of base element widths of the bar code. \n effective range is 1-6 points.
+    /// @param [in]    nHeight              Specifies the height of the bar code (dot/mm). \n effective range is 2-250 points.
+    /// @param [in]    nSegmentNum          Specifies the number of segments in each line of the barcode symbol. \n valid range is 2-20.
+    /// @param [in]    nSeparatorHeight      Specifies the number of height points for the delimiter. \n valid range is 1-10 points.
+    /// @param [in]    nBasicHeight          Specifies the number of base elements height of the bar code. \n valid range is 1-10 points.
+    /// @param [in]    nHRI                  Specify the type of font for HRI (Human Readable Interpretation) characters. The effective range of \n is 1-4.
+    /// @param [in]    nAI                  Specifies whether the bar code is applied to AI (application identifier). \n valid range is 0-1. \n 0 means do not apply AI 1 means apply.
+    /// @param [in]    nBytesToPrint         Total number of characters sent to the printer. No more than the length of szDataBuffer valid data.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintBarcodeExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In page mode, this function does not immediately print the bar code, until the call function PageModePrint to print.\n
+    ///    2.This feature is only supported by POS class printers.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置并打印GS1条码
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szDataBuffer          指向以 null 结尾的字符串。每个字符允许的范围和格式与具体条码类型有关。
+    /// @param [in]    nStartX              指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nStartY              指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nBarcodeType          指定条码GS1类型及字符集。\n 有效范围为 1 - 7。
+    /// @param [in]    nBasicWidth          指定条码的基本元素宽度点数。\n 有效范围为 1 - 6 点。
+    /// @param [in]    nHeight              指定条码的高度(点/毫米)。\n 有效范围为 2 - 250 点。
+    /// @param [in]    nSegmentNum          指定条码每行条码符号的段数。\n 有效范围为 2 - 20。
+    /// @param [in]    nSeparatorHeight      指定分隔符的高度点数。\n 有效范围为 1 - 10 点。
+    /// @param [in]    nBasicHeight          指定条码的基本元素高度点数。\n 有效范围为 1 - 10 点。
+    /// @param [in]    nHRI                  指定 HRI(Human Readable Interpretation)字符的字体类型。\n 有效范围为 1 - 4。
+    /// @param [in]    nAI                  指定条码是否应用AI(应用标识符)。\n 有效范围为 0 - 1。\n 0表示不应用AI  1表示应用。
+    /// @param [in]    nBytesToPrint         指定由参数 szDataBuffer指向的字符串个数,即将要发送给打印机的字符总数,不可大于szDataBuffer有效数据长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintBarcodeExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在页模式下,此函数并不立即打印条码,而是一直到调用函数PageModePrint时才打印。\n
+    ///    2、此功能仅POS类打印机支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodePrintGS1DataBar(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBarcodeType, int nBasicWidth, int nHeight, int nSegmentNum, int nSeparatorHeight, int nBasicHeight, int nHRI, int nAI, int nBytesToPrint);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Barcode reserve function
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nInstructionName     Reserve parameter 1.
+    /// @param [in] nPara1                 Reserve parameter 2.
+    /// @param [in] szPara2             Reserve parameter 3.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 条码预留接口
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nInstructionName     预留参数1。
+    /// @param [in] nPara1                 预留参数2。
+    /// @param [in] szPara2             预留参数3。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BarcodeReserveFunction(DEVICEHANDLE hDev, int nInstructionsName, int nPara1, char *szPara2);
+    
+    // 文本
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Feed line
+    ///
+    /// @param [in] hDev Device handle.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 换行
+    ///
+    /// @param [in] hDev 设备句柄。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE FeedLine(DEVICEHANDLE hDev);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief The string data to be printed is sent to the print buffer
+    ///
+    /// @param [in]    hDev          Device handle\n
+    /// @param [in]    szTextData    Points to a null-terminated string buffer.\n
+    /// @param [in] nStartX     The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.\n
+    /// @param [in] nStartY     Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).\n
+    ///
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.This function does not immediately print the incoming string, until the FeedLine function is called. However, if the string passed in is already larger than the printable width, the paper is automatically fed and printed.\n
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 将要打印的字符串数据发送到打印缓冲区
+    ///
+    /// @param [in]    hDev          设备句柄。\n
+    /// @param [in]    szTextData    指向以 null 结尾的字符串缓冲区。\n
+    /// @param [in] nStartX     指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。\n
+    /// @param [in] nStartY     指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。\n
+    ///
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、此函数并不立即打印传入的字符串,而是一直到调用函数 FeedLine 时才进行实际的进纸并打印的动作。但是,如果传入的字符串已经大于可打印宽度时,那么会自动进纸并打印。\n
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintTextOut(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief The string data to be printed is sent to the print buffer(support for amplification)
+    ///
+    /// @param [in] hDev            Device handle
+    /// @param [in] szTextData      Points to a null-terminated string buffer.
+    /// @param [in] nStartX         The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.
+    /// @param [in] nStartY         Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in] nWidthTimes     Horizontal magnification, effective range 1-6.
+    /// @param [in] nHeightTimes    Vertical magnification, effective range 1-6.
+    /// @param [in] nFontType       Specifies the font type for the character. Can be one of the values listed in the following list:\n
+    ///                  Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Standard ASCII
+    ///             1     | Compression ASCII
+    ///             2     | User-defined characters
+    ///             3     | Standard "Song typeface"
+    ///
+    /// @param [in] nFontStyle      Specifies the font style of the character. Can be one of the values listed in the following list:\n
+    ///             Valid values(HEX) | implications
+    ///             -----------|--------------------
+    ///             0x00     | Normal
+    ///             0x08     | Bold
+    ///             0x80     | 1 point bold underline
+    ///             0x100    | 2 bold underline
+    ///             0x200    | Inversion (only valid at the beginning of the line)
+    ///             0x400    | Reverse (white text on black background)
+    ///             0x800    | Smoothing (for magnification)
+    ///             0x1000   | Rotate each character 90 degrees clockwise
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.In the printer, generally, the internal font types are shown in the following table, but different models will be different, please refer to the test sample of the printer.\n
+    ///                     The name of the font | Font size (W * H)
+    ///                ---------|------------------------
+    ///                   Standard ASCII     | 12 * 24 / 13 * 24
+    ///                Compressed ASCII     | 9 * 17
+    ///                Standard of song typeface     | 24 * 24
+    ///                Small song typeface    | 16 * 16
+    ///                Small ASCII    | 8 * 16
+    ///
+    ///    2.If the character style is set to "reverse" or "rotate 90 degrees clockwise," then the "thin underscore" and "thick underscore" functions are disabled.\n
+    ///    3.If in Chinese character mode, standard ASCII characters (except partial symbols and symbols under full corners) and Chinese characters can be printed in one call. If in ASCII character mode, only standard ASCII characters and compressed ASCII characters can be printed.\n
+    /// 4.This function does not immediately print the incoming string, does not actually feed and print until the FeedLine function is called. However, if the string passed in is already larger than the printable width, the paper is automatically fed and printed.\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 将要打印的字符串数据发送到打印缓冲区(支持放大)
+    ///
+    /// @param [in] hDev            设备句柄。
+    /// @param [in] szTextData      指向以 null 结尾的字符串缓冲区。
+    /// @param [in] nStartX         指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY         指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in] nWidthTimes     横向放大倍数,有效范围为1-6。
+    /// @param [in] nHeightTimes    纵向放大倍数,有效范围为1-6。
+    /// @param [in] nFontType       指定字符的字体类型。可以为以下列表中所列值之一:\n
+    ///                  有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 标准 ASCII
+    ///             1     | 压缩 ASCII
+    ///             2     | 用户自定义字符
+    ///             3     | 标准 “宋体”
+    ///
+    /// @param [in] nFontStyle      指定字符的字体风格。可以为以下列表中所列值之一:\n
+    ///             有效值(HEX) | 含义
+    ///             -----------|--------------------
+    ///             0x00     | 正常
+    ///             0x08     | 加粗
+    ///             0x80     | 1点粗的下划线
+    ///             0x100    | 2点粗的下划线
+    ///             0x200    | 倒置(只在行首有效)
+    ///             0x400    | 反显(黑底白字)
+    ///             0x800    | 平滑处理(用于放大时)
+    ///             0x1000   | 每个字符顺时针旋转 90 度
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、在打印机中,一般内部已有字体类型如下表所示,但是不同机型会有所不同,可以参考打印机的测试样张。\n
+    ///                     字体名称 | 字体大小(W * H)
+    ///                ---------|------------------------
+    ///                   Standard ASCII     | 12 * 24 / 13 * 24
+    ///                Compressed ASCII     | 9 * 17
+    ///                标准宋体     | 24 * 24
+    ///                小宋体    | 16 * 16
+    ///                小ASCII    | 8 * 16
+    ///
+    ///    2、如果字符风格设置为“反显”,或“顺时针旋转90度”,那么“细下划线” 和“粗下划线”的功能将无效。\n
+    ///    3、如果在汉字字符模式下,则一次调用时,标准ASCII字符(除部分符号和全角下的符号)和汉字可以混合打印;如果在ASCII字符模式下,则只可以打印标准 ASCII 字符和压缩的ASCII字符。\n
+    /// 4、此函数并不立即打印传入的字符串,而是一直到调用函数 FeedLine 时才进行实际的进纸并打印的动作。但是,如果传入的字符串已经大于可打印宽度时,那么会自动进纸并打印。\n
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE UniversalTextOut(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY, int nWidthTimes, int nHeightTimes, int nFontType, int nFontStyle);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Sets text line hight
+    ///
+    /// @param    [in] hDev               Device handle.
+    /// @param    [in] nLineHeight    Specifies the high number of rows. The valid range is 0-255.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    ///    1.If the line height is set to 0, the printer USES the internal default line height, which is 1/6 of an inch. If the print head has a vertical resolution of 180dpi, it is 31 points high.\n
+    ///    2.If the line height is set to less than the current character height, the printer USES the current character height to be the line height.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 设置字符的行高
+    ///
+    /// @param    [in] hDev           设备端口。
+    /// @param    [in] nLineHeight    指定行高点数。有效范围为0-255。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    ///    1、如果把行高设置为0,则打印机使用内部的默认行高值,即1 / 6英寸。如果打印头纵向分辨率为180dpi 则相当于 31 点高。\n
+    ///    2、如果行高被设置为小于当前的字符高度,则打印机将使用当前字符高度为行高。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextLineHight(DEVICEHANDLE hDev, int nLineHeight);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Sets text bold
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in]    nBold    0:no bold;1:bold.
+    ///
+    /// <b>The sample code\n</b>
+    /// Valid values @ref EG_PrintTextExample
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 设置加粗
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in]    nBold    0:不加粗;1:加粗。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextBold(DEVICEHANDLE hDev, int nBold);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Sets text double width and height
+    ///
+    /// @param [in] hDev             Device handle.
+    /// @param [in] nWidthEnable     Text double width,0:Cancel double width;1:Choose double width.
+    /// @param [in] nHeightEnable    Text double higeht,0:Cancel double higeht;1:Choose double higeht.
+    ///
+    /// <b>The sample code\n</b>
+    /// Valid values @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 设置文本倍宽倍高使能
+    ///
+    /// @param [in] hDev             设备句柄。
+    /// @param [in] nWidthEnable     文本倍宽使能,0:取消倍宽;1:选择倍宽。
+    /// @param [in] nHeightEnable    文本倍高使能,0:取消倍高;1:选择倍高。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextDoubleWidthAndHeight(DEVICEHANDLE hDev, int nWidthEnable, int nHeightEnable);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set the alignment of the printed text (only valid at the beginning of the line in standard mode)
+    ///
+    /// @param [in] hDev          Device handle.
+    /// @param [in]    nAlignment    Alignment. Can be one of the values listed in the following list:\n
+    ///              Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Left justified
+    ///             1     | In the middle
+    ///             2     | Right justified
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置文本打印的对齐方式(只在标准模式的行首有效)
+    ///
+    /// @param [in] hDev          设备句柄。
+    /// @param [in]    nAlignment    对齐方式。可以为以下列表中所列值之一:\n
+    ///              有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 左对齐
+    ///             1     | 居中
+    ///             2     | 右对齐
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetAlignmentMode(DEVICEHANDLE hDev, int nAlignment);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Sets text character space
+    ///
+    /// @param [in] hDev           Device handle.
+    /// @param [in] nLeftSpace     Character left spacing (this parameter should be valid when setting Chinese character spacing). The valid range is 0-255.
+    /// @param [in] nRightSpace    Character right spacing. The valid range is 0-255.
+    /// @param [in] nMode           Character mode. 0: Chinese character mode; 1: English character mode.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.If the parameter Mode is 0, the parameter nLeftSpace and nRightSpace must both be legal; if the parameter Mode is 1, as long as the parameter nRightSpace is legal, the parameter LeftSpace is ignored.\n
+    /// 2.You can only change the character spacing in English or Chinese by calling textSetCharacterSpace once. To change the character spacing in Chinese and English, you need to call the function twice.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置字符间距
+    ///
+    /// @param [in] hDev           设备句柄。
+    /// @param [in] nLeftSpace     字符左间距(设置中文字符间距时,此参数需有效)。有效范围为0-255。
+    /// @param [in] nRightSpace    字符右间距。有效范围为0-255。
+    /// @param [in] nMode           字符模式。0:中文字符模式;1:英文字符模式。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、如果参数Mode为0,参数nLeftSpace和nRightSpace必须同时合法,如果参数Mode为1,只要参数nRightSpace合法便可,此时参数LeftSpace被忽略。\n
+    /// 2、调用一次函数textSetCharacterSpace只可以单独更改英文或中文的字符间距,若想更改中英文字符间距需要调用函数两次。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextCharacterSpace(DEVICEHANDLE hDev, int nLeftSpace, int nRightSpace, int nMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Sets text magnify times
+    ///
+    /// @param [in] hDev                Device handle.
+    /// @param [in] nHorMagnifyTimes    Horizontal magnification, effective range 1-6.
+    /// @param [in] nVerMagnifyTimes    Vertical magnification, effective range 1-6.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.In standard mode, vertical is the direction of feed and horizontal is perpendicular to the direction of feed. But when the character is rotated 90 degrees clockwise, it is reversed horizontally and vertically.\n
+    /// 2.In page mode, landscape and portrait depend on the direction of the area.\n
+    /// 3.All characters are aligned with the bottom line.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置字符大小
+    ///
+    /// @param [in] hDev                设备句柄。
+    /// @param [in] nHorMagnifyTimes    横向放大倍数,有效范围为1-6。
+    /// @param [in] nVerMagnifyTimes    纵向放大倍数,有效范围为1-6。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、在标准模式下,纵向是进纸方向,横向是垂直于进纸的方向。但是当字符顺时针旋转90°时,横向和纵向颠倒。\n
+    /// 2、页模式下,横向和纵向取决于区域的方向。\n
+    /// 3、同一行字符的放大倍数不同时,所有的字符以底线对齐。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextMagnifyTimes(DEVICEHANDLE hDev, int nHorMagnifyTimes, int nVerMagnifyTimes);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Select the font type for the print character
+    ///
+    /// @param [in] hDev          Device handle.
+    /// @param [in] nFontType       Font Type. Can be one of the values listed in the following list:\n
+    ///                  Valid values| Meaning
+    ///             ---------|----------------
+    ///             0     | Standard ASCII
+    ///             1     | Compression ASCII
+    ///             2     | User-defined characters
+    ///             3     | Standard "Song typeface"
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 选择打印字符的字体类型
+    ///
+    /// @param [in] hDev          设备句柄。
+    /// @param [in] nFontType       指定字符的字体类型。可以为以下列表中所列值之一:\n
+    ///                  有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 标准 ASCII
+    ///             1     | 压缩 ASCII
+    ///             2     | 用户自定义字符
+    ///             3     | 标准 “宋体”
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextFontType(DEVICEHANDLE hDev, int nFontStyle);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Select whether to print upside down (only valid at the beginning of the line in standard mode)
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nMode    Specifies the font type for the character. 0: no upside down printing; 1: inverted printing.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 选择是否倒置打印(只在标准模式的行首有效)
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nMode    指定字符的字体类型。0:不倒置打印;1:倒置打印。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextUpsideDownMode(DEVICEHANDLE hDev, int nMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Select whether to print reverse or not
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nEnable  0: no reverse 1: reverse .
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.In reverse mode, underline mode does not work.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 选择是否反显打印
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nEnable  0:不反显;1:反显。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、在反显打印模式选择时,下划线模式不起作用。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextOppositeColor(DEVICEHANDLE hDev, int nEnable);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set underline
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nMode    0: no underline is set; 1: one bold underline point; 2: two bold underlined points.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.In reverse mode, underline mode does not work.\n
+    /// 2.This feature IMPACT class printers do not support nMode equals 2.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 设置下划线
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nMode    0:不设置下划线;1:一点粗下划线;2:两点粗下划线。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、在反显打印模式选择时,下划线模式不起作用。\n
+    /// 2、此功能IMPACT类打印机不支持nMode等于2。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextUnderline(DEVICEHANDLE hDev, int nMode);
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Sets text color enable
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nEnable  0:unable; 1:enable.
+    ///
+    /// <b>Remark\n</b>
+    /// 1.This feature is only supported by POS class printers.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 双色打印使能
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nEnable  0:不使能;1:使能。
+    ///
+    /// <b>备注\n</b>
+    /// 1、此功能仅POS类打印机支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextColorEnable(DEVICEHANDLE hDev, int nEnable);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Sets the color of the printed characters
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nFontColor  0: color 1; 1: color 2.
+    ///
+    /// <b>Remark\n</b>
+    /// 1.This function is only supported by POS printers and IMPACT printers.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 设置打印字符的颜色
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nFontColor  0:颜色1;1:颜色2。
+    ///
+    /// <b>备注\n</b>
+    /// 1、此功能仅POS类打印机和IMPACT类打印机支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextFontColor(DEVICEHANDLE hDev, int nFontColor);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Sets rotate enable
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nEnable  0: cancel the rotation of 90 degrees to print; 1: choose to rotate 90 degrees to print.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 顺时针旋转90°使能
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nEnable  0:取消旋转90度打印;1:选择旋转90度打印。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_PrintTextExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextRotate(DEVICEHANDLE hDev, int nEnable);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Select the international character set and code page
+    ///
+    /// @param [in] hDev       Device handle.
+    /// @param [in] nCharSet   International character set, valid range see @subpage page_charset_eng.
+    /// @param [in] nCodePage  International code page, valid range see @subpage page_codepage_eng.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 选择国际字符集和代码页
+    ///
+    /// @param [in] hDev       设备句柄。
+    /// @param [in] nCharSet   国际字符集,有效范围详见 @subpage page_charset。
+    /// @param [in] nCodePage  国际代码页,有效范围详见 @subpage page_codepage。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextCharsetAndCodepage(DEVICEHANDLE hDev, int nCharSet, int nCodePage);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief User-defined characters enable
+    ///
+    /// @param [in] hDev     Device handle.
+    /// @param [in] nEnable  0: cancel user-defined characters; 1: select user-defined characters.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 用户自定义字符使能
+    ///
+    /// @param [in] hDev     设备句柄。
+    /// @param [in] nEnable  0:取消用户自定义字符;1:选择用户自定义字符。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextUserDefinedCharacterEnable(DEVICEHANDLE hDev, int nEnable);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Defines user-defined characters
+    ///
+    /// @param [in] hDev        Device handle.
+    /// @param [in] nStartCode  Start character, valid range of 32-127.
+    /// @param [in] nEndCode       Termination character, valid range 32-127.
+    /// @param [in] nFontType   Specifies the font type for the character. Can be one of the values listed in the following list:\n
+    ///                  Valid values |Meaning
+    ///             ---------|----------------
+    ///             0     | Standard ASCII
+    ///             1     | Compression ASCII
+    ///             2     | User-defined characters
+    ///             3     | Standard "Song typeface"
+    /// @param [in] szChData    Character data.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ///
+    /// @~Chinese
+    /// @brief 定义用户自定义字符
+    ///
+    /// @param [in] hDev        设备句柄。
+    /// @param [in] nStartCode     起始字符,有效范围为32-127。
+    /// @param [in] nEndCode       终止字符,有效范围为32-127。
+    /// @param [in] nFontType   指定字符的字体类型。可以为以下列表中所列值之一:\n
+    ///                  有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 标准 ASCII
+    ///             1     | 压缩 ASCII
+    ///             2     | 用户自定义字符
+    ///             3     | 标准 “宋体”
+    /// @param [in] szChData    字符的数据。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_HANDLE    --    @copybrief    ::ERR_HANDLE \n
+    /// ::ERR_LOADDLL_FAILURE    --    @copybrief    ::ERR_LOADDLL_FAILURE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextDefineUserDefinedCharacter(DEVICEHANDLE hDev, int nStartCode, int nEndCode, int nFontType, char *szChData);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Text setting reserve function interface
+    ///
+    /// @param [in]      hDev                Device handle.
+    /// @param [in]      nInstructionName    Property index value.
+    /// @param [in]      nPara                Property parameters.
+    /// @param [in]  szPara                Property parameters.
+    ///
+    /// @return
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    ///
+    /// @~Chinese
+    /// @brief 文本设置预留功能接口
+    ///
+    /// @param [in]      hDev                设备句柄。
+    /// @param [in]      nInstructionName    属性索引值。
+    /// @param [in]      nPara                属性参数。
+    /// @param [in]  szPara                属性参数。
+    ///
+    /// @return
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SetTextUniveral(DEVICEHANDLE hDev, int nInstructionName, int nPara, char *szPara);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Send files to the printer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    szFilePath              The file path to send to the printer.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 发送文件到打印机
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    szFilePath              所要发送到打印机的文件路径。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FILE    -- @copybrief ::ERR_FILE \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE DownloadFile(DEVICEHANDLE hDev, char *szFilePath);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Set the print mode for the printer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    nPrintMode              Specify the print mode. Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Standard mode(Line mode)
+    ///             1     | Page mode
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置打印机的打印模式
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    nPrintMode              指定打印模式。可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 标准模式(行模式)
+    ///             1     | 页模式
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintSetMode(DEVICEHANDLE hDev, int nPrintMode);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Set the print area of the page
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nStartX             The distance (dot/mm) from the left edge of the starting point in the X (horizontal) direction of the specified area. \n effective range is 0-65535 points.\n
+    /// @param [in] nStartY             Specifies the distance (dot/mm) from the starting point in the Y direction (vertical) to the upper boundary. \n effective range is -1-65535 points. \n this parameter only takes effect when printed in page mode, fixed to "-1" when printed in standard mode (line mode).
+    /// @param [in]    nWidth              Specifies the width (horizontal) of the print area. \n effective range is 0-65535 points.
+    /// @param [in]    nHeight              Specifies the height (vertical) of the print area. \n effective range is 0-65535 points.
+    /// @param [in]    nDirection              Specifies the direction (origin position) of the print area. Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Top left
+    ///             1     | Bottom left
+    ///             2     | Bottom riget
+    ///             3     | Top right
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The width of the printable area is different because different printer models have different print head widths (or internal buffer widths). Similarly, the height of the printable area may vary, typically 128 × 8 points, if the values specified by the parameters nWidth and nHeight exceed this limit. Then the printable area is automatically set to the actual printable area.\n
+    /// 2.If the width or height of the print area is set to 0, the printer stops processing instructions and treats the data it receives as normal character data.\n
+    /// 3.If the starting point of the print area exceeds the printer's printable area, the printer stops processing instructions and treats the data it receives as ordinary character data.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置页面的打印区域
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nStartX             指定区域的 X (水平)方向的起始点位置离左边界的距离(点/毫米)。\n 有效范围为 0 - 65535点。
+    /// @param [in] nStartY             指定 Y 方向(垂直)的起始点位置离上边界的距离(点/毫米)。\n 有效范围为-1 - 65535点。\n 该参数只有在页模式打印时生效,标准模式(行模式)打印时,固定为"-1"。
+    /// @param [in]    nWidth              指定打印区域的宽度(水平方向)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nHeight              指定打印区域的高度(垂直方向)。\n 有效范围为 0 - 65535点。
+    /// @param [in]    nDirection              指定打印区域的方向(原点位置)。可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 左上角
+    ///             1     | 左下角
+    ///             2     | 右下角
+    ///             3     | 右上角
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、由于不同的打印机型号有不同的打印头宽度(或内部缓冲区的宽度),所以可打印区域的宽度是不同的。同样,可打印区域的高度也有可能不同,一般大约是 128 × 8 点,如果参数 nWidth 和 nHeight 所指定的值超过此限制。那么可打印区域自动设置为实际的可打印区域。\n
+    /// 2、如果打印区域的宽度或高度设置为0,则打印机停止指令的处理,而将随后接受到的数据都当作普通的字符数据。\n
+    /// 3、如果打印区域的起始点超出打印机的可打印区域,则打印机停止指令的处理,而将随后接受到的数据都当作普通的字符数据。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PageModeSetArea(DEVICEHANDLE hDev, int nStartX, int nStartY, int nWidth, int nHeight, int nDirection);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Print the data in the page or label buffer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.If the function succeeds, it enters the paper and prints the ticket, but the page buffer or label buffer contents remain, and you can call this function again to continue printing the ticket in the page buffer or label buffer.\n
+    /// 2.You can call the PageModeClearBuffer to clear the page buffer or label buffer.\n
+    /// 3.Please refer to PrintSetMode。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 打印页或标签缓冲区中的数据
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、如果函数成功,则将进纸并打印票面,但是页缓冲区或标签缓冲区内容还是被保留着,可以再次调用此函数继续打印页缓冲区或标签缓冲区中的票面。\n
+    /// 2、可以调用 PageModeClearBuffer 来清除页缓冲区或标签缓冲区中的数据。\n
+    /// 3、另请参考 PrintSetMode。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PageModePrint(DEVICEHANDLE hDev);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Remove ticket and label print buffer data
+    ///
+    /// @param [in]    hDev                  Device handle.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.If the function succeeds, the current page buffer inside the printer is cleared.\n
+    /// 2.Please also refer to PageModePrint, PrintSetMode.\n
+    /// 3.This feature is not supported by the IMPACT class printer.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 清除票面和标签的打印缓冲区中的数据
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、如果函数成功,则打印机内部的当前页缓冲区被清除。\n
+    /// 2、另请参考 PageModePrint,PrintSetMode。\n
+    /// 3、此功能IMPACT类打印机不支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PageModeClearBuffer(DEVICEHANDLE hDev);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Feed paper
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in]    nLineNum              Feed paper length. \n effective range 0-255 dots.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    /// @~Chinese
+    ///
+    /// @brief 走纸一段距离
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in]    nLineNum              走纸长度。\n 有效范围为 0 - 255 点。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE FeedLineNumber(DEVICEHANDLE hDev, int nLineNum);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Cut paper
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nCutMode             Specify Cut paper mode. \n can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Full cut
+    ///             1     | Feed paper and half cut
+    ///             2     | Feed paper and full cut
+    ///             3     | Half cut
+    /// @param [in] nDistance             The number of points that specify the length of the feed. \n valid range is 0-255.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.If 0 (full cut) or 3 (half cut) is selected, the printer will cut the paper immediately after printing, and the parameter nDistance is ignored.\n
+    /// 2.If you choose 1 (take a distance and cut in half) or 2 (Feed paper and full cut), then the printer takes the nDistance point and cuts the paper.\n
+    /// 3.If the current paper type is black label paper, select 1 (Feed paper and half cut) or 2 (Feed paper and full cut) to position the black label and cut the paper.\n
+    /// 4.Please also refer to PrintSetMode.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 切纸
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nCutMode             指定切纸模式。\n 可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 全切
+    ///             1     | 走纸一段距离并半切
+    ///             2     | 走纸一段距离并全切
+    ///             3     | 半切
+    /// @param [in] nDistance             指定进纸长度的点数。\n 有效范围为 0 - 255。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、如果选择0(全切)或3(半切),则打印机打印完成立刻切纸,参数 nDistance 忽略。\n
+    /// 2、如果选择1(走纸一段距离并半切)或2(走纸一段距离并全切),则打印机走纸 nDistance 点,然后切纸。\n
+    /// 3、如果当前纸张类型为黑标纸,选择1(走纸一段距离并半切)或2(走纸一段距离并全切)时定位黑标并切纸。\n
+    /// 4、另请参考 PrintSetMode。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE CutPaper(DEVICEHANDLE hDev, int nCutMode, int nDistance);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Resets the printer, clears the print buffer of data, clears the character and line height Settings, and returns the print mode to the default mode when powered on
+    ///
+    /// @param [in]    hDev                  Device handle.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// After the function is successfully executed, then:\n
+    /// 1.Receive instructions in the buffer and keep them.\n
+    /// 2.Preserve macro definition\n
+    /// 3.Save the bitmap in Flash.\n
+    /// 4.Save the data in Flash\n
+    /// 5.The DIP switch setting is not checked again.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 复位打印机,把打印缓冲区中的数据清除,字符和行高的设置被清除,打印模式被恢复到上电时的缺省模式
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 函数成功执行后,则:\n
+    /// 1、接收缓冲区中的指令保留。\n
+    /// 2、宏定义保留。\n
+    /// 3、Flash 中的位图保留。\n
+    /// 4、Flash 中的数据保留。\n
+    /// 5、DIP开关的设置不进行再次检测。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE Reset(DEVICEHANDLE hDev);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Send pulses to drawer pin to open the drawer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nID                 Specify the pin of drawer.\n Can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Drawer connector pin 2
+    ///             1     | Drawer connector pin 5
+    /// @param [in] nOnTimes             Specifies the holding time for high level pulses sent to the drawer, nOnTimes × 2 ms. \n valid range is 0-255.
+    /// @param [in] nOffTimes             Specifies the holding time for low level pulses sent to the drawer, nOnTimes × 2 ms. \n valid range is 0-255.
+    ///
+    /// <b>Remark\n</b>
+    /// 1.If the value of the parameter nOffTimes is less than nOnTimes, the low level pulse sent to the money box remains nOnTimes × 2 milliseconds.\n
+    /// 2.Please refer to the relevant materials provided by the money box supplier.\n
+    /// 3.This feature is supported only for POS printers and IMPACT printers.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 往钱箱引脚发送脉冲以打开钱箱
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nID                 指定钱箱的引脚。\n 可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 钱箱连接器引脚2
+    ///             1     | 钱箱连接器引脚5
+    /// @param [in] nOnTimes             指定往钱箱发送的高电平脉冲保持时间,即 nOnTimes × 2 毫秒。\n 有效范围为 0 - 255。
+    /// @param [in] nOffTimes             指定往钱箱发送的低电平脉冲保持时间,即 nOffTimes × 2 毫秒。\n 有效范围为 0 - 255。
+    ///
+    /// <b>备注\n</b>
+    /// 1、如果参数 nOffTimes 的值小于 nOnTimes, 则往钱箱发送的低电平脉冲的保持时间为nOnTimes × 2 毫秒。\n
+    /// 2、请参考钱箱供应商提供的相关资料。\n
+    /// 3、此功能仅POS类打印机和IMPACT类打印机支持。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE KickOutDrawer(DEVICEHANDLE hDev, int nID, int nOnTimes, int nOffTimes);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Sets the application unit of the printer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nUnit                 Specifies the application unit of the printer. \n can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | dot
+    ///             1     | millimetre
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The default resolution is 203*203. If the current printer resolution is not 203*203, please first call the MotionUnit interface to set the resolution, and then do other operations.
+    ///
+    /// @~Chinese
+    /// @brief 设置打印机的应用单位
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nUnit                 指定打印机的应用单位。\n 可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 点
+    ///             1     | 毫米
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、默认的分辨率为203*203,如果当前打印机分辨率非203*203,请先调用MotionUnit接口,设置分辨率,再进行其他操作。\n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    void POSSDKCALL_MODE ApplicationUnit(DEVICEHANDLE hDev, int nUnit);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set print density
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nDensity             Specifies the print concentration of the printer. \n valid range is 1-140. \n print concentration increases with the value.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The printing density is set by this function, and the printer fails after restart. The printing density after restart is subject to the EEPROM setting of the printer.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置打印浓度
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nDensity             指定打印机的打印浓度。\n 有效范围为 1 - 140。\n 打印浓度随数值增大而增加。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、通过该函数设置打印浓度,打印机重启后失效,重启后的打印浓度以打印机的EEPROM设置为准。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrintDensity(DEVICEHANDLE hDev, int nDensity);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Set the printer's mobile unit (resolution)
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nHorizontalMU         Horizontal printer resolution. The effective value of \n is 180, 203 and 300.
+    /// @param [in] nVerticalMU         Printer longitudinal resolution. The effective value of \n is 180, 203 and 300.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_BasicSetExample
+    ///
+    /// <b>Remark\n</b>
+    /// 1.Please refer to ::PrintSetMode。\n
+    /// 2.The resolution set must be consistent with the actual printer resolution.\n
+    /// 3.Set after opening the port。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置打印机的移动单位(分辨率)
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nHorizontalMU         打印机横向分辨率。\n 有效值为180、203、300。
+    /// @param [in] nVerticalMU         打印机纵向分辨率。\n 有效值为180、203、300。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_BasicSetExample
+    ///
+    /// <b>备注\n</b>
+    /// 1、另请参考 ::PrintSetMode。\n
+    /// 2、设置的分辨率必须与打印机实际分辨率一致。\n
+    /// 3、在打开端口后设置。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE MotionUnit(DEVICEHANDLE hDev, int nHorizontalMU, int nVerticalMU);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set the paper type for the printer
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nPaperType             Specifies the paper type for the printer. \n can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Continuous paper
+    ///             1     | Black tag label paper
+    ///             2     | White tag label paper
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置打印机的纸张类型
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nPaperType             指定打印机的纸张类型。\n 可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 连续纸
+    ///             1     | 黑标记标签纸
+    ///             2     | 白标记标签纸
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SelectPaperType(DEVICEHANDLE hDev, int nPaperType);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    ///
+    /// @brief Set the paper type of the printer (reset to take effect)
+    ///
+    /// @param [in]    hDev                  Devcice handle.
+    /// @param [in] nPaperType             Specifies the paper type of the printer. \n can be one of the following values:
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Continuous paper
+    ///             1     | Black tag label paper
+    ///             2     | White tag label paper
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 设置打印机的纸张类型(复位生效)
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nPaperType             指定打印机的纸张类型。\n 可以为以下值之一:
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 连续纸
+    ///             1     | 黑标记标签纸
+    ///             2     | 白标记标签纸
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SelectPaperTypeEEP(DEVICEHANDLE hDev, int nPaperType);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Basic Settings reserve interface
+    ///
+    /// @param [in]    hDev                  Device handle.
+    /// @param [in] nInstructionName     Reserve parameter 1.
+    /// @param [in] nPara1                 Reserve parameter 2.
+    /// @param [in] szPara2             Reserve parameter 3.
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 基本设置预留接口
+    ///
+    /// @param [in]    hDev                  设备句柄。
+    /// @param [in] nInstructionName     预留参数1。
+    /// @param [in] nPara1                 预留参数2。
+    /// @param [in] szPara2             预留参数3。
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE BasicSetReserveFunction(DEVICEHANDLE hDev, int nInstructionName, int nPara1, char *szPara2);
+    
+    // 查询
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Real time query of printer status
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szStatus            Returns a buffer of printer status with a buffer size of 1 byte.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the status of the printer.
+    /// @param [out]    nRealDataLength        Returns the length of the actual printer state.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// <b>State analysis\n</b>
+    /// See details @ref EG_RealTimeStatus
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The printer status corresponds to szStatus returned by different types of printers is different. The specific status is as follows:\n
+    /// ① POS-type printing device status analysis see detail @subpage page_realpos_eng .\n
+    /// ② KIOSK class printing device status analysis see details @subpage page_realkiosk_eng .\n
+    /// ③ TKIOSK class printing device status analysis see details @subpage page_realtkiosk_eng .\n
+    /// ④ IMPACT class printing device status analysis see details @subpage page_realimpact_eng .\n
+    /// 2.State analysis is applicable to most printers. If the analysis bit does not match the reality, please refer to the programming manual of the relevant model.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 实时查询打印机状态
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szStatus            返回打印机状态的缓冲区,缓冲区大小为 1 个字节。
+    /// @param [in]        nDataLength            指向返回打印机状态的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际打印机状态的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// <b>状态解析\n</b>
+    /// 详见 @ref EG_RealTimeStatus
+    ///
+    /// <b>备注\n</b>
+    /// 1、不同类型的打印机返回的szStatus对应的打印机状态不一样,具体状态解析如下:\n
+    /// ① POS类打印设备状态解析详见 @subpage page_realpos 。\n
+    /// ② KIOSK类打印设备状态解析详见 @subpage page_realkiosk 。\n
+    /// ③ TKIOSK类打印设备状态解析详见 @subpage page_realtkiosk 。\n
+    /// ④ IMPACT类打印设备状态解析详见 @subpage page_realimpact 。\n
+    /// 2、状态解析适用大部分打印机,若解析位与实际不符,请参考相关机型的编程手册。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE RealTimeQueryStatus(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Non-real-time query of printer status
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szStatus            Returns a buffer of printer status with a buffer size of 1 byte.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the status of the printer.
+    /// @param [out]    nRealDataLength        Returns the length of the actual printer state.
+    ///
+    /// <b>Remark\n</b>
+    /// 1.szStatus State analysis
+    ///              Hex|Status | Meaning
+    ///             --------|-----------|------------
+    ///             0x03 | 0 / 1     | Paper feeder has paper / Paper will run out
+    ///             0x0C | 0 / 1     | There is paper at the print head / No paper
+    ///             0x30 | 0 / 1     | Cashbox connector pin 3 is low (off) / high (on)
+    ///
+    /// 2.Among them, the POS type printing device and the IMPACT type printing device support the cash box status inquiry, and the KIOSK type printing device and the TKIOSK type printing device do not support the cash box status inquiry.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 非实时查询打印机状态
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szStatus            返回打印机状态的缓冲区,缓冲区大小为 1 个字节。
+    /// @param [in]        nDataLength            指向返回打印机状态的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际打印机状态的长度。
+    ///
+    /// <b>备注\n</b>
+    /// 1、szStatus状态解析
+    ///              Hex|Status | Meaning
+    ///             --------|-----------|------------
+    ///             0x03 | 0 / 1     | 容纸器中有纸 / 纸将用尽
+    ///             0x0C | 0 / 1     | 打印头处有纸 / 无纸
+    ///             0x30 | 0 / 1     | 钱箱连接器引脚 3 的电平为低(关闭) / 高(打开)
+    ///
+    /// 2、其中POS类打印设备和IMPACT类打印设备支持钱箱状态查询,KIOSK类打印设备和TKIOSK类打印设备不支持钱箱状态查询。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE NonRealTimeQueryStatus(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Automatic status returns query printer status
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szStatus            Returns a buffer of printer status with a buffer size of at least 4 bytes.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the status of the printer.
+    /// @param [in]        nEnable        Automatic status return enable
+    ///                Valid values | Meaning
+    ///             ---------|----------------
+    ///             0     | Turn off automatic status return
+    ///             1     | Enable automatic status return and read status
+    /// @param [out]    nRealDataLength        Returns the length of the actual printer state.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_AutoQueryStatus
+    ///
+    /// <b>State analysis\n</b>
+    /// See details @ref EG_AutoStatus
+    ///
+    /// <b>Remark\n</b>
+    /// 1.The printer status corresponding to szStatus returned by different types of printers is different. The specific status is as follows:\n
+    /// ① For automatic state resolution of POS-type printing devices, see  @subpage page_autopos_eng .\n
+    /// ② The automatic state resolution of KIOSK printing equipment, see @subpage page_autokiosk_eng .\n
+    /// ③ Automatic status analysis of TKIOSK printing devices see @subpage page_autotkiosk_eng .\n
+    /// ④ IMPACT class printing device automatic state resolution, see @subpage page_autoimpact_eng .\n
+    /// 2.State analysis is applicable to most printers. If the resolution bit does not match the actual one, please refer to the programming manual of the relevant model.
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ///
+    /// @~Chinese
+    /// @brief 自动状态返回查询打印机状态
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szStatus            返回打印机状态的缓冲区,缓冲区大小至少为 4 个字节。
+    /// @param [in]        nDataLength            指向返回打印机状态的缓冲区的长度。
+    /// @param [in]        nEnable        自动状态返回使能
+    ///                有效值 | 含义
+    ///             ---------|----------------
+    ///             0     | 关闭自动状态返回
+    ///             1     | 使能自动状态返回并读取状态
+    /// @param [out]    nRealDataLength        返回实际打印机状态的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_AutoQueryStatus
+    ///
+    /// <b>状态解析\n</b>
+    /// 详见 @ref EG_AutoStatus
+    ///
+    /// <b>备注\n</b>
+    /// 1、不同类型的打印机返回的szStatus对应的打印机状态不一样,具体状态解析如下:\n
+    /// ① POS类打印设备自动状态解析详见 @subpage page_autopos 。\n
+    /// ② KIOSK类打印设备自动状态解析详见 @subpage page_autokiosk 。\n
+    /// ③ TKIOSK类打印设备自动状态解析详见 @subpage page_autotkiosk 。\n
+    /// ④ IMPACT类打印设备自动状态解析详见 @subpage page_autoimpact 。\n
+    /// 2、状态解析适用大部分打印机,若解析位与实际不符,请参考相关机型的编程手册。
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE AutoQueryStatus(DEVICEHANDLE hDev, char *szStatus, int nDataLength, int nEnable, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Get the firmware version number of the printer
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szFirmwareVersion    Returns the buffer of the firmware version number with a buffer size of at least 20 bytes.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the firmware version number.
+    /// @param [out]    nRealDataLength        Returns the length of the actual firmware version number.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 获取打印机的固件版本号
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szFirmwareVersion    返回固件版本号的缓冲区,缓冲区大小至少为 20 个字节。
+    /// @param [in]        nDataLength            指向返回固件版本号的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际固件版本号的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE FirmwareVersion(DEVICEHANDLE hDev, char *szFirmwareVersion, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Obtain the software version number
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szSoftwareVersion    Returns the buffer of the software version number with a buffer size of at least 8 bytes.
+    /// @param [in]        nDataLength            The length of the buffer pointing to the returned software version number.
+    /// @param [out]    nRealDataLength        Returns the length of the actual software version number.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    ///
+    /// @~Chinese
+    /// @brief 获取软件版本号
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szSoftwareVersion    返回的软件版本号的缓冲区,缓冲区大小至少为 8 个字节。
+    /// @param [in]        nDataLength            指向返回的软件版本号的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际的软件版本号的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE SoftwareVersion(DEVICEHANDLE hDev, char *szSoftwareVersion, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Get printer vendor information
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szVendorInformation    Returns a buffer of vendor information with a buffer size of at least 4 bytes.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns vendor information.
+    /// @param [out]    nRealDataLength        Returns the length of the actual vendor information.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 获取打印机的厂商信息
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szVendorInformation    返回厂商信息的缓冲区,缓冲区大小至少为 4 个字节。
+    /// @param [in]        nDataLength            指向返回厂商信息的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际厂商信息的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE VendorInformation(DEVICEHANDLE hDev, char *szVendorInformation, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Get the name of the printer
+    ///
+    /// @param [in]        hDev                 Device handle
+    /// @param [out]    szPrinterName        Returns a buffer of the printer name with a buffer size of at least 4 bytes.
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the printer name.
+    /// @param [out]    nRealDataLength        Returns the length of the actual printer name.
+    ///
+    /// <b>The sample code\n</b>
+    /// Valid values @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 获取打印机的名称
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szPrinterName        返回打印机名称的缓冲区,缓冲区大小至少为 4 个字节。
+    /// @param [in]        nDataLength            指向返回打印机名称的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际打印机名称的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE PrinterName(DEVICEHANDLE hDev, char *szPrinterName, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Get the resolution of the printer
+    ///
+    /// @param [in]        hDev                 Device handle.
+    /// @param [out]    szResolutionRatio    Returns a buffer of the printer name with a buffer size of 2 bytes.\n
+    ///                 The first byte represents the horizontal resolution, 0x01 means 203dpi, 0x02 means 180dpi\n
+    ///                 The second byte represents the vertical resolution, 0x01 means 203dpi, 0x02 means 180dpi\n
+    /// @param [in]        nDataLength            Points to the length of the buffer that returns the resolution of the printer.
+    /// @param [out]    nRealDataLength        Returns the length of the actual printer resolution.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_FIRNOSUPPORT    -- @copybrief ::ERR_FIRNOSUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 获取打印机的分辨率
+    ///
+    /// @param [in]        hDev                 设备句柄。
+    /// @param [out]    szResolutionRatio    返回打印机名称的缓冲区,缓冲区大小为2个字节。\n
+    ///                 第一个字节代表横向分辨率,0x01表示203dpi,0x02表示180dpi\n
+    ///                 第二个字节代表纵向分辨率,0x01表示203dpi,0x02表示180dpi\n
+    /// @param [in]        nDataLength            指向返回打印机分辨率的缓冲区的长度。
+    /// @param [out]    nRealDataLength        返回实际打印机分辨率的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_FIRNOSUPPORT    -- @copybrief ::ERR_FIRNOSUPPORT \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE ResolutionRatio(DEVICEHANDLE hDev, char *szResolutionRatio, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    ///
+    /// @~English
+    /// @brief Get the hardware serial number of the printer
+    ///
+    /// @param [in]        hDev                     Device handle
+    /// @param [out]    szHardwareSerialNumber    Returns a buffer of the printer hardware serial number with a buffer size of at least 4 bytes.\n
+    /// @param [in]        nDataLength                Points to the length of the buffer that returns the serial number of the printer hardware.
+    /// @param [out]    nRealDataLength            Returns the length of the actual printer hardware serial number.
+    ///
+    /// <b>The sample code\n</b>
+    /// See details @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ///
+    /// @~Chinese
+    /// @brief 获取打印机的硬件序列号
+    ///
+    /// @param [in]        hDev                     设备句柄。
+    /// @param [out]    szHardwareSerialNumber    返回打印机硬件序列号的缓冲区,缓冲区大小至少为4个字节。\n
+    /// @param [in]        nDataLength                指向返回打印机硬件序列号的缓冲区的长度。
+    /// @param [out]    nRealDataLength            返回实际打印机硬件序列号的长度。
+    ///
+    /// <b>示例代码\n</b>
+    /// 详见 @ref EG_QueryExample
+    ///
+    /// @return
+    /// ::ERR_SUCCESS    -- @copybrief ::ERR_SUCCESS \n
+    /// ::ERR_PARAMATER    -- @copybrief ::ERR_PARAMATER \n
+    /// ::ERR_FAIL    -- @copybrief ::ERR_FAIL \n
+    /// ::ERR_LOADDLL_FAILURE    -- @copybrief ::ERR_LOADDLL_FAILURE \n
+    /// ::ERR_HANDLE    -- @copybrief ::ERR_HANDLE \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE HardwareSerialNumber(DEVICEHANDLE hDev, char *szHardwareSerialNumber, int nDataLength, unsigned long *nRealDataLength);
+    
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Status query reservation interface
+    ///
+    /// @param  hDev                 Device handle.
+    /// @param  nInstructionsName    Attribute value
+    /// @param  nPara                 Function parameter
+    /// @param     szPara                 Function parameter
+    ///
+    /// @return
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    ///
+    /// @~Chinese
+    /// @brief 状态查询预留接口
+    ///
+    /// @param  hDev                 设备句柄。
+    /// @param  nInstructionsName    属性值。
+    /// @param  nPara                 功能参数。
+    /// @param     szPara                 功能参数。
+    ///
+    /// @return
+    /// ::ERR_NOT_SUPPORT    -- @copybrief ::ERR_NOT_SUPPORT \n
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE QueryReserveFunction(DEVICEHANDLE hDev, int nInstructionsName, int nPara, char *szPara, unsigned long *nRealDataLength);
+    
+    // 日志
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    /// @~English
+    /// @brief Logging
+    /// @param                hDev          The development.
+    /// @param [in,out]    szFileName    If non-null, filename of the file.
+    /// @param [in,out]    szFilePath    If non-null, full pathname of the file.
+    /// @param                nOpen          The open.
+    ///
+    /// @return    A POSSDKCALL_MODE.
+    ///
+    /// @~Chinese
+    ///
+    /// @brief 记录日志
+    /// @param                hDev          The development.
+    /// @param [in,out]    szFileName    If non-null, filename of the file.
+    /// @param [in,out]    szFilePath    If non-null, full pathname of the file.
+    /// @param                nOpen          The open.
+    ///
+    /// @return    A POSSDKCALL_MODE.
+    ////////////////////////////////////////////////////////////////////////////////////////////////////
+    
+    int POSSDKCALL_MODE InstructionsRecord(DEVICEHANDLE hDev, char *szFileName, char *szFilePath, int nOpen);
+    
+#ifdef __cplusplus
+}
+#endif
+
+/// 通讯
+typedef int (POSSDKCALL_MODE *pSDKGetVersionInfo)(char *szVersionInfo, int nInfoLength, int *npInforTrueLen);
+typedef int (POSSDKCALL_MODE *pEnumDeviceInfo1)(int nOperationType, char *szDeviceNameBuf, int nBufLen, int *npNumber);
+typedef DEVICEHANDLE(POSSDKCALL_MODE *pInit)(char *szPrinterName);
+typedef int (POSSDKCALL_MODE *pOpenCOMPort)(DEVICEHANDLE hDev, char *szName, int nComBaudrate, int nComDataBits, int nComStopBits, int nComParity, int nParam);
+typedef int (POSSDKCALL_MODE *pOpenLPTPort)(DEVICEHANDLE hDev, char *szName);
+typedef int (POSSDKCALL_MODE *pOpenUsbApiPort)(DEVICEHANDLE hDev, int nDeviceId);
+typedef int (POSSDKCALL_MODE *pOpenUsbClassPort)(DEVICEHANDLE hDev, char *szName, int nIsSplitStatus);
+typedef int (POSSDKCALL_MODE *pOpenNetPortByName)(DEVICEHANDLE hDev, char *szName);
+typedef int (POSSDKCALL_MODE *pOpenNetPort)(DEVICEHANDLE hDev, char *szNetIP, int nPort, int nProtocalType, int nBroadcast);
+typedef int (POSSDKCALL_MODE *pOpenBlueToothPortByName)(DEVICEHANDLE hDev, char *szName);
+typedef int (POSSDKCALL_MODE *pOpenBlueToothPort)(DEVICEHANDLE hDev, char *szMACAddress);
+typedef int (POSSDKCALL_MODE *pOpenBlueToothPortMFI)(DEVICEHANDLE hDev, char *szMACAddress);
+typedef int (POSSDKCALL_MODE *pOpenDriverPort)(DEVICEHANDLE hDev, char *szName);
+typedef int (POSSDKCALL_MODE *pClosePort11)(DEVICEHANDLE hDev);
+typedef int (POSSDKCALL_MODE *pSendPortData)(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+typedef int (POSSDKCALL_MODE *pReadPortData)(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+typedef int (POSSDKCALL_MODE *pSetPortTimeout)(DEVICEHANDLE hDev, int nWriteTimeout, int nReadTimeout);
+typedef int (POSSDKCALL_MODE *pGetPortTimeout)(DEVICEHANDLE hDev, int *nWriteTimeout, int *nReadTimeout);
+
+/// 位图
+typedef int (POSSDKCALL_MODE *pPrintBitmap)(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nType);
+typedef int (POSSDKCALL_MODE *pPrintBitmapByMode)(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nMode);
+typedef int (POSSDKCALL_MODE *pPrintTrueType)(DEVICEHANDLE hDev, char *szText, int nStartX, int nStartY, char *szFontName, int nFontHeight, int nFontWidth, int nBold);
+typedef int (POSSDKCALL_MODE *pDownloadRAMBitmapByFile)(DEVICEHANDLE hDev, char *szFilePath, int nImageID);
+typedef int (POSSDKCALL_MODE *pPrintRAMBitmap)(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+typedef int (POSSDKCALL_MODE *pDownloadFlashBitmapByFile)(DEVICEHANDLE hDev, char *szFilePath[], int nImageCount);
+typedef int (POSSDKCALL_MODE *pPrintFlashBitmap)(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+
+/// 条码
+typedef int (POSSDKCALL_MODE *pPrintBarcode)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nBasicWidth, int nHeight, int nHriFontType, int nHriFontPosition, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pPrintBarcodeSimple)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nWidth, int nHeight, int nHriFontPosition);
+typedef int (POSSDKCALL_MODE *pBarcodePrintQR)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nSymbolType, int nLanguageMode, int nErrorCorrect, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pBarcodePrintQREx)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nErrorCorrect, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pBarcodePrintPDF417)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nHeight, int nLines, int nColumns, int nScaleH, int nScaleV, int nCorrectGrade, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pBarcodePrintPDF417Simple)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nWidth, int nHeight);
+typedef int (POSSDKCALL_MODE *pBarcodePrintMaxicode)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pBarcodePrintGS1DataBar)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBarcodeType, int nBasicWidth, int nHeight, int nSegmentNum, int nSeparatorHeight, int nBasicHeight, int nHRI, int nAI, int nBytesToPrint);
+typedef int (POSSDKCALL_MODE *pBarcodeReserveFunction)(DEVICEHANDLE hDev, int nInstructionsName, int nPara1, char *szPara2);
+
+/// 文本
+typedef int (POSSDKCALL_MODE *pFeedLine)(DEVICEHANDLE hDev);
+typedef int (POSSDKCALL_MODE *pPrintTextOut)(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY);
+typedef int (POSSDKCALL_MODE *pUniversalTextOut)(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY, int nWidthTimes, int nHeightTimes, int nFontType, int nFontStyle);
+typedef int (POSSDKCALL_MODE *pSetTextLineHight)(DEVICEHANDLE hDev, int nLineHeight);
+typedef int (POSSDKCALL_MODE *pSetTextBold)(DEVICEHANDLE hDev, int nBold);
+typedef int (POSSDKCALL_MODE *pSetTextDoubleWidthAndHeight)(DEVICEHANDLE hDev, int nWidthEnable, int nHeightEnable);
+typedef int (POSSDKCALL_MODE *pSetAlignmentMode)(DEVICEHANDLE hDev, int nAlignment);
+typedef int (POSSDKCALL_MODE *pSetTextCharacterSpace)(DEVICEHANDLE hDev, int nLeftSpace, int nRightSpace, int nMode);
+typedef int (POSSDKCALL_MODE *pSetTextMagnifyTimes)(DEVICEHANDLE hDev, int nHorMagnifyTimes, int nVerMagnifyTimes);
+typedef int (POSSDKCALL_MODE *pSetTextFontType)(DEVICEHANDLE hDev, int nFontStyle);
+typedef int (POSSDKCALL_MODE *pSetTextUpsideDownMode)(DEVICEHANDLE hDev, int nMode);
+typedef int (POSSDKCALL_MODE *pSetTextOppositeColor)(DEVICEHANDLE hDev, int nEnable);
+typedef int (POSSDKCALL_MODE *pSetTextColorEnable)(DEVICEHANDLE hDev, int nEnable);
+typedef int (POSSDKCALL_MODE *pSetTextFontColor)(DEVICEHANDLE hDev, int nFontColor);
+typedef int (POSSDKCALL_MODE *pSetTextUnderline)(DEVICEHANDLE hDev, int nMode);
+typedef int (POSSDKCALL_MODE *pSetTextRotate)(DEVICEHANDLE hDev, int nEnable);
+typedef int (POSSDKCALL_MODE *pSetTextCharsetAndCodepage)(DEVICEHANDLE hDev, int nCharSet, int nCodePage);
+typedef int (POSSDKCALL_MODE *pSetTextUserDefinedCharacterEnable)(DEVICEHANDLE hDev, int nEnable);
+typedef int (POSSDKCALL_MODE *pSetTextDefineUserDefinedCharacter)(DEVICEHANDLE hDev, int nStartCode, int nEndCode, int nFontType, char *szChData);
+typedef int (POSSDKCALL_MODE *pSetTextUniveral)(DEVICEHANDLE hDev, int nInstructionName, int nPara1, char *szPara2);
+
+/// 基本设置
+typedef int (POSSDKCALL_MODE *pDownloadFile)(DEVICEHANDLE hDev, char *szFilePath);
+typedef int (POSSDKCALL_MODE *pPrintSetMode)(DEVICEHANDLE hDev, int nPrintMode);
+typedef int (POSSDKCALL_MODE *pPageModeSetArea)(DEVICEHANDLE hDev, int nStartX, int nStartY, int nWidth, int nHeight, int nDirection);
+typedef int (POSSDKCALL_MODE *pPageModePrint)(DEVICEHANDLE hDev);
+typedef int (POSSDKCALL_MODE *pPageModeClearBuffer)(DEVICEHANDLE hDev);
+typedef int (POSSDKCALL_MODE *pFeedLineNumber)(DEVICEHANDLE hDev, int nLineNum);
+typedef int (POSSDKCALL_MODE *pCutPaper)(DEVICEHANDLE hDev, int nCutMode, int nDistance);
+typedef int (POSSDKCALL_MODE *pReset)(DEVICEHANDLE hDev);
+typedef int (POSSDKCALL_MODE *pKickOutDrawer)(DEVICEHANDLE hDev, int nID, int nOnTimes, int nOffTimes);
+typedef int (POSSDKCALL_MODE *pApplicationUnit)(DEVICEHANDLE hDev, int nUnit);
+typedef int (POSSDKCALL_MODE *pPrintDensity)(DEVICEHANDLE hDev, int nDensity);
+typedef int (POSSDKCALL_MODE *pMotionUnit)(DEVICEHANDLE hDev, int nHorizontalMU, int nVerticalMU);
+typedef int (POSSDKCALL_MODE *pSelectPaperType)(DEVICEHANDLE hDev, int nPaperType);
+typedef int (POSSDKCALL_MODE *pSelectPaperTypeEEP)(DEVICEHANDLE hDev, int nPaperType);
+typedef int (POSSDKCALL_MODE *pBasicSetReserveFunction)(DEVICEHANDLE hDev, int nInstructionName, int nPara1, char *szPara2);
+
+/// 查询
+typedef int (POSSDKCALL_MODE *pRealTimeQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pNonRealTimeQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pAutoQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, int nEnable, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pFirmwareVersion)(DEVICEHANDLE hDev, char *szFirmwareVersion, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pSoftwareVersion)(DEVICEHANDLE hDev, char *szSoftwareVersion, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pVendorInformation)(DEVICEHANDLE hDev, char *szVendorInformation, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pPrinterName)(DEVICEHANDLE hDev, char *szPrinterName, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pResolutionRatio)(DEVICEHANDLE hDev, char *szResolutionRatio, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pHardwareSerialNumber)(DEVICEHANDLE hDev, char *szHardwareSerialNumber, int nDataLength, unsigned long *nRealDataLength);
+typedef int (POSSDKCALL_MODE *pQueryReserveFunction)(DEVICEHANDLE hDev, int nInstructionsName, int nPara, char *szPara, unsigned long *nRealDataLength);
+
+/// 日志
+typedef int (POSSDKCALL_MODE *pInstructionsRecord)(DEVICEHANDLE hDev, char *szFileName, char *szFilePath, int nOpen);
+

ファイルの差分が大きいため隠しています
+ 673 - 182
DevAdapter/nantian/termalprint.1.1/ThermalPrint.Nantian.cpp


+ 238 - 52
DevAdapter/nantian/termalprint.1.1/ThermalPrint.Nantian.h

@@ -9,8 +9,8 @@
 #include "DRV_ReceiptPrinter.h"
 
 #include "log4vendor.h"
-
-
+#include "POSSDK.h"
+#include <iconv.h>
 #include <iostream>
 #include <algorithm>
 #include <functional>
@@ -27,11 +27,11 @@
 
 
 #define THERMALPRINT_API  __attribute__((visibility("default")))
-#define _B64_EOLN            0xF0    // 换行/n
-#define _B64_CR                0xF1    // 回车/r
-#define _B64_EOF                0xF2    // 连字符-
-#define _B64_WS                0xE0    // 跳格或者空格(/t、space)
-#define _B64_ERROR     0xFF    // 错误字符
+#define _B64_EOLN            0xF0    // 锟斤拷锟斤拷/n
+#define _B64_CR                0xF1    // 锟截筹拷/r
+#define _B64_EOF                0xF2    // 锟斤拷锟街凤拷-
+#define _B64_WS                0xE0    // 锟斤拷锟斤拷锟斤拷呖崭锟�/t锟斤拷space锟斤拷
+#define _B64_ERROR     0xFF    // 锟斤拷锟斤拷锟街凤拷
 #define _B64_NOT_BASE64(a)    (((a)|0x13) == 0xF3)
 
 static const BYTE DATA_ASCII2BIN[128] = {
@@ -44,9 +44,106 @@ static const BYTE DATA_ASCII2BIN[128] = {
 	0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,
 	0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0xFF,0xFF,0xFF,0xFF,0xFF
 };
-
+typedef int (*pGetBmpInfo)(char *OldBmpPath,int *picwidth,int *picheight);
+typedef int (*pBMP_Zoom)(char *OldBmpPath,char *NewBmpPath,float Multiple);
 typedef DRV_ReceiptPrinter* (*pCreate_DRV_ReceiptPrinter)();
 typedef void (*pDestroy_DRV_ReceiptPrinter)(DRV_ReceiptPrinter*);
+/************************************************************************************************************************
+*	锟斤拷锟斤拷锟接匡拷
+************************************************************************************************************************/
+/// 通讯
+typedef int ( *pSDKGetVersionInfo)(char *szVersionInfo, int nInfoLength, int *npInforTrueLen);
+typedef int ( *pEnumDeviceInfo)(int nOperationType, char *szDeviceNameBuf, int nBufLen, int *npNumber);
+typedef DEVICEHANDLE( *pInit)(char *szPrinterName);
+typedef int ( *pOpenCOMPort)(DEVICEHANDLE hDev, char *szName, int nComBaudrate, int nComDataBits, int nComStopBits, int nComParity, int nParam);
+typedef int ( *pOpenLPTPort)(DEVICEHANDLE hDev, char *szName);
+typedef int ( *pOpenUsbApiPort)(DEVICEHANDLE hDev, int nDeviceId);
+typedef int ( *pOpenUsbClassPort)(DEVICEHANDLE hDev, char *szName, int nIsSplitStatus);
+typedef int ( *pOpenNetPortByName)(DEVICEHANDLE hDev, char *szName);
+typedef int ( *pOpenNetPort)(DEVICEHANDLE hDev, char *szNetIP, int nPort, int nProtocalType, int nBroadcast);
+typedef int ( *pOpenBlueToothPortByName)(DEVICEHANDLE hDev, char *szName);
+typedef int ( *pOpenBlueToothPort)(DEVICEHANDLE hDev, char *szMACAddress);
+typedef int ( *pOpenDriverPort)(DEVICEHANDLE hDev, char *szName);
+typedef int ( *pClosePort)(DEVICEHANDLE hDev);
+typedef int ( *pSendPortData)(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+typedef int ( *pReadPortData)(DEVICEHANDLE hDev, char *szData, int nDataLength, int *npReturnLen);
+typedef int ( *pSetPortTimeout)(DEVICEHANDLE hDev, int nWriteTimeout, int nReadTimeout);
+typedef int ( *pGetPortTimeout)(DEVICEHANDLE hDev, int *nWriteTimeout, int *nReadTimeout);
+
+/// 位图
+typedef int ( *pPrintBitmap)(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nType);
+typedef int ( *pPrintBitmapByMode)(DEVICEHANDLE hDev, char *szFilePath, int nStartX, int nStartY, int nMode);
+typedef int ( *pPrintTrueType)(DEVICEHANDLE hDev, char *szText, int nStartX, int nStartY, char *szFontName, int nFontHeight, int nFontWidth, int nBold);
+typedef int ( *pDownloadRAMBitmapByFile)(DEVICEHANDLE hDev, char *szFilePath, int nImageID);
+typedef int ( *pPrintRAMBitmap)(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+typedef int ( *pDownloadFlashBitmapByFile)(DEVICEHANDLE hDev, char *szFilePath[], int nImageCount);
+typedef int ( *pPrintFlashBitmap)(DEVICEHANDLE hDev, int nImageID, int nStartX, int nStartY, int nMode);
+
+/// 锟斤拷锟斤拷
+typedef int ( *pPrintBarcode)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nBasicWidth, int nHeight, int nHriFontType, int nHriFontPosition, int nBytesToPrint);
+typedef int ( *pPrintBarcodeSimple)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nType, int nWidth, int nHeight, int nHriFontPosition);
+typedef int ( *pBarcodePrintQR)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nSymbolType, int nLanguageMode, int nErrorCorrect, int nBytesToPrint);
+typedef int ( *pBarcodePrintPDF417)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBasicWidth, int nHeight, int nLines, int nColumns, int nScaleH, int nScaleV, int nCorrectGrade, int nBytesToPrint);
+typedef int ( *pBarcodePrintPDF417Simple)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nWidth, int nHeight);
+typedef int ( *pBarcodePrintMaxicode)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBytesToPrint);
+typedef int ( *pBarcodePrintGS1DataBar)(DEVICEHANDLE hDev, char *szDataBuffer, int nStartX, int nStartY, int nBarcodeType, int nBasicWidth, int nHeight, int nSegmentNum, int nSeparatorHeight, int nBasicHeight, int nHRI, int nAI, int nBytesToPrint);
+typedef int ( *pBarcodeReserveFunction)(DEVICEHANDLE hDev, int nInstructionsName, int nPara1, char *szPara2);
+
+/// 锟侥憋拷
+typedef int ( *pFeedLine)(DEVICEHANDLE hDev);
+typedef int ( *pPrintTextOut)(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY);
+typedef int ( *pUniversalTextOut)(DEVICEHANDLE hDev, char *szTextData, int nStartX, int nStartY, int nWidthTimes, int nHeightTimes, int nFontType, int nFontStyle);
+typedef int ( *pSetTextLineHight)(DEVICEHANDLE hDev, int nLineHeight);
+typedef int ( *pSetTextBold)(DEVICEHANDLE hDev, int nBold);
+typedef int ( *pSetTextDoubleWidthAndHeight)(DEVICEHANDLE hDev, int nWidthEnable, int nHeightEnable);
+typedef int ( *pSetAlignmentMode)(DEVICEHANDLE hDev, int nAlignment);
+typedef int ( *pSetTextCharacterSpace)(DEVICEHANDLE hDev, int nLeftSpace, int nRightSpace, int nMode);
+typedef int ( *pSetTextMagnifyTimes)(DEVICEHANDLE hDev, int nHorMagnifyTimes, int nVerMagnifyTimes);
+typedef int ( *pSetTextFontType)(DEVICEHANDLE hDev, int nFontStyle);
+typedef int ( *pSetTextUpsideDownMode)(DEVICEHANDLE hDev, int nMode);
+typedef int ( *pSetTextOppositeColor)(DEVICEHANDLE hDev, int nEnable);
+typedef int ( *pSetTextColorEnable)(DEVICEHANDLE hDev, int nEnable);
+typedef int ( *pSetTextFontColor)(DEVICEHANDLE hDev, int nFontColor);
+typedef int ( *pSetTextUnderline)(DEVICEHANDLE hDev, int nMode);
+typedef int ( *pSetTextRotate)(DEVICEHANDLE hDev, int nEnable);
+typedef int ( *pSetTextCharsetAndCodepage)(DEVICEHANDLE hDev, int nCharSet, int nCodePage);
+typedef int ( *pSetTextUserDefinedCharacterEnable)(DEVICEHANDLE hDev, int nEnable);
+typedef int ( *pSetTextDefineUserDefinedCharacter)(DEVICEHANDLE hDev, int nStartCode, int nEndCode, int nFontType, char *szChData);
+typedef int ( *pSetTextUniveral)(DEVICEHANDLE hDev, int nInstructionName, int nPara1, char *szPara2);
+
+/// 锟斤拷锟斤拷锟斤拷锟斤拷
+typedef int ( *pDownloadFile)(DEVICEHANDLE hDev, char *szFilePath);
+typedef int ( *pPrintSetMode)(DEVICEHANDLE hDev, int nPrintMode);
+typedef int ( *pPageModeSetArea)(DEVICEHANDLE hDev, int nStartX, int nStartY, int nWidth, int nHeight, int nDirection);
+typedef int ( *pPageModePrint)(DEVICEHANDLE hDev);
+typedef int ( *pPageModeClearBuffer)(DEVICEHANDLE hDev);
+typedef int ( *pFeedLineNumber)(DEVICEHANDLE hDev, int nLineNum);
+typedef int ( *pCutPaper)(DEVICEHANDLE hDev, int nCutMode, int nDistance);
+//typedef int ( *pReset)(DEVICEHANDLE hDev);
+typedef int ( *pKickOutDrawer)(DEVICEHANDLE hDev, int nID, int nOnTimes, int nOffTimes);
+typedef int ( *pApplicationUnit)(DEVICEHANDLE hDev, int nUnit);
+typedef int ( *pPrintDensity)(DEVICEHANDLE hDev, int nDensity);
+typedef int ( *pMotionUnit)(DEVICEHANDLE hDev, int nHorizontalMU, int nVerticalMU);
+typedef int ( *pSelectPaperType)(DEVICEHANDLE hDev, int nPaperType);
+typedef int ( *pSelectPaperTypeEEP)(DEVICEHANDLE hDev, int nPaperType);
+typedef int ( *pBasicSetReserveFunction)(DEVICEHANDLE hDev, int nInstructionName, int nPara1, char *szPara2);
+
+/// 锟斤拷询
+typedef int ( *pRealTimeQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pNonRealTimeQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pAutoQueryStatus)(DEVICEHANDLE hDev, char *szStatus, int nDataLength, int nEnable, unsigned long *nRealDataLength);
+typedef int ( *pFirmwareVersion)(DEVICEHANDLE hDev, char *szFirmwareVersion, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pSoftwareVersion)(DEVICEHANDLE hDev, char *szSoftwareVersion, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pVendorInformation)(DEVICEHANDLE hDev, char *szVendorInformation, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pPrinterName)(DEVICEHANDLE hDev, char *szPrinterName, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pResolutionRatio)(DEVICEHANDLE hDev, char *szResolutionRatio, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pHardwareSerialNumber)(DEVICEHANDLE hDev, char *szHardwareSerialNumber, int nDataLength, unsigned long *nRealDataLength);
+typedef int ( *pQueryReserveFunction)(DEVICEHANDLE hDev, int nInstructionsName, int nPara, char *szPara, unsigned long *nRealDataLength);
+
+/// 锟斤拷志
+typedef int ( *pInstructionsRecord)(DEVICEHANDLE hDev, char *szFileName, char *szFilePath, int nOpen);
+
+
 
 // This class is exported from the PrintSeal.Nantian.1.1.dll
 class ThermalPrint : public ThermalPrintClass
@@ -56,17 +153,18 @@ public:
 	~ThermalPrint();
 
 public:
-	//日志记录指针
+	//锟斤拷志锟斤拷录指锟斤拷
 	CILIXTrace *m_trace;
-	//串口通信类
+	//锟斤拷锟斤拷通锟斤拷锟斤拷
     CILIX_TTY_Op *m_com;
-	//设备是否连接标记	
+	//锟借备锟角凤拷锟斤拷锟接憋拷锟�	
 	bool m_bconnect;
-	//加载动态库成功标记
+	//锟斤拷锟截讹拷态锟斤拷晒锟斤拷锟斤拷
 	bool m_bload;
 	
 	DRV_ReceiptPrinter *m_BY_T080;
 	void* m_hHand;
+	void* hLib_bmp;
 	pCreate_DRV_ReceiptPrinter Create_DRV_ReceiptPrinter_;
 	pDestroy_DRV_ReceiptPrinter Destroy_DRV_ReceiptPrinter_;
 	
@@ -76,18 +174,18 @@ public:
 	char m_fontsize_h;
 	char m_fontsize_w;
 
-/*	//打图片的dll
-	HINSTANCE		hLib ;				//接口库句柄
-	mImageToRamInfo			ImageToRamInfo ;		//ImageToRamInfo接口指针
-	mImageToFlashInfo		ImageToFlashInfo ;	//ImageToFlashInfo接口指针
-	mImageToRasterInfo		ImageToRasterInfo ;	//ImageToRasterInfo接口指针
-	mFreeMemory				FreeMemory ;			//FreeMemory接口指针
+/*	//锟斤拷图片锟斤拷dll
+	HINSTANCE		hLib ;				//锟接口匡拷锟斤拷
+	mImageToRamInfo			ImageToRamInfo ;		//ImageToRamInfo锟接匡拷指锟斤拷
+	mImageToFlashInfo		ImageToFlashInfo ;	//ImageToFlashInfo锟接匡拷指锟斤拷
+	mImageToRasterInfo		ImageToRasterInfo ;	//ImageToRasterInfo锟接匡拷指锟斤拷
+	mFreeMemory				FreeMemory ;			//FreeMemory锟接匡拷指锟斤拷
 */
 	int m_imagepos;
 	int m_isize;
 	int m_leftspase;
 	int m_currentLeftSpace;
-	//纸张大
+	//纸锟脚达拷
 	int m_papersize;
 	bool m_afterprintbmp;
 
@@ -96,7 +194,7 @@ public:
 	int m_currentallmm;
 
 public:
-	bool isloaddll();
+	int GetDeviceStatus(int idxFlag,char**sDevStatua);
 	//int BASE64_Decode( const TCHAR* inputBuffer, int inputCount, BYTE* outputBuffer);
 	//BOOL IsPathExist(const CString & csPath);
 	int updatestatus();
@@ -113,64 +211,152 @@ public:
 	ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo);
 
 	
-	//	打开打印机
+	//	锟津开达拷印锟斤拷
 	ErrorCodeEnum DevOpen(BYTE btPort,DWORD dwBaudRate);
-	//	获取打印机实时状态
+	//	锟斤拷取锟斤拷印锟斤拷实时状态
 	ErrorCodeEnum GetDevState(ThermalState &devState);
 
-	//开始打印初始设置:paperWidth一般为80mm和57mm
+	//锟斤拷始锟斤拷印锟斤拷始锟斤拷锟斤拷:paperWidth一锟斤拷为80mm锟斤拷57mm
 	ErrorCodeEnum BeginPrint(ThermalPaperType eType,int paperWidth);
 
-	//打印控制指令函数:主要是打印,切纸和控制打印光标指令函数
-	//第三个参数是预留参数 暂时无用到
+	//锟斤拷印锟斤拷锟斤拷指锟筋函锟斤拷:锟斤拷要锟角达拷印锟斤拷锟斤拷纸锟酵匡拷锟狡达拷印锟斤拷锟街革拷詈�拷锟�
+	//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷预锟斤拷锟斤拷锟斤拷 锟斤拷时锟斤拷锟矫碉拷
 	ErrorCodeEnum ControlAction(PrintAction eAction,DWORD dwValue1,DWORD dwValue2);
 
-	//打印参数指令函数:
-	//第三个参数是预留参数 暂时无用到
+	//锟斤拷印锟斤拷锟斤拷指锟筋函锟斤拷锟斤拷
+	//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷预锟斤拷锟斤拷锟斤拷 锟斤拷时锟斤拷锟矫碉拷
 	ErrorCodeEnum SetParam(CommandType eType,DWORD dwValue1,DWORD dwValue2);
 
-	//打印字体指令函数:主要是字体相关饿指令函数
-	//第三个参数是预留参数 设置FONT_CUSTOM_SIZE用到,dwValue1表示宽,dwValue2表示长
-	//					设置FONT_LEFT_RIGHT_SPACE用到 dwValue1表示左边距 dwValue2表示右边距
+	//锟斤拷印锟斤拷锟斤拷指锟筋函锟斤拷锟斤拷锟斤拷要锟斤拷锟斤拷锟斤拷锟斤拷囟锟街革拷詈�拷锟�
+	//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷预锟斤拷锟斤拷锟斤拷 锟斤拷锟斤拷FONT_CUSTOM_SIZE锟矫碉拷锟斤拷dwValue1锟斤拷示锟斤拷锟斤拷dwValue2锟斤拷示锟斤拷
+	//					锟斤拷锟斤拷FONT_LEFT_RIGHT_SPACE锟矫碉拷 dwValue1锟斤拷示锟斤拷呔锟� dwValue2锟斤拷示锟揭边撅拷
 	ErrorCodeEnum SetFont(FontStyle eType,DWORD dwValue1,DWORD dwValue2);
 
-	//打印文本数据函数
+	//锟斤拷印锟侥憋拷锟斤拷锟捷猴拷锟斤拷
 	ErrorCodeEnum PrintText(BYTE *pData,DWORD dwDataLen);
 
-	//打印条形码函数
-	//dwUnitWidth 条形码基本模块宽度 取值{2..6} 默认2
-	//dwHeight 条形码高度 单位mm
-	//iHRIPosition hri字符打印位置 见枚举类型HriPosition
+	//锟斤拷印锟斤拷锟斤拷锟诫函锟斤拷
+	//dwUnitWidth 锟斤拷锟斤拷锟斤拷锟斤拷锟侥o拷锟斤拷锟斤拷 取值{2..6} 默锟斤拷2
+	//dwHeight 锟斤拷锟斤拷锟斤拷叨锟� 锟斤拷位mm
+	//iHRIPosition hri锟街凤拷锟斤拷印位锟斤拷 锟斤拷枚锟斤拷锟斤拷锟斤拷HriPosition
 	ErrorCodeEnum PrintBarCode(BarCodeType eType, BYTE *pData,DWORD dwDataLen,DWORD dwUnitWidth,DWORD dwHeight,HriPosition eHRIPosition);
 
-	//打印二维码QRCode函数
-	//dwUnitWidth 二维码基本元素宽度 取值{1..255} 默认3
+	//锟斤拷印锟斤拷维锟斤拷QRCode锟斤拷锟斤拷
+	//dwUnitWidth 锟斤拷维锟斤拷锟斤拷锟皆�拷乜锟斤拷锟� 取值{1..255} 默锟斤拷3
 	ErrorCodeEnum PrintQRCode(BYTE *pData,DWORD dwDataLen,DWORD dwUnitWidth);
 
-	//打印二维码QRCode函数
-	//dwWidth 二维码长度 ,单位mm
+	//锟斤拷印锟斤拷维锟斤拷QRCode锟斤拷锟斤拷
+	//dwWidth 锟斤拷维锟诫长锟斤拷 锟斤拷锟斤拷位mm
 	ErrorCodeEnum PrintQRCodeByArea(BYTE *pData,DWORD dwDataLen,DWORD dwUnitWidth,DWORD dwWidth);
 
-	//打印二维码PDF417函数
-	//errorLevel pdf417纠错级别 取值{0..8}
-	//dwUnitWidth  基本元素宽度 取值{3..90}
-	//dwUnitHeight 基本元素长度 取值{1..30}
-	//row  pdf417 行数 取值{1..7}
-	//lines pdf417 列数 取值{2..25}
+	//锟斤拷印锟斤拷维锟斤拷PDF417锟斤拷锟斤拷
+	//errorLevel pdf417锟斤拷锟斤拷锟斤拷锟斤拷 取值{0..8}
+	//dwUnitWidth  锟斤拷锟斤拷元锟截匡拷锟斤拷 取值{3..90}
+	//dwUnitHeight 锟斤拷锟斤拷元锟截筹拷锟斤拷 取值{1..30}
+	//row  pdf417 锟斤拷锟斤拷 取值{1..7}
+	//lines pdf417 锟斤拷锟斤拷 取值{2..25}
 	ErrorCodeEnum PrintPDF417code(BYTE *pData,DWORD dwDataLen,int errorLevel,DWORD dwUnitWidth,DWORD dwUnitHeight,int rows,int lines);
 
-	//打印二维码PDF417函数
-	//errorLevel pdf417纠错级别 取值{0..8}
-	//dwWidth  pdf417宽度 单位mm
-	//dwHeight pdf417长度 单位mm
+	//锟斤拷印锟斤拷维锟斤拷PDF417锟斤拷锟斤拷
+	//errorLevel pdf417锟斤拷锟斤拷锟斤拷锟斤拷 取值{0..8}
+	//dwWidth  pdf417锟斤拷锟斤拷 锟斤拷位mm
+	//dwHeight pdf417锟斤拷锟斤拷 锟斤拷位mm
 	ErrorCodeEnum PrintPDF417codeByArea(BYTE *pData,DWORD dwDataLen,int errorLevel,DWORD dwWidth,DWORD dwHeight);
 
-	//打印图像函数:pData是base64编码的数据
+	//锟斤拷印图锟斤拷锟斤拷锟斤拷pData锟斤拷base64锟斤拷锟斤拷锟斤拷锟斤拷锟�
 	ErrorCodeEnum PrintImage(BYTE *pData,DWORD dwDataLen);
 
-	//获取打印失败后错误信息和错误状态
+	//锟斤拷取锟斤拷印失锟杰猴拷锟斤拷锟斤拷锟较�拷痛锟斤拷锟阶刺�
 	ErrorCodeEnum GetLastErrState(ThermalState &devState , DevErrorInfo &devErrInfo);
-	
+	pGetBmpInfo GetBmpInfo;
+	pBMP_Zoom BMP_Zoom;
+	public:
+	void* hModule;
+	int portNum;
+	char portname[100];
+	DEVICEHANDLE g_PrintHandle;
+	pEnumDeviceInfo EnumDeviceInfo;
+	pOpenUsbClassPort OpenUsbClassPort;
+	pInit Init;
+	pClosePort ClosePort;
+	pSendPortData SendPortData;
+	pReadPortData ReadPortData;
+	pSetPortTimeout SetPortTimeout;
+	pGetPortTimeout GetPortTimeout;
+	pOpenUsbApiPort OpenUsbApiPort;
+	pOpenNetPort OpenNetPort;
+	pOpenCOMPort OpenCOMPort;
+	pOpenLPTPort OpenLPTPort;
+	pOpenNetPortByName OpenNetPortByName;
+	pOpenBlueToothPortByName OpenBlueToothPortByName;
+	pOpenBlueToothPort OpenBlueToothPort;
+	pOpenDriverPort OpenDriverPort;
+
+	//query
+	pRealTimeQueryStatus RealTimeQueryStatus;
+	pNonRealTimeQueryStatus NonRealTimeQueryStatus;
+	pAutoQueryStatus AutoQueryStatus;
+	pFirmwareVersion FirmwareVersion;
+	pSoftwareVersion SoftwareVersion;
+	pVendorInformation VendorInformation;
+	pPrinterName PrinterName;
+	pResolutionRatio ResolutionRatio;
+	pHardwareSerialNumber HardwareSerialNumber;
+
+	//text
+	pFeedLine FeedLine;
+	pPrintTextOut PrintTextOut;
+	pUniversalTextOut UniversalTextOut;
+	pSetTextLineHight SetTextLineHight;
+	pSetTextBold SetTextBold;
+	pSetTextDoubleWidthAndHeight SetTextDoubleWidthAndHeight;
+	pSetAlignmentMode SetAlignmentMode;
+	pSetTextCharacterSpace SetTextCharacterSpace;
+	pSetTextMagnifyTimes SetTextMagnifyTimes;
+	pSetTextFontType SetTextFontType;
+	pSetTextUpsideDownMode SetTextUpsideDownMode;
+	pSetTextOppositeColor SetTextOppositeColor;
+	pSetTextColorEnable SetTextColorEnable;
+	pSetTextFontColor SetTextFontColor;
+	pSetTextUnderline SetTextUnderline;
+	pSetTextRotate SetTextRotate;
+	pSetTextCharsetAndCodepage SetTextCharsetAndCodepage;
+	pSetTextUserDefinedCharacterEnable SetTextUserDefinedCharacterEnable;
+	pSetTextDefineUserDefinedCharacter SetTextDefineUserDefinedCharacter;
+
+	//bitmap
+	pPrintBitmap PrintBitmap;
+	pPrintBitmapByMode PrintBitmapByMode;
+	pDownloadRAMBitmapByFile DownloadRAMBitmapByFile;
+	pPrintRAMBitmap PrintRAMBitmap;
+	pDownloadFlashBitmapByFile DownloadFlashBitmapByFile;
+	pPrintFlashBitmap PrintFlashBitmap;
+	pPrintTrueType PrintTrueType;
+
+	//barcode
+	pPrintBarcode PrintBarcode;
+	pPrintBarcodeSimple PrintBarcodeSimple;
+	pBarcodePrintQR BarcodePrintQR;
+	pBarcodePrintPDF417 BarcodePrintPDF417;
+	pBarcodePrintPDF417Simple mpBarcodePrintPDF417Simple;
+	pBarcodePrintMaxicode BarcodePrintMaxicode;
+	pBarcodePrintGS1DataBar BarcodePrintGS1DataBar;
+
+	//basic set
+	pDownloadFile DownloadFile;
+	pPrintSetMode PrintSetMode;
+	pPageModeSetArea PageModeSetArea;
+	pPageModePrint PageModePrint;
+	pPageModeClearBuffer PageModeClearBuffer;
+	pFeedLineNumber FeedLineNumber;
+	pCutPaper CutPaper;
+	//pReset Reset;
+	pKickOutDrawer KickOutDrawer;
+	pApplicationUnit ApplicationUnit;
+	pPrintDensity PrintDensity;
+	pMotionUnit MotionUnit;
+	pSelectPaperType SelectPaperType;
+	pSelectPaperTypeEEP SelectPaperTypeEEP;
 };
 
 THERMALPRINT_API ErrorCodeEnum  CreateDevComponent(DeviceBaseClass *&baseObj);

+ 22 - 2
DevAdapter/nantian/ups.1.1/ups.nantian.1.1.cpp

@@ -320,7 +320,27 @@ ErrorCodeEnum CUps::GetDevStatus(UpsStatusEnum &eStatus)
 		g_flag = false;
 		return Error_Param;
 	}
+        m_trace->WriteTrace("GetDevStatus","%02x %02x %02x %02x %02x %02x %02x %02x",buff[38], buff[39], buff[40],
+                buff[41], buff[42], buff[43], buff[44], buff[45]);
 	//通信设备正常UPS开关状态量为30 30 30 30 31 30 30 31
+        if (buff[38] == 0x30 && buff[39] == 0x30 && buff[40] == 0x30 && buff[41] == 0x30 && buff[42] == 0x31 &&
+                buff[43] == 0x30 && buff[44] == 0x30 && buff[45] == 0x30)
+        {
+                m_trace->WriteTrace("GetDevStatus","UPS设备通信正常ELECTOR");
+                istatus = 0;
+                memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+                strcpy(m_Error.szErrMsg,"UPS设备通信正常");
+                m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+        }
+        if (buff[38] == 0x31 && buff[39] == 0x30 && buff[40] == 0x30 && buff[41] == 0x30 && buff[42] == 0x31 &&
+                buff[43] == 0x30 && buff[44] == 0x30 && buff[45] == 0x30)
+        {
+                m_trace->WriteTrace("GetDevStatus","UPS设备通信正常NOELECTOR");
+                istatus = 1;
+                memset(m_Error.szErrMsg,0,sizeof(m_Error.szErrMsg));
+                strcpy(m_Error.szErrMsg,"UPS设备通信正常");
+                m_Error.dwErrMsgLen = strlen(m_Error.szErrMsg);
+        }
 	if (buff[38] == 0x30 && buff[39] == 0x30 && buff[40] == 0x30 && buff[41] == 0x30 && buff[42] == 0x31 &&
 		buff[43] == 0x30 && buff[44] == 0x30 && buff[45] == 0x31)
 	{
@@ -478,8 +498,8 @@ ErrorCodeEnum CUps::GetDevCategory(DevCategoryInfo &devCategory)
 {
 	ErrorCodeEnum err = Error_Succeed;
     strcpy(devCategory.szModel, "WEK-HB600");
-    strcpy(devCategory.szType, "UPS");
-    strcpy(devCategory.szVendor, "NANTIAN");
+    strcpy(devCategory.szType, "PVER=WEK#MID=WEK-HB600");
+    strcpy(devCategory.szVendor, "nantian");
 	
 	return err;
 }

+ 75 - 17
DevAdapter/nantian/watchdog.1.1/watchdog.nantian.cpp

@@ -8,6 +8,28 @@ watchdog_nantian::watchdog_nantian()
     m_device = NULL;
     VC_Creat_WATCHDOG = NULL;
     VC_Destory_WATCHDOG = NULL;
+    m_loadDllFlag = false;
+    //初始化日志
+	char INIPath[100] = "";
+	CILIX_AUX_X::CILIX_GetModuleCurPath(INIPath);
+	strcat(INIPath, "log.nantian.ini");
+
+	char log_dir[100] = "";
+	CILIX_AUX_X::CILIX_X_INIKeyString(INIPath, "LOGConfig", "log_dir", log_dir, "/etc/nantian");
+	char log_level[100] = "";
+	CILIX_AUX_X::CILIX_X_INIKeyString(INIPath, "LOGConfig", "log_level", log_level, "3");
+
+	cmb::log_init_config config;
+	config.dev_name = "watchdog";
+	config.log_dir = log_dir;
+	config.log_level = atoi(log_level);
+
+	std::string str;
+	cmb::log4vendor::init(config, str);
+	LOG4VTM(WARN, "watchdog_nantian::watchdog_nantian "
+					  << "libWatchDog.nantian.1.1.so -v 1.0.0.1");
+    //加载设备库
+	m_loadDllFlag = LoadNTDRVSO();
 }
 
 watchdog_nantian::~watchdog_nantian()
@@ -29,23 +51,31 @@ bool watchdog_nantian::LoadNTDRVSO()
     CILIX_AUX_X::CILIX_GetModuleCurPath(sCurPath);
     sprintf(sSOPath, "%snantian/libwdt.nantian.so", sCurPath);
     m_trace->WriteTrace("watchdog_nantian::LoadNTDRVDLL", "DLLPath=%s", sSOPath);
+    LOG4VTM(WARN, "watchdog_nantian::LoadNTDRVSO"
+					  << "DLLPath=" << sSOPath);
     void *pszErr = NULL;
     dplHandle = dlopen(sSOPath, RTLD_LAZY);
     if (!dplHandle || pszErr)
     {
         m_trace->WriteTrace("LoadDRVSO", "Load SO Fail!,reson:%s", dlerror());
+        LOG4VTM(WARN, "watchdog_nantian::LoadNTDRVDLL"
+						  << "Load SO Fail!,reson:%s" << dlerror());
         return false;
     }
     VC_Creat_WATCHDOG = (pCreat_WATCHDOG)dlsym(dplHandle, "Creat_WATCHDOG");
     if (VC_Creat_WATCHDOG == NULL)
     {
         m_trace->WriteTrace("LoadDRVSO", "Load Creat_WATCHDOG Fali!");
+        LOG4VTM(WARN, "watchdog_nantian::LoadNTDRVDLL"
+						  << "Load Creat_WATCHDOG Fali!");
         return false;
     }
     VC_Destory_WATCHDOG = (pDestory_WATCHDOG)dlsym(dplHandle, "Destory_WATCHDOG");
     if (VC_Destory_WATCHDOG == NULL)
     {
         m_trace->WriteTrace("LoadDRVSO", "Load Destory_WATCHDOG Fail!");
+        LOG4VTM(WARN, "watchdog_nantian::"
+						  << "Load Destory_WATCHDOG Fail!");
         return false;
     }
     m_device = VC_Creat_WATCHDOG();
@@ -76,10 +106,12 @@ ErrorCodeEnum watchdog_nantian::GetLastErr(DevErrorInfo &devErrInfo)
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "GetLastErr", &iret);
-
+    LOG4VTM(WARN, "GetLastErr "
+					  << "Enter");
     devErrInfo.dwErrMsgLen = m_errorInfo.dwErrMsgLen;
     strcpy(devErrInfo.szErrMsg, m_errorInfo.szErrMsg);
-
+    LOG4VTM(WARN, "GetLastErr "
+					  << "Exit");
     return Error_Succeed;
 }
 
@@ -87,9 +119,8 @@ ErrorCodeEnum watchdog_nantian::DevOpen()
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "DevOpen", &iret);
-    //加载设备库
-    bool loadSoFlag = LoadNTDRVSO();
-    if (!loadSoFlag)
+    //判断设备库加载是否成功
+    if (this->m_loadDllFlag == false)
     {
         memset(m_errorInfo.szErrMsg, 0, sizeof(m_errorInfo.szErrMsg));
         strcpy(m_errorInfo.szErrMsg, "load vendor so failed!");
@@ -98,8 +129,10 @@ ErrorCodeEnum watchdog_nantian::DevOpen()
         iret = Error_DevLoadFileFailed;
         return Error_DevLoadFileFailed;
     }
-    int iret1 = m_device->OpenDevice();
-    if (iret1 != 0)
+    iret = m_device->OpenDevice();
+    LOG4VTM(WARN, "DevOpen "
+					  << "Invoke OpenDevice" << "return: " << iret );
+    if (iret != 0)
     {
         memset(m_errorInfo.szErrMsg, 0, sizeof(m_errorInfo.szErrMsg));
         strcpy(m_errorInfo.szErrMsg, "connect to device failed!");
@@ -108,7 +141,8 @@ ErrorCodeEnum watchdog_nantian::DevOpen()
         iret = Error_DevConnFailed;
         return Error_DevConnFailed;
     }
-
+    LOG4VTM(WARN, "DevOpen "
+					  << "Exit ");
     return Error_Succeed;
 }
 
@@ -116,7 +150,13 @@ ErrorCodeEnum watchdog_nantian::DevClose()
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "DevClose", &iret);
-    int iret1 = m_device->CloseDevice();
+    LOG4VTM(WARN, "DevClose "
+					  << "Enter ");
+    iret = m_device->CloseDevice();
+    LOG4VTM(WARN, "DevClose "
+					  << "Invoke CloseDevice" << "return: " << iret );
+    LOG4VTM(WARN, "DevClose "
+					  << "Exit ");
     return Error_Succeed;
 }
 ErrorCodeEnum watchdog_nantian::GetDevCategory(DevCategoryInfo &devCategory)
@@ -125,8 +165,9 @@ ErrorCodeEnum watchdog_nantian::GetDevCategory(DevCategoryInfo &devCategory)
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "GetDevCategory", &iret);
     //赋值
-    strcpy(devCategory.szType, "Watchdog");
-    strcpy(devCategory.szVendor, "Nantian");
+    strcpy(devCategory.szType, "PVER=NT#MID=NTDOG");
+    strcpy(devCategory.szVendor, "nantian");
+    strcpy(devCategory.szModel,"FWID=1.0.0.1");
     devCategory.version.wMajor = 1;
     devCategory.version.wMinor = 0;
     devCategory.version.wRevision = 0;
@@ -141,7 +182,10 @@ ErrorCodeEnum watchdog_nantian::Reset()
 
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "Reset", &iret);
-
+    LOG4VTM(WARN, "Reset "
+					  << "Enter ");
+    LOG4VTM(WARN, "Reset "
+					  << "Exit ");
     //直接返回成功
     return Error_Succeed;
 }
@@ -149,8 +193,12 @@ ErrorCodeEnum watchdog_nantian::StartWatch(DWORD dwDelay, DWORD dwTimeout)
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "StartWatch", &iret);
+    LOG4VTM(WARN, "StartWatch "
+					  << "Enter ");
     m_trace->WriteTrace("StartWatch", "dwDelay=%ld, dwTimeout=%ld", dwDelay, dwTimeout);
     int iret1 = m_device->wdtStart(dwDelay, dwTimeout);
+    LOG4VTM(WARN, "StartWatch "
+					  << "Invoke wdtStart" << "return: " << iret1 );
     m_trace->WriteTrace("StartWatch", "Invoke so wdtStart, return %d", iret1);
     if (iret1 != 0)
     {
@@ -161,14 +209,19 @@ ErrorCodeEnum watchdog_nantian::StartWatch(DWORD dwDelay, DWORD dwTimeout)
         iret = Error_DevConnFailed;
         return Error_DevConnFailed;
     }
-
+    LOG4VTM(WARN, "StartWatch "
+					  << "Exit ");
     return Error_Succeed;
 }
 ErrorCodeEnum watchdog_nantian::StopWatch()
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "StopWatch", &iret);
+    LOG4VTM(WARN, "StopWatch "
+					  << "Enter ");
     int iret1 = m_device->wdtStop();
+    LOG4VTM(WARN, "wdtStop "
+					  << "Invoke wdtStop" << "return: " << iret1 );
     m_trace->WriteTrace("StartWatch", "Invoke so wdtStop, return %d", iret1);
     if (iret1 != 0)
     {
@@ -179,16 +232,20 @@ ErrorCodeEnum watchdog_nantian::StopWatch()
         iret = Error_DevConnFailed;
         return Error_DevConnFailed;
     }
-
+    LOG4VTM(WARN, "StopWatch "
+					  << "Exit ");
     return Error_Succeed;
 }
 ErrorCodeEnum watchdog_nantian::RefreshDog()
 {
     int iret = Error_Succeed;
     CILIXAutoTrace __at(m_trace, "RefreshDog", &iret);
-
+    //LOG4VTM(WARN, "RefreshDog "
+					  //<< "Enter ");
     int iret1 = m_device->wdtRefresh();
-    m_trace->WriteTrace("StartWatch", "Invoke so wdtRefresh, return %d", iret1);
+    LOG4VTM(WARN, "RefreshDog "
+					  << "Invoke wdtRefresh" << "return: " << iret1 );
+    m_trace->WriteTrace("RefreshDog", "Invoke so wdtRefresh, return %d", iret1);
     if (iret1 != 0)
     {
         memset(m_errorInfo.szErrMsg, 0, sizeof(m_errorInfo.szErrMsg));
@@ -198,6 +255,7 @@ ErrorCodeEnum watchdog_nantian::RefreshDog()
         iret = Error_DevConnFailed;
         return Error_DevConnFailed;
     }
-
+    //LOG4VTM(WARN, "RefreshDog "
+					  //<< "Exit ");
     return Error_Succeed;
 }

+ 3 - 0
DevAdapter/nantian/watchdog.1.1/watchdog.nantian.h

@@ -2,6 +2,8 @@
 #include "WatchDogClass.h"
 //辅助类
 #include "CILIX_AUX_UTILS.h"
+//日志类
+#include "log4vendor.h"
 
 #include "WATCHDOG.h"
 
@@ -38,6 +40,7 @@ extern "C"
         WATCHDOG *m_device;
         CILIXTrace *m_trace;
         DevErrorInfo m_errorInfo;
+        bool m_loadDllFlag;
         bool LoadNTDRVSO();
         pCreat_WATCHDOG VC_Creat_WATCHDOG;
         pDestory_WATCHDOG VC_Destory_WATCHDOG;

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません