Builder Class

class QKnxNetIpHpaiProxy ::Builder

The QKnxNetIpHpaiProxy::Builder class provides the means to create a KNXnet/IP host address protocol information. 更多...

公共函数

QKnxNetIpHpai create () const
Builder & setHostAddress (const QHostAddress & address )
Builder & setHostProtocol (QKnxNetIp::HostProtocol code )
Builder & setPort (quint16 port )

详细描述

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 地址 ,和 port 编号。

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.

成员函数文档编制

QKnxNetIpHpai Builder:: create () const

创建并返回 QKnxNetIpHpai .

注意: The returned structure may be invalid depending on the values used during setup.

另请参阅 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.