DioDmSetStartPattern


Function

Sets pattern matching conditions for start conditions.

Format

Ret = DioDmSetStartPattern ( Id , Ptn , Mask )

Parameters

Id [C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.

Ptn [C:unsigned long] [Python: ctypes.c_ulong]
Bit pattern to be compared is set.

Mask [C:unsigned long] [Python: ctypes.c_ulong]
Execute mask specification on the valid bit for the pattern.
(Invalid:Bit=0,Valid:Bit=1)

Return Value

Ret [C:long] [Python: ctypes.c_long]

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal complete

DIO_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

DIO_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

The other errors: (See also: Error code details)

Initial Value

None

Remarks

Valid in the case where DIODM_START_PATTERN is specified for the start conditions by the DioDmSetStartTrg functions.
This function is only valid in the case of input.

Example

C

Ret = DioDmSetStartPattern( Id, 0x55, 0xFF );
 

Python

Ret = cdio.DioDmSetStartPattern( Id, 0x55, 0xFF )
 

See Also

DioDmSetStartTrg