The QKnxNetIpConfigDibProxy::Builder class creates a KNXnet/IP IP configuration DIB structure. 更多...
QKnxNetIpDib | create () const |
Builder & | setAssignmentMethods (QKnxNetIp::AssignmentMethods methods ) |
Builder & | setCapabilities (QKnxNetIp::Capabilities capabilities ) |
Builder & | setDefaultGateway (const QHostAddress & gateway ) |
Builder & | setIpAddress (const QHostAddress & ipAddress ) |
Builder & | setSubnetMask (const QHostAddress & subnetMask ) |
The common way to create such a DIB structure is:
// setup the IP configuration values auto dib = QKnxNetIpConfigDibProxy::builder() .setIpAddress(address) .setSubnetMask(subnetMask) .setDefaultGateway(gateway) .setCapabilities(QKnxNetIp::Capabilities::Dhcp) .setAssignmentMethods(QKnxNetIp::AssignmentMethod::Dhcp) .create();
创建并返回 QKnxNetIpDib .
注意: The returned structure may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the enabled IP address assignment methods for setting the current IP address to methods if the passed argument is valid and returns a reference to the builder.
注意: At least one method needs to be enabled.
Sets the IP capabilities supported by the KNXnet/IP device to capabilities if the passed argument is valid and returns a reference to the builder.
Sets the default gateway to gateway if the passed argument is a valid QHostAddress and returns a reference to the builder.
Sets the fixed IP address to ipAddress if the passed argument is a valid QHostAddress and returns a reference to the builder. It will be used if the manual address assignment method is enabled.
Sets the subnet mask to subnetMask if the passed argument is a valid QHostAddress and returns a reference to the builder. It will be used if the manual address assignment method is enabled.