QKnxCemiFrame Class

The QKnxCemiFrame class represent the Data Link layer frame to be included in the KNX/NetIP frame. More...

Header: #include <QKnxCemiFrame>
qmake: QT += knx
Inherited By:

QKnxLocalDeviceManagementFrame and QKnxTunnelFrame

Public Types

enum MessageCode { Unknown, BusmonitorIndication, DataRequest, DataConfirmation, ..., ResetIndication }

Public Functions

virtual ~QKnxCemiFrame() = default
virtual bool isValid() const
QKnxCemiFrame::MessageCode messageCode() const
QKnxCemiPayload serviceInformation() const
QKnxCemiPayloadRef serviceInformationRef(quint16 index = 0) const
void setMessageCode(QKnxCemiFrame::MessageCode code)
quint16 size() const
virtual QString toString() const

Protected Functions

QKnxCemiFrame() = default
QKnxCemiFrame(QKnxCemiFrame::MessageCode messageCode)
QKnxCemiFrame(QKnxCemiFrame::MessageCode messageCode, const QKnxCemiPayload &payload)
void setServiceInformation(const QKnxCemiPayload &serviceInformation)

Detailed Description

The QKnxCemiFrame class represent the Data Link layer frame to be included in the KNX/NetIP frame.

This frame is sent to the KNX bus. It will be interpreted by the different layers of the KNX protocol. Reading the bytes from left to right, this frame holds:

Member Type Documentation

enum QKnxCemiFrame::MessageCode

This enum describes the different message codes of the CEMI frame.

ConstantValueDescription
QKnxCemiFrame::Unknown0x00 
QKnxCemiFrame::BusmonitorIndication0x2bL_Busmon.ind
QKnxCemiFrame::DataRequest0x11L_Data.req
QKnxCemiFrame::DataConfirmation0x2eL_Data.con
QKnxCemiFrame::DataIndication0x29L_Data.ind
QKnxCemiFrame::RawRequest0x10L_Raw.req
QKnxCemiFrame::RawIndication0x2dL_Raw.ind
QKnxCemiFrame::RawConfirmation0x2fL_Raw.con
QKnxCemiFrame::PollDataRequest0x13L_Poll_Data.req
QKnxCemiFrame::PollDataConfirmation0x25L_Poll_Data.con
QKnxCemiFrame::DataConnectedRequest0x21T_Data_Connected.req
QKnxCemiFrame::DataConnectedIndication0x89T_Data_Connected.ind
QKnxCemiFrame::DataIndividualRequest0x4aT_Data_Individual.req
QKnxCemiFrame::DataIndividualIndication0x94T_Data_Individual.ind

The following values are for Device Management

ConstantValueDescription
QKnxCemiFrame::PropertyReadRequest0xfcM_PropRead.req
QKnxCemiFrame::PropertyReadConfirmation0xfbM_PropRead.con
QKnxCemiFrame::PropertyWriteRequest0xf6M_PropWrite.req
QKnxCemiFrame::PropertyWriteConfirmation0xf5M_PropWrite.con
QKnxCemiFrame::PropertyInfoIndication0xf7M_PropInfo.ind
QKnxCemiFrame::FunctionPropertyCommandRequest0xf8M_FuncPropCommand.req
QKnxCemiFrame::FunctionPropertyStateReadRequest0xf9M_FuncPropStateRead.req
QKnxCemiFrame::FunctionPropertyCommandConfirmation0xfaM_FuncPropCommand.con
QKnxCemiFrame::FunctionPropertyStateReadConfirmation0xfaM_FuncPropStateRead.con
QKnxCemiFrame::ResetRequest0xf1M_Reset.req
QKnxCemiFrame::ResetIndication0xf0M_Reset.ind

Member Function Documentation

[default protected] QKnxCemiFrame::QKnxCemiFrame()

Default constructs an instance of QKnxCemiFrame.

[protected] QKnxCemiFrame::QKnxCemiFrame(QKnxCemiFrame::MessageCode messageCode)

Constructs a CEMI frame starting with messageCode.

Note: The CEMI frame will be other wise empty and needs to be set by hand.

[protected] QKnxCemiFrame::QKnxCemiFrame(QKnxCemiFrame::MessageCode messageCode, const QKnxCemiPayload &payload)

Constructs a CEMI frame starting with messageCode and with a QKnxCemiPayload payload.

[default] QKnxCemiFrame::~QKnxCemiFrame()

Destroys the instance of QKnxCemiFrame. The destructor is virtual.

[virtual] bool QKnxCemiFrame::isValid() const

Return true if the CEMI frame is valid; false otherwise.

Note: It only checks that the given code is a correct CEMI frame code. It does not check the validity of the payload.

QKnxCemiFrame::MessageCode QKnxCemiFrame::messageCode() const

Returns the message code of the CEMI frame.

See also setMessageCode().

QKnxCemiPayload QKnxCemiFrame::serviceInformation() const

Returns the QKnxCemiPayload. This is the CEMI frame without the message code.

See also setServiceInformation().

QKnxCemiPayloadRef QKnxCemiFrame::serviceInformationRef(quint16 index = 0) const

Returns a QKnxCemiPayloadRef at the given index of the CEMI frame payload.

void QKnxCemiFrame::setMessageCode(QKnxCemiFrame::MessageCode code)

Sets the message code of the CEMI frame with code.

See also messageCode().

[protected] void QKnxCemiFrame::setServiceInformation(const QKnxCemiPayload &serviceInformation)

Sets the QKnxCemiPayload serviceInformation of the CEMI frame.

See also serviceInformation().

quint16 QKnxCemiFrame::size() const

Returns the number of bytes of the CEMI frame.

[virtual] QString QKnxCemiFrame::toString() const

Returns a QString representing the bytes of the CEIMI frame

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.