QModbusRtuSerialClient Class
QModbusRtuSerialClient 클래스는 Modbus 서버와의 통신에 시리얼 버스를 사용하는 Modbus 클라이언트를 나타냅니다. 더 보기...
| 헤더: | #include <QModbusRtuSerialClient> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus) target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
| 다음부터: | Qt 6.2 |
| 상속: | QModbusClient |
공개 함수
| QModbusRtuSerialClient(QObject *parent = nullptr) | |
| int | interFrameDelay() const |
| void | setInterFrameDelay(int microseconds) |
| void | setTurnaroundDelay(int turnaroundDelay) |
| int | turnaroundDelay() const |
재구현된 보호 함수
상세 설명
Modbus를 통한 통신은 단일 Modbus 클라이언트 인스턴스와 여러 Modbus 서버 간의 상호 작용을 필요로 합니다. 이 클래스는 직렬 포트를 통해 클라이언트 구현을 제공합니다.
멤버 함수 문서
[explicit] QModbusRtuSerialClient::QModbusRtuSerialClient(QObject *parent = nullptr)
지정된 parent 를 사용하여 시리얼 Modbus 클라이언트를 생성합니다.
[override virtual protected] void QModbusRtuSerialClient::close()
QModbusDevice::close()을 재구현합니다.
int QModbusRtuSerialClient::interFrameDelay() const
연속된 두 Modbus 메시지 사이의 무신호 간격에 해당하는 마이크로초 수를 반환합니다.
setInterFrameDelay()도 참조하십시오 .
[override virtual protected] bool QModbusRtuSerialClient::open()
QModbusDevice::open()를 재구현합니다.
참고: 이 함수를호출하면 직렬 포트에서 기존 버퍼링된 데이터가 제거됩니다.
void QModbusRtuSerialClient::setInterFrameDelay(int microseconds)
연속된 두 Modbus 메시지 사이의 무신호 간격에 대한 지연 시간( microseconds )의 길이를 설정합니다. 기본적으로 클래스 구현체는 Modbus 사양에 따라 미리 계산된 값을 사용합니다. 활성 상태이거나 실행 중인 연결은 이러한 지연 시간 변경의 영향을 받지 않습니다.
참고: ` microseconds `가 -1로 설정되거나 ` microseconds `가 미리 계산된 지연 시간보다 작을경우 , 이 미리 계산된 값이 프레임 지연 시간으로 사용됩니다.
interFrameDelay()도 참조하십시오 .
void QModbusRtuSerialClient::setTurnaroundDelay(int turnaroundDelay)
Modbus 브로드캐스트와 그 다음 Modbus 메시지 사이의 무통신 간격(silent interval)을 밀리초 단위로 turnaroundDelay 로 설정합니다. 일반적으로 이 지연 시간은 100 에서 200 밀리초 사이입니다.
turnaroundDelay()도 참조하십시오 .
int QModbusRtuSerialClient::turnaroundDelay() const
Modbus 브로드캐스트와 그 다음 Modbus 메시지 사이의 무통신 간격(silent interval)을 밀리초 단위로 반환합니다. 기본값은 100 밀리초로 설정되어 있습니다.
setTurnaroundDelay()도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.