The QKnxNetIpSrpProxy class encapsulates methods to introspect the various search request parameter (SRP) structures and provides a collection of builders for creating such SRP structures to be included in an extended search request. 更多...
头: | #include <QKnxNetIpSrpProxy> |
qmake: | QT += knx |
Since: | Qt 5.12 |
该类在 Qt 5.12 引入。
class | MacAddress |
class | ProgrammingMode |
class | RequestDibs |
class | SupportedFamily |
QKnxNetIpSrpProxy (const QKnxNetIpSrp & srp ) | |
QVector<QKnxNetIp::DescriptionType> | descriptionTypes () const |
bool | isMandatory () const |
bool | isValid () const |
QKnxByteArray | macAddress () const |
bool | programmingModeOnly () const |
QKnxNetIp::SearchParameterType | searchParameterType () const |
QKnxServiceInfo | serviceInfo () const |
QKnxNetIpSrpProxy::MacAddress | macAddressBuilder () |
QKnxNetIpSrpProxy::ProgrammingMode | programmingModeBuilder () |
QKnxNetIpSrpProxy::RequestDibs | requestDibsBuilder () |
QKnxNetIpSrpProxy::SupportedFamily | supportedFamilyBuilder () |
注意: When using QKnxNetIpSrpProxy, care must be taken to ensure that the referenced KNXnet/IP SRP structure outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.
The following SRP types are available:
Reading the supported service families can be achieved like this:
auto srp = QKnxNetIpSrp::fromBytes(...); QKnxNetIpSrpProxy proxy(srp); if (!proxy.isValid()) return; if (proxy().searchParameterType() != QKnxNetIp::SearchParameterType::SelectByMACAddress) return; auto mandatory = proxy.isMandatory(); auto macAddress = proxy.macAddress();
另请参阅 programmingModeBuilder (), macAddressBuilder (), supportedFamilyBuilder (),和 requestDibsBuilder ().
Constructs a proxy object with the specified KNXnet/IP SRP structure srp to read the encapsulated search request parameters.
Returns a vector of QKnx::NetIp::DescriptionType enumeration values used as search criteria if the object that was passed during construction was valid; otherwise returns an empty vector.
返回
true
if the mandatory bit is set; otherwise returns
false
.
返回
true
if the KNXnet/IP structure to create the object is a valid KNXnet/IP SRP structure; otherwise returns
false
.
Returns an array of bytes that represent the MAC address used as search criteria if the object that was passed during construction was valid; otherwise returns an empty byte array.
[static]
QKnxNetIpSrpProxy::MacAddress
QKnxNetIpSrpProxy::
macAddressBuilder
()
Returns a builder object to create a KNXnet/IP MAC address SRP structure.
[static]
QKnxNetIpSrpProxy::ProgrammingMode
QKnxNetIpSrpProxy::
programmingModeBuilder
()
Returns a builder object to create a KNXnet/IP programming mode SRP structure.
返回
true
if the search request was limited to devices in programming mode; otherwise returns
false
.
[static]
QKnxNetIpSrpProxy::RequestDibs
QKnxNetIpSrpProxy::
requestDibsBuilder
()
Returns a builder object to create a KNXnet/IP requested DIBs SRP structure.
Return the search parameter type from KNXnet/IP structure if the object passed during construction was valid, otherwise returns QKnx::NetIp::Unknown .
返回 QKnxServiceInfo structure used as search criteria if the object that was passed during construction was valid; otherwise returns a 默认构造值 .
[static]
QKnxNetIpSrpProxy::SupportedFamily
QKnxNetIpSrpProxy::
supportedFamilyBuilder
()
Returns a builder object to create a KNXnet/IP supported service family SRP structure.