The QKnxDeviceManagementFrame class represents a cEMI frame dedicated to KNXnet/IP device management. 更多...
头: | #include <QKnxDeviceManagementFrame> |
qmake: | QT += knx |
class | Builder |
class | FunctionPropertyCommandBuilder |
class | FunctionPropertyStateReadBuilder |
class | PropertyInfoBuilder |
class | PropertyReadBuilder |
class | PropertyWriteBuilder |
class | ResetBuilder |
enum class | MessageCode { Unknown, PropertyReadRequest, PropertyReadConfirmation, PropertyWriteRequest, PropertyWriteConfirmation, …, ResetIndication } |
QKnxDeviceManagementFrame (QKnxDeviceManagementFrame && other ) | |
QKnxDeviceManagementFrame (const QKnxDeviceManagementFrame & other ) | |
QKnxDeviceManagementFrame (QKnxDeviceManagementFrame::MessageCode code , const QKnxByteArray & serviceInfo ) | |
QKnxDeviceManagementFrame (QKnxDeviceManagementFrame::MessageCode code ) | |
QKnxDeviceManagementFrame () | |
QKnxDeviceManagementFrame & | operator= (QKnxDeviceManagementFrame && other ) |
QKnxDeviceManagementFrame & | operator= (const QKnxDeviceManagementFrame & other ) |
~QKnxDeviceManagementFrame () | |
QKnxByteArray | bytes () const |
QKnxByteArray | data () const |
QKnxNetIpCemiServer::Error | error () const |
bool | isNegativeConfirmation () const |
bool | isNull () const |
bool | isValid () const |
QKnxDeviceManagementFrame::MessageCode | messageCode () const |
quint8 | numberOfElements () const |
quint8 | objectInstance () const |
QKnxInterfaceObjectType | objectType () const |
QKnxInterfaceObjectProperty | property () const |
QKnxNetIpCemiServer::ReturnCode | returnCode () const |
QKnxByteArray | serviceInformation () const |
void | setData (const QKnxByteArray & newData ) |
void | setError (QKnxNetIpCemiServer::Error error ) |
void | setMessageCode (QKnxDeviceManagementFrame::MessageCode code ) |
void | setNumberOfElements (quint8 numOfElements ) |
void | setObjectInstance (quint8 实例 ) |
void | setObjectType (QKnxInterfaceObjectType type ) |
void | setProperty (QKnxInterfaceObjectProperty pid ) |
void | setReturnCode (QKnxNetIpCemiServer::ReturnCode code ) |
void | setServiceInformation (const QKnxByteArray & serviceInfo ) |
void | setStartIndex (quint16 index ) |
quint16 | size () const |
quint16 | startIndex () const |
void | swap (QKnxDeviceManagementFrame & other ) |
bool | operator!= (const QKnxDeviceManagementFrame & other ) const |
bool | operator== (const QKnxDeviceManagementFrame & other ) const |
QKnxDeviceManagementFrame::Builder | builder () |
QKnxDeviceManagementFrame | fromBytes (const QKnxByteArray & data , quint16 index , quint16 size ) |
QKnxDeviceManagementFrame::FunctionPropertyCommandBuilder | functionPropertyCommandBuilder () |
QKnxDeviceManagementFrame::FunctionPropertyStateReadBuilder | functionPropertyStateReadBuilder () |
QKnxDeviceManagementFrame::PropertyInfoBuilder | propertyInfoBuilder () |
QKnxDeviceManagementFrame::PropertyReadBuilder | propertyReadBuilder () |
QKnxDeviceManagementFrame::PropertyWriteBuilder | propertyWriteBuilder () |
QKnxDeviceManagementFrame::ResetBuilder | resetBuilder () |
QDebug | operator<< (QDebug debug , const QKnxDeviceManagementFrame & frame ) |
A device management connection is established between a common external message interface (cEMI) client and a cEMI server to transmit cEMI device management frames. A cEMI frame specifies the service to use and the MessageCode that determines whether the frame carries a request, confirmation, or indication related to the selected service.
The following services are available:
M_PropRead.req
and
M_PropRead.con
)
M_PropWrite.req
and
M_PropWrite.con
)
M_PropInfo.ind
)
M_FuncPropCommand.req
and
M_FuncPropCommand.con
)
M_FuncPropStateRead.req
and
M_FuncPropStateRead.con
)
M_Reset.req
)
Application layer services are invoked by the transport layer frames request (.req) , indication (.ind) ,和 confirmation (.con) . The same frames are used by the remote device to respond to a remote confirmed service.
Typically, a device management frame contains at least the following arguments:
The QKnxDeviceManagementFrame::Builder class can be used to construct local device management cEMI frames. The following more specialized versions of the builder are also provided, and it is recommended to prefer them over the generic version:
另请参阅 Qt KNX Device Management Classes .
This enum holds the message codes of a local device management frame.
常量 | 值 | 描述 |
---|---|---|
QKnxDeviceManagementFrame::MessageCode::Unknown
|
0x00
|
Unknown message code, do not use. |
QKnxDeviceManagementFrame::MessageCode::PropertyReadRequest
|
0xfc
|
Message code for a property read request frame,
M_PropRead.req
.
|
QKnxDeviceManagementFrame::MessageCode::PropertyReadConfirmation
|
0xfb
|
Message code for a property read confirmation frame,
M_PropRead.con
.
|
QKnxDeviceManagementFrame::MessageCode::PropertyWriteRequest
|
0xf6
|
Message code for a property write request frame,
M_PropWrite.req
.
|
QKnxDeviceManagementFrame::MessageCode::PropertyWriteConfirmation
|
0xf5
|
Message code for a property write confirmation frame,
M_PropWrite.con
.
|
QKnxDeviceManagementFrame::MessageCode::PropertyInfoIndication
|
0xf7
|
Message code for a property info indication frame,
M_PropInfo.ind
.
|
QKnxDeviceManagementFrame::MessageCode::FunctionPropertyCommandRequest
|
0xf8
|
Message code for a function property command frame,
M_FuncPropCommand.req
.
|
QKnxDeviceManagementFrame::MessageCode::FunctionPropertyStateReadRequest
|
0xf9
|
Message code for a function property state read request frame,
M_FuncPropStateRead.req
.
|
QKnxDeviceManagementFrame::MessageCode::FunctionPropertyCommandConfirmation
|
0xfa
|
Message code for a function property command confirmation frame,
M_FuncPropCommand.con
.
|
QKnxDeviceManagementFrame::MessageCode::FunctionPropertyStateReadConfirmation
|
0xfa
|
Message code for a function property state read confirmation frame,
M_FuncPropStateRead.con
.
|
QKnxDeviceManagementFrame::MessageCode::ResetRequest
|
0xf1
|
Message code for a reset request frame,
M_Reset.req
.
|
QKnxDeviceManagementFrame::MessageCode::ResetIndication
|
0xf0
|
Message code for a reset indication frame,
M_Reset.ind
.
|
Move-constructs an object instance, making it point to the same object that other 所指向的。
构造副本为 other .
Constructs a local device management frame with the message code set to code and service information set to serviceInfo .
Constructs an empty local device management frame with the message code set to code .
Constructs an empty invalid local device management frame.
移动赋值 other to this object instance.
赋值指定 other 到此对象。
Destroys the local device management frame and frees all allocated resources.
[static]
QKnxDeviceManagementFrame::Builder
QKnxDeviceManagementFrame::
builder
()
Returns an instance of a generic device management frame builder.
Returns an array of bytes that represent the local device management frame.
Returns the data field of the local device management frame as an array of bytes.
The length of the data depends on the property datatype of the property and in case of an array-structured property value also on the number of array elements that are accessed.
In case of an error, the data field stores the error code as a single byte.
另请参阅 setData ().
Returns the error code stored in the local device management frame if the frame is a
PropertyReadConfirmation
or
PropertyWriteConfirmation
frame and the number of elements is set to
0
. Otherwise returns
None
.
另请参阅 setError (), data (),和 isNegativeConfirmation ().
[static]
QKnxDeviceManagementFrame
QKnxDeviceManagementFrame::
fromBytes
(const
QKnxByteArray
&
data
,
quint16
index
,
quint16
size
)
Constructs the local device management frame from the byte array data starting at the position index inside the array with the size size .
[static]
QKnxDeviceManagementFrame::FunctionPropertyCommandBuilder
QKnxDeviceManagementFrame::
functionPropertyCommandBuilder
()
Returns an instance of a device management function property command frame builder.
[static]
QKnxDeviceManagementFrame::FunctionPropertyStateReadBuilder
QKnxDeviceManagementFrame::
functionPropertyStateReadBuilder
()
Returns an instance of a device management function property state read frame builder.
返回
true
if this local device management frame is a negative confirmation; otherwise returns
false
.
For property read or write confirmation frames, the data field of a negative confirmation contains the error information.
For function property command or function property state read confirmation frames, neither a return code nor data are transmitted with the frame.
另请参阅 data (), error (),和 returnCode ().
返回
true
if this is a default constructed device management frame, otherwise returns
false
. A frame is considered null if it contains no initialized values.
返回
true
if the local device management frame is valid, returns
false
否则。
Returns the message code of this local device management frame.
另请参阅 setMessageCode ().
Returns the number of elements for an array-structured property. A return value of
0
indicates a negative response.
另请参阅 setNumberOfElements () 和 isNegativeConfirmation ().
Returns the object instance if available; otherwise returns
0
.
另请参阅 setObjectInstance ().
Returns the object type carried by the frame if available; otherwise returns QKnxInterfaceObjectType::Invalid.
另请参阅 setObjectType ().
Returns the interface object property if available; otherwise returns QKnxInterfaceObjectProperty::Invalid.
另请参阅 setProperty ().
[static]
QKnxDeviceManagementFrame::PropertyInfoBuilder
QKnxDeviceManagementFrame::
propertyInfoBuilder
()
Returns an instance of a device management property info frame builder.
[static]
QKnxDeviceManagementFrame::PropertyReadBuilder
QKnxDeviceManagementFrame::
propertyReadBuilder
()
Returns an instance of a device management property read frame builder.
[static]
QKnxDeviceManagementFrame::PropertyWriteBuilder
QKnxDeviceManagementFrame::
propertyWriteBuilder
()
Returns an instance of a device management property write frame builder.
[static]
QKnxDeviceManagementFrame::ResetBuilder
QKnxDeviceManagementFrame::
resetBuilder
()
Returns an instance of a device management reset frame builder.
Returns the code set by the cEMI server after a cEMI function property service request if the frame is a
FunctionPropertyCommandConfirmation
or
FunctionPropertyStateReadConfirmation
and is also not a negative confirmation. Otherwise returns
NoError
.
注意:
A return code larger than
NoError
indicates the negative result of a function property command or function property state read execution.
另请参阅 setReturnCode (), data (),和 isNegativeConfirmation ().
Returns the service information of the local device management frame as an array of bytes.
另请参阅 setServiceInformation ().
Sets the data field of the local device management frame to newData . No validation checks are done on the function argument.
Sets the error code stored in the frame to error if the frame is a PropertyReadConfirmation or PropertyWriteConfirmation frame; does nothing otherwise.
另请参阅 error ().
Sets the message code of this local device management frame to code .
另请参阅 messageCode ().
Sets the number of elements for an array-structured property to
numOfElements
. A value of
0
is used to indicate a negative response.
注意:
The range for the number of elements is from
0
to
15
.
另请参阅 numberOfElements ().
Sets the object instance to 实例 if the argument is valid; does nothing otherwise.
注意:
The range for the object instance is from
1
to
255
.
另请参阅 objectInstance ().
Sets the interface object type to type if the argument is a valid; otherwise does nothing.
另请参阅 objectType ().
Sets the interface object property identifier to pid if the argument is valid; otherwise does nothing.
另请参阅 property ().
Sets the return code stored in the frame to code if the frame is a FunctionPropertyCommandConfirmation or FunctionPropertyStateReadConfirmation frame; does nothing otherwise.
另请参阅 returnCode ().
Sets the service information of the local device management frame to serviceInfo . No validation checks are done on the function argument.
另请参阅 serviceInformation () 和 isValid ().
Sets the start
index
within an array-structured property. The first element is placed at the index
1
. The array element
0
contains the current number of valid array elements.
注意:
The range for the number of elements is from
0
to
4095
.
另请参阅 startIndex ().
Returns the number of bytes of the local device management frame.
Returns the start index within an array-structured property if available; otherwise returns
0
.
另请参阅 setStartIndex ().
交换 other 与此对象。此操作非常快且从不失败。
返回
true
if this object and the given
other
不相等;则返回
false
.
返回
true
if this object and the given
other
相等;否则返回
false
.
Writes the local device management frame frame 到 debug stream.