The QKnxNetIpDeviceDibProxy::Builder class creates a KNXnet/IP device information DIB structure. 更多...
QKnxNetIpDib | create () const |
Builder & | setDeviceName (const QByteArray & deviceName ) |
Builder & | setDeviceStatus (QKnxNetIp::ProgrammingMode mode ) |
Builder & | setIndividualAddress (const QKnxAddress & address ) |
Builder & | setMacAddress (const QKnxByteArray & macAddress ) |
Builder & | setMediumType (QKnx::MediumType mediumType ) |
Builder & | setMulticastAddress (const QHostAddress & multicastAddress ) |
Builder & | setProjectInstallationId (quint16 projectId ) |
Builder & | setSerialNumber (const QKnxByteArray & serialNumber ) |
A KNXnet/IP device information DIB structure contains specific information about a KNXnet/IP device.
The common way to create such a DIB structure is:
// setup the device information auto dib = QKnxNetIpDeviceDibProxy::builder() .setMediumType(mediumType) .setDeviceStatus(programmingMode); .setIndividualAddress(individualAddress) .setProjectInstallationId(projectId) .setSerialNumber(serialNumber) .setMulticastAddress(multicastAddress) .setMacAddress(macAddress) .setDeviceName(deviceName) .create();
Creates and returns a generic QKnxNetIpDib containing the specific device information of a KNXnet/IP device.
注意: The returned structure may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the device name to deviceName and returns a reference to the builder.
注意: The size of the device name may not contain more than 30 characters.
Sets the device status to mode if the passed argument is a valid QKnx::NetIp::ProgrammingMode and returns a reference to the builder.
Sets the individual address to address if the passed argument is a valid QKnxAddress and of type QKnxAddress::Individual and returns a reference to the builder.
Sets the MAC address to macAddress and returns a reference to the builder. By default it is set to the KNXnet/IP System Setup Multicast Address.
注意: The MAC address must contain exactly 6 bytes.
Sets the medium type to mediumType if the passed argument is a valid QKnx::MediumType and returns a reference to the builder.
Sets the multicast address to multicastAddress if the passed argument is a valid QHostAddress and returns a reference to the builder.
Sets the KNX project installation ID to projectId and returns a reference to the builder.
Sets the serial number to serialNumber and returns a reference to the builder.
注意: The serial number must contain exactly 6 bytes.