DRV_DioGetLatestEventDiPortsState

INT32S DRV_DioGetLatestEventDiPortsState(
   PTR_T DeviceHandle,
   INT32U dwEventID,
   BYTE *pBuffer,
   INT32U dwLength );

Purpose

On the device indicated by the DeviceHandle, get the latest block data when specified DI event occurs.

Parameters

The user needs to provide a buffer that is large enough to store retrieved data.

Name

Direction

Range

Description

DeviceHandle

input

default

The pointer retrieved from the DRV_DeviceOpen which specifies the target device.

dwEventID

input

default

The DI event ID to enable.

pBuffer

output

default

The pointer to buffer receiving the DI data.

dwLength

input

default

The length of buffer.

Return

1. 0

Successful.

2. InvalidDeviceHandle

The DeviceHandle is NULL.

3. InvalidInputParam

The point to the user's buffer(pBuffer) is NULL.

4. InvalidEventType

The DI event ID(dwEventID) is not supported.