The QKnxNetIpFrame class represents the base for all KNXnet/IP related communication. 更多...
| 頭: | #include <QKnxNetIpFrame> |
| qmake: | QT += knx |
| QKnxNetIpFrame (QKnxNetIpFrame && other ) | |
| QKnxNetIpFrame (const QKnxNetIpFrame & other ) | |
| QKnxNetIpFrame (const QKnxNetIpFrameHeader & header , const QKnxNetIpConnectionHeader & connectionHeader , const QKnxByteArray & data = {}) | |
| QKnxNetIpFrame (QKnxNetIp::ServiceType type , const QKnxNetIpConnectionHeader & connectionHeader , const QKnxByteArray & data = {}) | |
| QKnxNetIpFrame (QKnxNetIp::ServiceType type , const QKnxByteArray & data = {}) | |
| QKnxNetIpFrame () | |
| QKnxNetIpFrame & | operator= (QKnxNetIpFrame && other ) |
| QKnxNetIpFrame & | operator= (const QKnxNetIpFrame & other ) |
| ~QKnxNetIpFrame () | |
| QKnxByteArray | bytes () const |
| quint8 | channelId () const |
| QKnxNetIpConnectionHeader | connectionHeader () const |
| QKnxByteArray | connectionTypeSpecificHeaderItems () const |
| const QKnxByteArray & | constData () const |
| QKnxByteArray | data () const |
| quint16 | dataSize () const |
| QKnxNetIpFrameHeader | header () const |
| bool | isNull () const |
| bool | isValid () const |
| quint8 | protocolVersion () const |
| quint8 | sequenceNumber () const |
| QKnxNetIp::ServiceType | serviceType () const |
| quint8 | serviceTypeSpecificValue () const |
| void | setConnectionHeader (const QKnxNetIpConnectionHeader & header ) |
| void | setData (const QKnxByteArray & data ) |
| void | setHeader (const QKnxNetIpFrameHeader & header ) |
| void | setServiceType (QKnxNetIp::ServiceType type ) |
| quint16 | size () const |
| void | swap (QKnxNetIpFrame & other ) |
| bool | operator!= (const QKnxNetIpFrame & other ) const |
| bool | operator== (const QKnxNetIpFrame & other ) const |
| QKnxNetIpFrame | fromBytes (const QKnxByteArray & bytes , quint16 index = 0) |
| QDebug | operator<< (QDebug debug , const QKnxNetIpFrame & frame ) |
The communication between KNXnet/IP devices is based on KNXnet/IP frames. A KNXnet/IP frame is a data packet sent over the non-KNX network protocol that consists of a header, comparable to the IP header of an Internet protocol data packet, and optional data of variable length. The type of the KNXnet/IP frame is described by a KNXnet/IP service type identifier in the header.
另請參閱 Qt KNXnet/IP Connection Classes .
Move-constructs an object instance, making it point to the same object that other 所指嚮的。
構造副本為 other .
Creates a new KNXnet/IP frame with the given frame header header , connection header set to connectionHeader , and data set to data .
Creates a new KNXnet/IP frame with the given service type type , connection header set to connectionHeader , and data set to data .
Creates a new KNXnet/IP frame with the given service type type and data set to data .
Constructs an empty invalid KNXnet/IP frame object.
移動賦值 other to this object instance.
賦值指定 other 到此對象。
Destroys the KNXnet/IP frame object and releases all allocated resources.
Returns an array of bytes that represent the KNXnet/IP frame.
Returns the KNXnet/IP frame's channel ID if a connection header is set.
注意: By default the function returns null.
Returns the KNXnet/IP frame's connection header.
另請參閱 setConnectionHeader ().
Returns a byte array with connection type specific header items of the KNXnet/IP frame if a connection header is set.
注意: The returned array can be empty.
Returns the data part of the KNXnet/IP frame as constant reference.
注意: If a connection header is set, it is not considered part of the returned data.
Returns the data part of the KNXnet/IP frame.
注意: If a connection header is set, it is not considered part of the returned data.
另請參閱 setData ().
Returns the size of the KNXnet/IP frame data. The data size excludes the size of the KNXnet/IP frame header and the optional connection header.
[static]
QKnxNetIpFrame
QKnxNetIpFrame::
fromBytes
(const
QKnxByteArray
&
bytes
,
quint16
index
= 0)
Constructs the KNXnet/IP frame from the byte array bytes 起始於位置 index inside the array.
Returns the KNXnet/IP frame header.
另請參閱 setHeader ().
返迴
true
if this is a default constructed frame, otherwise returns
false
. A frame is considered null if it contains no initialized values.
返迴
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 KNXnet/IP frame header
QKnxNetIpFrameHeader::totalSize
.
Returns the KNXnet/IP frame protocol version.
Returns the KNXnet/IP frame's sequence number if a connection header is set.
注意: By default the function returns null.
Returns the KNXnet/IP frame's service type or QKnxNetIp::Unknown for a default generated frame.
另請參閱 setServiceType ().
Returns the service type specific value of the KNXnet/IP frame if a connection header is set.
注意: By default the function returns null.
Sets the KNXnet/IP frame's connection header to header and updates the total size accordingly.
另請參閱 connectionHeader ().
Sets the data part of the KNXnet/IP frame to data and updates the total size accordingly.
注意: The data part passed may not contain the connection header.
另請參閱 data ().
Sets the KNXnet/IP frame header to header .
另請參閱 header ().
Sets the KNXnet/IP frame's service type to type .
另請參閱 serviceType ().
Returns the size in bytes of the KNXnet/IP frame. The size includes the size of the KNXnet/IP frame header, the optional connection header, and the frame's data part.
交換 other 與此對象。此操作很快且從不失敗。
返迴
true
if this object and the given
other
不相等;則返迴
false
.
返迴
true
if this object and the given
other
相等;否則返迴
false
.
Writes the KNXnet/IP frame 到 debug stream.