The QKnxNetIpStruct class represents a generic data structure encapsulated in a KNXnet/IP frame. 更多...
头: | #include <QKnxNetIpStruct> |
qmake: | QT += knx |
QKnxNetIpStruct (const QKnxNetIpStructHeader<CodeType> & headerField , const QKnxByteArray & dataField = {}) | |
QKnxNetIpStruct (CodeType codeType , const QKnxByteArray & dataField = {}) | |
QKnxNetIpStruct () | |
QKnxByteArray | bytes () const |
CodeType | code () const |
const QKnxByteArray & | constData () const |
QKnxByteArray | data () const |
quint16 | dataSize () const |
QKnxNetIpStructHeader<CodeType> | header () const |
bool | isNull () const |
bool | isValid () const |
void | setData (const QKnxByteArray & dataField ) |
void | setHeader (const QKnxNetIpStructHeader<CodeType> & headerField ) |
quint16 | size () const |
bool | operator!= (const QKnxNetIpStruct<CodeType> & other ) const |
bool | operator== (const QKnxNetIpStruct<CodeType> & other ) const |
QKnxNetIpStruct<CodeType> | fromBytes (const QKnxByteArray & bytes , quint16 index = 0) |
QDebug | operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::HostProtocol> & hpai ) |
QDebug | operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::ConnectionType> & cr ) |
QDebug | operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::DescriptionType> & dib ) |
QDebug | operator<< (QDebug debug , const QKnxNetIpStruct<QKnxNetIp::SearchParameterType> & srp ) |
The following types of KNXnet/IP structures can be encapsulated in QKnxNetIpFrame : QKnxNetIpHpai for host protocol address information (HPAI), QKnxNetIpCri for connection request information (CRI), QKnxNetIpCrd for connection response data (CRD) and QKnxNetIpDib for a description information block (DIB).
另请参阅 Qt KNXnet/IP Connection Classes .
Creates a new KNXnet/IP structure with the specified headerField and payload dataField .
The header is expected to be fully set up and all values describing the payload are expected to match the specified payload.
注意: No adjustments are made to the function arguments.
Creates a new KNXnet/IP structure with the specified codeType and payload dataField .
Creates an empty invalid KNXnet/IP structure.
Returns an array of bytes representing the KNXnet/IP structure including the header and the payload.
Returns the generic code stored in the KNXnet/IP structure.
Returns the data stored in the KNXnet/IP structure.
Returns the data stored in the KNXnet/IP structure.
另请参阅 setData ().
Returns the size of the data stored in the KNXnet/IP structure.
[static]
QKnxNetIpStruct
<
CodeType
> QKnxNetIpStruct::
fromBytes
(const
QKnxByteArray
&
bytes
,
quint16
index
= 0)
Constructs the KNXnet/IP structure from the byte array bytes starting at the position index inside the array.
Returns the header stored in the KNXnet/IP structure.
另请参阅 setHeader ().
返回
true
if this is a default constructed structure; otherwise returns
false
.
返回
true
if the structure contains initialized values and is in itself valid; otherwise returns
false
.
另请参阅 isNull ().
Sets the data stored in the KNXnet/IP structure to dataField and updates the data size accordingly.
另请参阅 data ().
Sets the header stored in the KNXnet/IP structure to headerField .
另请参阅 header ().
Returns the size of the KNXnet/IP structure.
返回
true
if this object and the given
other
不相等;则返回
false
.
返回
true
if this object and the given
other
相等;否则返回
false
.
Writes the KNXnet/IP host protocol address information structure hpai 到 debug stream.
Writes the KNXnet/IP connection request information structure cr 到 debug stream.
Writes the KNXnet/IP description information block structure dib 到 debug stream.
Writes the KNXnet/IP extended search parameter request srp 到 debug stream.
该函数在 Qt 5.12 引入。