DioGetDeviceInfo


Function

Retrieves the device information.

Format

Ret = DioGetDeviceInfo ( Device , InfoType , Param1 , Param2 , Param3 )

Parameters

Device [ VB.NET: String ] [ C, C++: char * ] [ C#: string ] [ Python: ctypes.c_char_p ]
Specify the device name. (For example: "PIO-32/32L(PCI)H")

InfoType [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the type of the information to be retrieved. The information type is one of the following definition values.

Definition

Value

[Dec]

Description

Parameter

IDIO_DEVICE_TYPE

0

Device type

Param1(short)

IDIO_NUMBER_OF_8255

1

The number of 8255 chips

Param1(int)

IDIO_IS_8255_BOARD

2

Whether has 8255 chip

Param1(int)

IDIO_NUMBER_OF_DI_BIT

3

The number of input bits

Param1(short)

IDIO_NUMBER_OF_DO_BIT

4

The number of output bits

Param1(short)

IDIO_NUMBER_OF_DI_PORT

5

The number of input ports

Param1(short)

IDIO_NUMBER_OF_DO_PORT

6

The number of output ports

Param1(short)

IDIO_IS_POSITIVE_LOGIC

7

Whether is positive logic

Param1(int)

IDIO_IS_ECHO_BACK

8

With callback function

Param1(int)

IDIO_IS_DIRECTION

9

DioSetIoDirection function can be used

Param1(int)

IDIO_IS_FILTER

10

Digital filter can be used

Param1(int)

IDIO_NUMBER_OF_INT_BIT

11

The number of available interrupt bits

Param1(short)

Definition values of device type

Definition

Description

DEVICE_TYPE_ISA

ISA or C bus

DEVICE_TYPE_PCI

PCI bus

DEVICE_TYPE_PCMCIA

PCMCIA

DEVICE_TYPE_USB

USB

DEVICE_TYPE_FIT

FIT

DEVICE_TYPE_CARDBUS

CardBus

DEVICE_TYPE_NET

Network

Param1, Param2, Param3
Specifies the address of the parameter matches with the information type. Specify it to NULL for the parameter that is not necessary.

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal completed.

DIO_ERR_SYS_RECOVERED_FROM_STANDBY

7

Execute DioResetDevice function because the device has recovered from standby mode.

DIO_ERR_INFO_INVALID_DEVICE

10050

Invalid device information specified. Please check the spell.

DIO_ERR_INFO_NOT_FIND_DEVICE

10051

Not find the available device.

DIO_ERR_INFO_INVALID_INFOTYPE

10052

Specified device information type beyond the limit.

The others (See also: Details of Error Code)

Initial Value

None

Remarks

Retrieves the device information.

Example

Retrieves the device type of "PIO-32/32L(PCI)".

VB.NET

Dim Ret As Integer
Dim DeviceType As Short
Ret = DioGetDeviceInfo ( "PIO-32/32L(PCI)" , IDIO_DEVICE_TYPE , DeviceType , 0 , 0 )
 

C, C++

long Ret;
short DeviceType;
Ret = DioGetDeviceInfo ( "PIO-32/32L(PCI)" , IDIO_DEVICE_TYPE , &DeviceType , NULL , NULL );
 

C#

int Ret;
short DeviceType;
Ret = dio.GetDeviceInfo ( "PIO-32/32L(PCI)" , IDIO_DEVICE_TYPE , out DeviceType , null , null );
 

Python

Ret = ctypes.c_long()
DeviceType = ctypes.c_short()
Ret.value = cdio.DioGetDeviceInfo ( "PIO-32/32L(PCI)" , cdio.IDIO_DEVICE_TYPE ,ctypes.byref(DeviceType) , 0 , 0 )