QModbusRtuSerialClient Class
QModbusRtuSerialClient 클래스는 모드버스 서버와의 통신을 위해 직렬 버스를 사용하는 모드버스 클라이언트를 나타냅니다. 더 보기...
헤더: | #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 |
재구현된 보호 함수
상세 설명
모드버스를 통한 통신은 단일 모드버스 클라이언트 인스턴스와 여러 모드버스 서버 간의 상호 작용이 필요합니다. 이 클래스는 직렬 포트를 통한 클라이언트 구현을 제공합니다.
멤버 함수 문서
[explicit]
QModbusRtuSerialClient::QModbusRtuSerialClient(QObject *parent = nullptr)
지정된 parent 으로 직렬 모드버스 클라이언트를 구축합니다.
[override virtual protected]
void QModbusRtuSerialClient::close()
다시 구현합니다: QModbusDevice::close().
int QModbusRtuSerialClient::interFrameDelay() const
두 개의 연속된 모드버스 메시지 사이의 무음 간격(마이크로초)을 반환합니다.
setInterFrameDelay()도 참조하세요 .
[override virtual protected]
bool QModbusRtuSerialClient::open()
다시 구현합니다: QModbusDevice::open().
참고: 이 함수를 호출하면 기존 버퍼 데이터가 직렬 포트에서 제거됩니다.
void QModbusRtuSerialClient::setInterFrameDelay(int microseconds)
두 개의 연속된 모드버스 메시지 사이의 무음 간격에 대해 microseconds 의 양을 설정합니다. 기본적으로 클래스 구현은 모드버스 사양에 따라 미리 계산된 값을 사용합니다. 활성 또는 실행 중인 연결은 이러한 지연 변경의 영향을 받지 않습니다.
참고: microseconds 이 -1로 설정되거나 microseconds 이 사전 계산된 지연보다 작으면 이 사전 계산된 값이 프레임 지연으로 사용됩니다.
interFrameDelay()도 참조하세요 .
void QModbusRtuSerialClient::setTurnaroundDelay(int turnaroundDelay)
모드버스 브로드캐스트와 연속된 모드버스 메시지 사이의 무음 간격(밀리초)을 turnaroundDelay 으로 설정합니다. 일반적으로 처리 지연은 100
~ 200
밀리초 범위입니다.
turnaroundDelay()도 참조하세요 .
int QModbusRtuSerialClient::turnaroundDelay() const
모드버스 브로드캐스트와 연속된 모드버스 메시지 사이의 무음 간격(밀리초)을 반환합니다. 기본값은 100
밀리초로 설정되어 있습니다.
setTurnaroundDelay()도 참조하세요 .
© 2025 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.