如何使用C#.Net实现POS扫描仪的DirectIO事件? [英] How I Can Implement DirectIO Event Of POS Scanner Using C#.Net?

查看:321
本文介绍了如何使用C#.Net实现POS扫描仪的DirectIO事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Pos Scanner的DirectIO事件生成错误的提示音,但我不知道正确的参数.事件名称是DirectIO,它使用了三个参数,其语法是:

I'm trying to generate error beep sound using DirectIO event of Pos Scanner but I have no idea about the correct parameters.The event name is DirectIO and it took three parameters his syntax is :

directIO(DIO_SCANNER_DIO_ERROR_BEEP,数据,对象);

directIO(DIO_SCANNER_DIO_ERROR_BEEP, data, object);

我们不知道上述事件接受该参数.您能否以C#/VB.Net中的示例为我们提供有关上述事件的更多详细信息.

we don't know the parameter accepts by the above event. Could you please provide us more details about the above event with example in C#/VB.Net.

扫描仪详细信息:DataLogic Magellan 9800i

Scanner Details: DataLogic Magellan 9800i

谢谢

推荐答案

这是一个较旧的资料,但是受支持的功能可能会因扫描仪的型号和连接方法而异.
OEM USB,RS232标准RS232单电缆OPOS服务对象

This is a little old material, but the supported functions may differ depending on the scanner model and connection method.
OEM USB, RS232 Standard RS232 Single Cable OPOS Service Objects

如果要通过POS for .NET调用OPOS,请参阅此页面.
PosCommon.DirectIO方法(适用于POS .NET v1.12 SDK文档)

If you are calling OPOS via POS for .NET, please refer to this page.
PosCommon.DirectIO Method (POS for .NET v1.12 SDK Documentation)

public abstract DirectIOData DirectIO (
    int command,
    int data,
    Object obj
)

参数

  • 命令
    命令编号.服务对象分配的特定值.
  • 数据
  • obj
  • command
    Command number. Specific values assigned by the Service Object.
  • data
  • obj

备注
使用DirectIO方法允许服务对象向应用程序提供其设备类的标准服务对象不支持的功能.根据服务对象对命令的定义,DirectIO方法可以是异步的也可以是同步的.

Remarks
Using the DirectIO method allows a Service Object to provide functionality to the application that is not otherwise supported by the standard Service Object for its device class. Depending on the Service Object’s definition of the command, the DirectIO method may be asynchronous or synchronous.

DirectIO返回DirectIOData类的实例.

DirectIO returns an instance of the DirectIOData class.

DirectIOData成员(POS适用于.NET v1.12 SDK文档)

扫描程序对象必须处于DeviceEnabled = true状态.

The Scanner object must be in the DeviceEnabled=true state.

除非另有指定,否则data参数应为0,而obj参数应为空字符串.

Unless otherwise specified, the data parameter should be 0 and the obj parameter should be an empty string.

如果直接调用OPOS,请参见以下资源:
UnifiedPOSs(POS)和OPOSPOS Control >

If you are calling OPOS directly, see for example the following resources:
UnifiedPOS (UPOS) Controls Combined JavaPOS and OPOS Controls

扫描仪控件的8-1 DirectIO命令详细信息

8-1 DirectIO Command Details for Scanner Controls

这时,为pDatapString参数定义一些变量,并使用ref指定.
例如:

At this time, define some variables for pData and pString parameters, and specify with ref.
For example:

int pData = 0;
string pString = "";

int result = axOPOSScanner1.DirectIO(DIO_SCANNER_DIO_ERROR_BEEP, ref pData, ref pString);

这篇关于如何使用C#.Net实现POS扫描仪的DirectIO事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆