QKnxEntranceAccess Class

The QKnxEntranceAccess is a datapoint type for controlling entrance access. 更多...

头: #include <QKnxEntranceAccess>
qmake: QT += knx
继承: QKnxFixedSizeDatapointType

公共类型

enum 属性 { Error, PermissionAccepted, ReadRightToLeft, Encrypted }
flags 属性

公共函数

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

重实现公共函数

virtual bool isValid () const override

详细描述

This is a fixed size datapoint type with the length of 4 bytes that stores an access identification code, additional 属性 , 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 .

另请参阅 QKnxDatapointType and Qt KNX Datapoint Type Classes .

成员类型文档编制

enum QKnxEntranceAccess:: 属性
flags QKnxEntranceAccess:: 属性

This enum holds the access identification code attributes.

常量 描述
QKnxEntranceAccess::Error 0x01 Whether the controlling device could successfully read the access identification code.
QKnxEntranceAccess::PermissionAccepted 0x02 Whether the controlling device granted the access.
QKnxEntranceAccess::ReadRightToLeft 0x04 Sets 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::Encrypted 0x08 Whether the access identification code is encrypted.

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

成员函数文档编制

QKnxEntranceAccess:: QKnxEntranceAccess ( quint32 idCode , QKnxEntranceAccess::Attributes 属性 , quint8 index )

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

QKnxEntranceAccess:: QKnxEntranceAccess ()

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

QKnxEntranceAccess::Attributes QKnxEntranceAccess:: 属性 () const

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

另请参阅 setAttributes () 和 属性 .

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 .

另请参阅 setDigit ().

qint32 QKnxEntranceAccess:: idCode () const

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

另请参阅 setIdCode ().

quint8 QKnxEntranceAccess:: index () const

Returns the index stored in the datapoint type.

另请参阅 setIndex ().

bool QKnxEntranceAccess:: isSet ( QKnxEntranceAccess::Attribute 属性 ) const

返回 true if 属性 已设置;否则返回 false .

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

重实现: QKnxDatapointType::isValid () const.

bool QKnxEntranceAccess:: removeAttribute ( QKnxEntranceAccess::Attribute 属性 )

移除 属性 from the list of attributes.

返回 true if the attribute was removed; otherwise returns false .

另请参阅 属性 .

bool QKnxEntranceAccess:: setAttribute ( QKnxEntranceAccess::Attribute 属性 )

添加 属性 to the list of attributes.

返回 true if the attribute was set; otherwise returns false .

另请参阅 属性 .

bool QKnxEntranceAccess:: setAttributes ( QKnxEntranceAccess::Attributes 属性 )

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

返回 true if the value was set; otherwise returns false .

另请参阅 属性 () 和 属性 .

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.

另请参阅 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.

另请参阅 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 ,返回 false and does not set the value.

另请参阅 index ().

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

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

返回 true if the value was set; otherwise returns false .