How I Can Implement DirectIO Event Of POS Scanner Using C#.Net?

元气小坏坏 提交于 2020-06-17 12:54:51

问题


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, data, object);

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.

Scanner Details: DataLogic Magellan 9800i

Thanks,


回答1:


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

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
)

Parameters

  • command
    Command number. Specific values assigned by the Service Object.
  • data
  • obj

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 returns an instance of the DirectIOData class.

DirectIOData Members (POS for .NET v1.12 SDK Documentation)

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

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


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

8-1 DirectIO Command Details for Scanner Controls

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);


来源:https://stackoverflow.com/questions/61888981/how-i-can-implement-directio-event-of-pos-scanner-using-c-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!