Builder Class
class QKnxNetIpHpaiProxy::BuilderThe QKnxNetIpHpaiProxy::Builder class provides the means to create a KNXnet/IP host address protocol information. More...
Public Functions
QKnxNetIpHpai | create() const |
Builder & | setHostAddress(const QHostAddress &address) |
Builder & | setHostProtocol(QKnxNetIp::HostProtocol code) |
Builder & | setPort(quint16 port) |
Detailed Description
A KNXnet/IP HPAI structure contains the information that is necessary to uniquely identify an KNXnet/IP transport connection endpoint.
The information needed to identify an KNXnet/IP transport connection endpoint includes the protocol, IP address, and port number.
The common way to create such a HPAI structure is:
auto hpai = QKnxNetIpHpaiProxy::builder() .setHostProtocol(QKnxNetIp::HostProtocol::TCP_IPv4 .setHostAddress(QHostAddress::AnyIPv4) .setPort(2013) .create();
By default setting the host protocol can be omitted if you want to target a KNXnet/IP server using a UDP/IP connection.
Member Function Documentation
QKnxNetIpHpai Builder::create() const
Creates and returns a QKnxNetIpHpai.
Note: The returned structure may be invalid depending on the values used during setup.
See also isValid().
Builder &Builder::setHostAddress(const QHostAddress &address)
Sets the host address to address and returns a reference to the builder.
Builder &Builder::setHostProtocol(QKnxNetIp::HostProtocol code)
Sets the host protocol to code and returns a reference to the builder.
Builder &Builder::setPort(quint16 port)
Sets the host port to port and returns a reference to the builder.