Z-Wave Protocol Controller Reference
user_credential_user_capabilities.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
14#ifndef USER_CREDENTIAL_USER_CAPABILITIES_H
15#define USER_CREDENTIAL_USER_CAPABILITIES_H
16
17// Attribute store
18#include "attribute.hpp"
19// User credential types
21
22
23namespace user_credential
24{
25
27{
28 public:
29 explicit user_capabilities(attribute_store::attribute endpoint_node);
30 ~user_capabilities() = default;
31
46 user_credential_type_t user_type,
47 user_credential_rule_t credential_rule,
48 const char *user_name) const;
49
56 bool is_user_name_valid(const char *user_name) const;
57
72
79 bool
81
88
101
102 private:
103 // Maximum number of users that can be stored in the device
104 uint16_t max_user_count = 0;
105 // Credential rules supported
107 // User types supported
109 // Max length for the user names
111 // Device support for scheduling users
113 // Device support for getting the checksum of all users
115 // Device support for getting the checksum of a specific user
117
118 // True if the data is valid inside this struct
119 bool is_data_valid = false;
120};
121
122} // namespace user_credential
123
124#endif // USER_CREDENTIAL_USER_CAPABILITIES_H
Definition: user_credential_user_capabilities.h:27
uint8_t support_all_users_checksum
Definition: user_credential_user_capabilities.h:114
bool is_credential_rule_supported(user_credential_rule_t credential_rule) const
Check if a credential rule is supported.
bool is_all_users_checksum_supported() const
Check if all users checksum is supported.
bool is_user_checksum_supported() const
Check if user checksum is supported.
uint8_t support_user_schedule
Definition: user_credential_user_capabilities.h:112
user_capabilities(attribute_store::attribute endpoint_node)
uint8_t max_user_name_length
Definition: user_credential_user_capabilities.h:110
bool is_user_valid(user_credential_user_unique_id_t user_id, user_credential_type_t user_type, user_credential_rule_t credential_rule, const char *user_name) const
Check if the user proprieties are valid.
bool is_user_name_valid(const char *user_name) const
Checks if the given user name is valid.
uint8_t supported_credential_rules_bitmask
Definition: user_credential_user_capabilities.h:106
bool is_data_valid
Definition: user_credential_user_capabilities.h:119
bool is_user_type_supported(user_credential_type_t user_type) const
Check if a user type is supported.
uint32_t supported_user_types_bitmask
Definition: user_credential_user_capabilities.h:108
uint8_t support_by_user_checksum
Definition: user_credential_user_capabilities.h:116
uint16_t max_user_count
Definition: user_credential_user_capabilities.h:104
bool is_user_schedule_supported() const
Check if user schedule is supported.
bool is_user_id_valid(user_credential_user_unique_id_t user_id) const
Check if a user id is valid.
uint16_t user_credential_user_unique_id_t
‍User Unique ID. uint16_t
Definition: zwave_command_class_user_credential_types.h:37
uint8_t user_credential_rule_t
‍Credential rule. uint8_t
Definition: zwave_command_class_user_credential_types.h:64
uint8_t user_credential_type_t
‍Credential type. uint8_t
Definition: zwave_command_class_user_credential_types.h:61
Definition: user_credential_checksum_calculator.h:26