3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

serial_set_inter_byte_timeout()

정의

serial_set_inter_byte_timeout(ser, timeout=None)

기능

포트에 읽기/쓰기를 수행할 때 바이트 간(inter-byte)의 timeout을 설정합니다.

인수

인수명

자료형

기본값

설명

ser

serial.Serial

-

Serial instance

timeout

float

None

읽기/쓰기 수행 시, 바이트 간의 timeout

  • timeout 발생 이전까지 처리된 데이터를 연속적인 데이터로 처리

  • None : inter-byte timeout을 지정하지 않음

리턴

설명

0

성공

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수의 데이터형 오류 시

예제

Python
ser = serial_open(port="COM", baudrate=115200, bytesize=DR_EIGHTBITS, 
        parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)

res = serial_set_inter_byte_timeout(ser, 0.1)

serial_close(ser)

Keyword

serial / inter / byte / inter_byte / timeout / byte_timeout / inter_byte_timeout