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_get_info()

정의

serial_get_info(id)

기능

연결된 USB to Serial의 포트정보, 장치이름을 읽어옵니다.

인수

인수명

자료형

기본값

설명

id

int

1

읽고싶은 USB to Serial의 ID (1~10)

리턴

값(port_info, device_name)

설명

port_info

포트정보 (값이 NULL인 경우 연결된 장치 없음)

device_name

장치이름 (값이 NULL인 경우 연결된 장치 없음)

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

인수의 값이 유효하지 않을 시

예제

Python
port_info, device_name = serial_get_info(1) #1번째 연결된 장치의 정보조회 
# port_info = “COM_USB”
ser = serial_open(port=port_info, baudrate=115200, bytesize=DR_EIGHTBITS, 
                  parity=DR_PARITY_NONE, stopbits=DR_STOPBITS_ONE)

Keyword

serial / serial_ / serial_get / get_info / info