QKnxEntranceAccess Class

The QKnxEntranceAccess is a datapoint type for controlling entrance access. More...

Header: #include <QKnxEntranceAccess>
qmake: QT += knx
Inherits: QKnxFixedSizeDatapointType

Public Types

enum Attribute { Error, PermissionAccepted, ReadRightToLeft, Encrypted }
flags Attributes

Public Functions

QKnxEntranceAccess()
QKnxEntranceAccess(quint32 idCode, QKnxEntranceAccess::Attributes attributes, quint8 index)
QKnxEntranceAccess::Attributes attributes() const
qint8 digit(quint8 x) const
qint32 idCode() const
quint8 index() const
bool isSet(QKnxEntranceAccess::Attribute attribute) const
bool removeAttribute(QKnxEntranceAccess::Attribute attribute)
bool setAttribute(QKnxEntranceAccess::Attribute attribute)
bool setAttributes(QKnxEntranceAccess::Attributes attributes)
bool setDigit(quint8 x, quint8 digit)
bool setIdCode(quint32 idCode)
bool setIndex(quint8 index)
bool setValue(quint32 idCode, QKnxEntranceAccess::Attributes attributes, quint8 index)

Reimplemented Public Functions

virtual bool isValid() const override

Additional Inherited Members

Detailed Description

The QKnxEntranceAccess is a datapoint type for controlling entrance access.

This is a fixed size datapoint type with the length of 4 bytes that stores an access identification code, additional attributes, and an index.

Access identification codes consist of six digits, each between 0 and 9. Only a card or key number should be used. A system number, version number, country code, and so on, are not necessary. A ciphered access identification code should be possible in principle. If 24 bits are not necessary, the most significant positions shall be set to zero.

The range of the value is from Low Code, 0 0 0 0 0 0 to High Code, 9 9 9 9 9 9.

See also QKnxDatapointType and Qt KNX Datapoint Type Classes.

Member Type Documentation

enum QKnxEntranceAccess::Attribute
flags QKnxEntranceAccess::Attributes

This enum holds the access identification code attributes.

ConstantValueDescription
QKnxEntranceAccess::Error0x01Whether the controlling device could successfully read the access identification code.
QKnxEntranceAccess::PermissionAccepted0x02Whether the controlling device granted the access.
QKnxEntranceAccess::ReadRightToLeft0x04Sets the reading direction of a device used for access, such as a badge, to be from right to left. Not needed for devices such as electronic keys, and can be set to zero.
QKnxEntranceAccess::Encrypted0x08Whether the access identification code is encrypted.

The Attributes type is a typedef for QFlags<Attribute>. It stores an OR combination of Attribute values.

Member Function Documentation

QKnxEntranceAccess::QKnxEntranceAccess()

Creates a fixed size datapoint type with the value set to 0 and an empty list of attributes.

QKnxEntranceAccess::QKnxEntranceAccess(quint32 idCode, QKnxEntranceAccess::Attributes attributes, quint8 index)

Creates a fixed size datapoint type with the access identification code set to idCode, attributes to attributes, and the index to index.

QKnxEntranceAccess::Attributes QKnxEntranceAccess::attributes() const

Returns the additional information stored in the datapoint type as a list of attributes.

See also setAttributes() and Attribute.

qint8 QKnxEntranceAccess::digit(quint8 x) const

Returns the digit x of the access identification code or a negative value if the datapoint is invalid or x is not in the range from 1 to 6.

See also setDigit().

qint32 QKnxEntranceAccess::idCode() const

Returns the access identification code stored in the datapoint type or a negative value if the datapoint is invalid.

See also setIdCode().

quint8 QKnxEntranceAccess::index() const

Returns the index stored in the datapoint type.

See also setIndex().

bool QKnxEntranceAccess::isSet(QKnxEntranceAccess::Attribute attribute) const

Returns true if attribute is set; otherwise returns false.

[override virtual] bool QKnxEntranceAccess::isValid() const

Reimplemented from QKnxDatapointType::isValid().

bool QKnxEntranceAccess::removeAttribute(QKnxEntranceAccess::Attribute attribute)

Removes attribute from the list of attributes.

Returns true if the attribute was removed; otherwise returns false.

See also Attribute.

bool QKnxEntranceAccess::setAttribute(QKnxEntranceAccess::Attribute attribute)

Adds attribute to the list of attributes.

Returns true if the attribute was set; otherwise returns false.

See also Attribute.

bool QKnxEntranceAccess::setAttributes(QKnxEntranceAccess::Attributes attributes)

Sets the additional information of the datapoint type to the list of attributes specified by attributes.

Returns true if the value was set; otherwise returns false.

See also attributes() and Attribute.

bool QKnxEntranceAccess::setDigit(quint8 x, quint8 digit)

Sets the digit digit at the position x in the access identification code.

If the value is outside the allowed range, returns false and does not set the value.

See also digit().

bool QKnxEntranceAccess::setIdCode(quint32 idCode)

Sets the access identification code stored in the datapoint type to idCode.

If the value is outside the allowed range, returns false and does not set the value.

See also idCode().

bool QKnxEntranceAccess::setIndex(quint8 index)

Sets the index stored in the datapoint type to index.

If the value is outside the allowed range, from 0 to 15, returns false and does not set the value.

See also index().

bool QKnxEntranceAccess::setValue(quint32 idCode, QKnxEntranceAccess::Attributes attributes, quint8 index)

Sets the access identification code stored in the datapoint type to idCode, the list of attributes to attributes, and the index to index.

Returns true if the value was set; otherwise returns false.

© 2018 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.