POSAPI
类 POSUSBAPI

java.lang.Object
  继承者 POSAPI.POSInterfaceAPI
      继承者 POSAPI.POSUSBAPI

public class POSUSBAPI
extends POSInterfaceAPI


字段摘要
static int ERR_PROCESSING
           
 UsbAccessory mAccessory
           
 UsbManager mUsbManager
           
static int POS_SUCCESS
           
static int WRITEBYTEMAX
           
 
从类 POSAPI.POSInterfaceAPI 继承的字段
ERR_PARAM
 
构造方法摘要
POSUSBAPI(Activity activity)
          函数名称:POSUsbJAR 函数功能:类对象实例化 参数描述: 返回值说明:
 
方法摘要
 int CloseDevice()
          函数名称:CloseDevice 函数功能:关闭端口 参数描述: 返回值说明:
 int OpenDevice()
          函数名称:OpenDevice 函数功能:打印USB设备端口 参数描述: 返回值说明:
 int ReadBuffer(byte[] ReadBuffer, int OffsetSize, int nBytesToRead, int ReadTimeOut)
          函数名称:ReadBuffer 函数功能:从管道2读取数据 参数描述:。
 int ReadBuffer(byte[] ReadBuffer, int OffsetSize, int nBytesToRead, int ReadTimeOut, int PortNum)
          函数名称:ReadBuffer 函数功能:从指定管道读取数据 参数描述:
 int WriteBuffer(byte[] WriteBuffer, int OffsetSize, int nBytesToWrite, int WriteTimeOut)
          函数名称:WriteBuffer 函数功能:发送数据 参数描述:
 
从类 POSAPI.POSInterfaceAPI 继承的方法
OpenDevice, OpenDevice, OpenDevice, WIFIsearchPort
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

POS_SUCCESS

public static final int POS_SUCCESS
另请参见:
常量字段值

ERR_PROCESSING

public static final int ERR_PROCESSING
另请参见:
常量字段值

WRITEBYTEMAX

public static final int WRITEBYTEMAX
另请参见:
常量字段值

mUsbManager

public UsbManager mUsbManager

mAccessory

public UsbAccessory mAccessory
构造方法详细信息

POSUSBAPI

public POSUSBAPI(Activity activity)
函数名称:POSUsbJAR 函数功能:类对象实例化 参数描述: 返回值说明:

方法详细信息

OpenDevice

public int OpenDevice()
函数名称:OpenDevice 函数功能:打印USB设备端口 参数描述: 返回值说明:

覆盖:
POSInterfaceAPI 中的 OpenDevice
返回:
成功:POS_SUCCESS,失败:ERR_PROCESSING

WriteBuffer

public int WriteBuffer(byte[] WriteBuffer,
                       int OffsetSize,
                       int nBytesToWrite,
                       int WriteTimeOut)
函数名称:WriteBuffer 函数功能:发送数据 参数描述:

覆盖:
POSInterfaceAPI 中的 WriteBuffer
参数:
WriteBuffer[in]: - 发送端口数据的缓冲区
OffsetSize[in]: - 发送数据的地址的偏移量
nBytesToWrite[in]:发送端口数据的字节数 -
WriteTimeOut[in]:发送端口数据超时设置 - 返回值说明:
返回:
成功:返回实际写入的字节数,失败:返回0

ReadBuffer

public int ReadBuffer(byte[] ReadBuffer,
                      int OffsetSize,
                      int nBytesToRead,
                      int ReadTimeOut)
函数名称:ReadBuffer 函数功能:从管道2读取数据 参数描述:。

覆盖:
POSInterfaceAPI 中的 ReadBuffer
参数:
ReadBuffer[in]: - 存放读取数据的缓冲区
OffsetSize[in]: - 读取数据的地址的偏移量
nBytesToWrite[in]:读取数据的字节数 -
ReadTimeOut[in]: - 读取数据超时设置 返回值说明:
返回:
成功:返回实际写入的字节数,失败:返回0

ReadBuffer

public int ReadBuffer(byte[] ReadBuffer,
                      int OffsetSize,
                      int nBytesToRead,
                      int ReadTimeOut,
                      int PortNum)
函数名称:ReadBuffer 函数功能:从指定管道读取数据 参数描述:

覆盖:
POSInterfaceAPI 中的 ReadBuffer
参数:
ReadBuffer[in]: - 存放读取数据的缓冲区
OffsetSize[in]: - 读取数据的地址的偏移量
nBytesToWrite[in]: - 读取数据的字节数
ReadTimeOut[in]: - 读取数据超时设置
PortNum[in]: - USB口管道号,FIRSTPORT:管道1,SECONDPORT:管道2。 返回值说明:
返回:
成功:返回实际写入的字节数,失败:返回0

CloseDevice

public int CloseDevice()
函数名称:CloseDevice 函数功能:关闭端口 参数描述: 返回值说明:

覆盖:
POSInterfaceAPI 中的 CloseDevice
返回:
成功:POS_SUCCESS,失败:ERR_PROCESSING