The QKnxNetIpTimerNotifyProxy class provides the means to introspect timer notify data inside the generic QKnxNetIpFrame class and to create a KNXnet/IP timer notify frame from provided data. 更多...
头: | #include <QKnxNetIpTimerNotifyProxy> |
qmake: | QT += knx |
Since: | Qt 5.12 |
该类在 Qt 5.12 引入。
class | Builder |
class | SecureBuilder |
QKnxNetIpTimerNotifyProxy (const QKnxNetIpFrame & frame ) | |
bool | isValid () const |
QKnxByteArray | messageAuthenticationCode () const |
quint16 | messageTag () const |
QKnxByteArray | serialNumber () const |
quint48 | timerValue () const |
QKnxNetIpTimerNotifyProxy::Builder | builder () |
QKnxNetIpTimerNotifyProxy::SecureBuilder | secureBuilder () |
This class is part of the Qt KNX module and currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice.
This frame will be sent during secure KNXnet/IP multicast group communication to keep the multicast group member's timer values synchronized. The frame is therefore sent to the KNXnet/IP routing endpoint on port
3671
of the configured routing multicast address.
注意: When using QKnxNetIpTimerNotifyProxy, care must be taken to ensure that the referenced KNXnet/IP frame outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.
The following code sample illustrates how to read the timer notify information:
auto netIpFrame = QKnxNetIpFrame::fromBytes(...); const QKnxNetIpTimerNotifyProxy proxy(netIpFrame); if (!proxy.isValid()) return; quint48 value = proxy.timerValue(); QKnxByteArray number = proxy.serialNumber(); quint16 tag = proxy.tag(); QKnxByteArray code = proxy.messageAuthenticationCode();
另请参阅 builder () 和 Qt KNXnet/IP Connection Classes .
Constructs a proxy object to read the timer notify information carried by the specified KNXnet/IP frame frame .
[static]
QKnxNetIpTimerNotifyProxy::Builder
QKnxNetIpTimerNotifyProxy::
builder
()
Returns a builder object to create a KNXnet/IP timer notify frame.
返回
true
if the frame contains initialized values and is in itself valid, otherwise returns
false
. A valid KNXnet/IP frame consists of at least a valid header and a size in bytes corresponding to the total size of the KNXnet/IP frame header.
注意:
KNXnet/IP timer notify frames currently have a fixed size of
36
字节。
另请参阅 QKnxNetIpFrameHeader::totalSize ().
Returns the AES128 CCM message authentication code (MAC) from the generic KNXnet/IP secure timer notify frame with a fixed size of
16
字节。
Returns the message tag from the generic KNXnet/IP secure timer notify frame.
[static]
QKnxNetIpTimerNotifyProxy::SecureBuilder
QKnxNetIpTimerNotifyProxy::
secureBuilder
()
Returns a secure builder object to create a KNXnet/IP timer notify frame.
Returns the serial number from the generic KNXnet/IP secure timer notify frame.
Returns the timer value from the generic KNXnet/IP secure timer notify frame.