DioDmSetStartPattern


Function

Sets pattern matching conditions for start conditions.

Format

Ret = DioDmSetStartPattern ( Id , Ptn , Mask )

Parameters

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

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

Mask [ C, 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, 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

Sets 55h on Bit0 and ffh on Bit1 for the pattern matching condition.

C, C++

long Ret;

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

Python

Ret = ctypes.c_long()

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

See Also

DioDmSetStartTrg