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 .
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.
Creates a fixed size datapoint type with the access identification code set to idCode , attributes to 属性 , and the index to index .
Creates a fixed size datapoint type with the value set to
0
and an empty list of attributes.
Returns the additional information stored in the datapoint type as a list of attributes.
另请参阅 setAttributes () 和 属性 .
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 ().
Returns the access identification code stored in the datapoint type or a negative value if the datapoint is invalid.
另请参阅 setIdCode ().
Returns the index stored in the datapoint type.
另请参阅 setIndex ().
返回
true
if
属性
已设置;否则返回
false
.
[override virtual]
bool
QKnxEntranceAccess::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
移除 属性 from the list of attributes.
返回
true
if the attribute was removed; otherwise returns
false
.
另请参阅 属性 .
添加 属性 to the list of attributes.
返回
true
if the attribute was set; otherwise returns
false
.
另请参阅 属性 .
Sets the additional information of the datapoint type to the list of attributes specified by 属性 .
返回
true
if the value was set; otherwise returns
false
.
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 ().
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 ().
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 ().
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
.