|
Z-Wave Protocol Controller Reference
|
Classes | |
| struct | credential_id_nodes |
| struct | identifier_state |
Typedefs | |
| using | attribute_callback = std::function< void(attribute_store::attribute &)> |
Functions | |
| template<typename T > | |
| attribute_store::attribute | create_or_update_desired_value (attribute_store::attribute base_node, attribute_store_type_t attribute_type, T value) |
| Update desired value if found, or create the node otherwise. More... | |
| void | set_operation_type (attribute_store::attribute base_node, attribute_store_type_t operation_type_node_type, user_credential_operation_type_t operation_type) |
| Create operation_type_node_type if it doesn't exists, and set the desired value to operation_type (and clear reported) More... | |
| void | set_user_operation_type (attribute_store_node_t user_node, user_credential_operation_type_t operation_type) |
| Set User Operation. More... | |
| void | set_credential_operation_type (attribute_store_node_t slot_node, user_credential_operation_type_t operation_type) |
| Set Credential Operation. More... | |
| void | set_credential_learn_operation_type (attribute_store_node_t slot_node, user_credential_operation_type_t operation_type) |
| Set Credential Learn Operation. More... | |
| bool | user_exists (attribute_store::attribute endpoint_node, user_credential_user_unique_id_t user_id) |
| Get node associated with user ID (desired or reported) More... | |
| attribute_store::attribute | get_user_unique_id_node (attribute_store::attribute endpoint_node, user_credential_user_unique_id_t user_id, attribute_store_node_value_state_t state) |
| Get node associated with user ID (desired or reported) More... | |
| attribute_store::attribute | get_credential_type_node (attribute_store::attribute user_id_node, user_credential_type_t cred_type, attribute_store_node_value_state_t state) |
| Get credential type node associated with user ID. More... | |
| attribute_store::attribute | get_credential_slot_node (attribute_store::attribute cred_type_node, user_credential_slot_t cred_slot, attribute_store_node_value_state_t state) |
| Get credential slot node associated with credential type. More... | |
| void | for_each_credential_type_nodes_for_user (attribute_store::attribute user_id_node, const attribute_callback &callback, user_credential_type_t credential_type=0) |
| Iterate on each credential type nodes for a given user. More... | |
| void | for_each_credential_type_nodes (attribute_store::attribute endpoint_node, const attribute_callback &callback, user_credential_type_t credential_type=0) |
| Iterate on each credential type nodes. More... | |
| bool | is_credential_available (attribute_store_node_t endpoint_node, user_credential_type_t credential_type, user_credential_slot_t credential_slot) |
| Checks if given credential ID (credential type, credential slot) is available. More... | |
| credential_id_nodes | get_credential_identifier_nodes (attribute_store_node_t child_node) |
| Get associated credential identifier nodes. More... | |
| credential_id_nodes | get_credential_identifier_nodes (const attribute_store::attribute &endpoint_node, identifier_state< user_credential_user_unique_id_t > user_id, identifier_state< user_credential_type_t > credential_type, identifier_state< user_credential_slot_t > credential_slot) |
| Get associated credential identifier nodes. More... | |
| bool | is_admin_code_empty (const std::vector< uint8_t > &admin_pin_code) |
| Return true if given admin pin code is considered empty. More... | |
| void | set_empty_admin_code (attribute_store::attribute &admin_pin_code_node, attribute_store_node_value_state_t state) |
| Set the admin pin code node to an empty value. More... | |
| using user_credential_helpers::attribute_callback = typedef std::function<void(attribute_store::attribute &)> |
| attribute_store::attribute user_credential_helpers::create_or_update_desired_value | ( | attribute_store::attribute | base_node, |
| attribute_store_type_t | attribute_type, | ||
| T | value | ||
| ) |
Update desired value if found, or create the node otherwise.
Check for the value in the desired value of attribute_type (with parent base_node). If we found it, we update the reported value and clear the desired value. Otherwise we create the node with the given value and set it to reported.
| T | Type of the value to set |
| base_node | Base node to search for the attribute |
| attribute_type | Type of the attribute to search for |
| value | Value to search/set |
| void user_credential_helpers::for_each_credential_type_nodes | ( | attribute_store::attribute | endpoint_node, |
| const attribute_callback & | callback, | ||
| user_credential_type_t | credential_type = 0 |
||
| ) |
Iterate on each credential type nodes.
| endpoint_node | Endpoint point node |
| callback | Callback function to call for each credential type node |
| credential_type | Credential type to find. If 0, process all credential types |
| void user_credential_helpers::for_each_credential_type_nodes_for_user | ( | attribute_store::attribute | user_id_node, |
| const attribute_callback & | callback, | ||
| user_credential_type_t | credential_type = 0 |
||
| ) |
Iterate on each credential type nodes for a given user.
| user_id_node | User ID node |
| callback | Callback function to call for each credential type node |
| credential_type | Credential type to find. If 0, process all credential types |
| credential_id_nodes user_credential_helpers::get_credential_identifier_nodes | ( | attribute_store_node_t | child_node | ) |
Get associated credential identifier nodes.
| child_node | Not that have a CREDENTIAL_SLOT, CREDENTIAL_TYPE and USER_UNIQUE_ID as respective parents |
| std::runtime_error | If one of the nodes is not found |
| credential_id_nodes user_credential_helpers::get_credential_identifier_nodes | ( | const attribute_store::attribute & | endpoint_node, |
| identifier_state< user_credential_user_unique_id_t > | user_id, | ||
| identifier_state< user_credential_type_t > | credential_type, | ||
| identifier_state< user_credential_slot_t > | credential_slot | ||
| ) |
Get associated credential identifier nodes.
| endpoint_node | Endpoint node |
| user_id | User ID with given state |
| credential_type | Credential type with given state |
| credential_slot | Credential slot with given state |
| std::runtime_error | If one of the nodes is not found |
| attribute_store::attribute user_credential_helpers::get_credential_slot_node | ( | attribute_store::attribute | cred_type_node, |
| user_credential_slot_t | cred_slot, | ||
| attribute_store_node_value_state_t | state | ||
| ) |
Get credential slot node associated with credential type.
| cred_type_node | Credential type node |
| cred_slot | Credential slot |
| state | Check reported or desired value (or desired else reported) |
| std::runtime_error | If Credential slot for given cred_type_node does not exist with given state |
| attribute_store::attribute user_credential_helpers::get_credential_type_node | ( | attribute_store::attribute | user_id_node, |
| user_credential_type_t | cred_type, | ||
| attribute_store_node_value_state_t | state | ||
| ) |
Get credential type node associated with user ID.
| user_id_node | User ID node |
| cred_type | Credential type |
| state | Check reported or desired value (or desired else reported) |
| std::runtime_error | If Credential type for given user_id_node does not exist with given state |
| attribute_store::attribute user_credential_helpers::get_user_unique_id_node | ( | attribute_store::attribute | endpoint_node, |
| user_credential_user_unique_id_t | user_id, | ||
| attribute_store_node_value_state_t | state | ||
| ) |
Get node associated with user ID (desired or reported)
| endpoint_node | Current endpoint node |
| user_id | User ID |
| state | Check reported or desired value (or desired else reported) |
| std::runtime_error | If User ID does not exist with given state |
| bool user_credential_helpers::is_admin_code_empty | ( | const std::vector< uint8_t > & | admin_pin_code | ) |
Return true if given admin pin code is considered empty.
We need this function since the attribute store doesn't support empty vector.
| admin_pin_code | Admin pin code |
| bool user_credential_helpers::is_credential_available | ( | attribute_store_node_t | endpoint_node, |
| user_credential_type_t | credential_type, | ||
| user_credential_slot_t | credential_slot | ||
| ) |
Checks if given credential ID (credential type, credential slot) is available.
| endpoint_node | Endpoint node |
| credential_type | Credential type |
| credential_slot | Credential slot |
| void user_credential_helpers::set_credential_learn_operation_type | ( | attribute_store_node_t | slot_node, |
| user_credential_operation_type_t | operation_type | ||
| ) |
Set Credential Learn Operation.
Set the operation type as desired and clear reported to call SET function
| slot_node | Slot node |
| operation_type | Operation type to set |
| void user_credential_helpers::set_credential_operation_type | ( | attribute_store_node_t | slot_node, |
| user_credential_operation_type_t | operation_type | ||
| ) |
Set Credential Operation.
Set the operation type as desired and clear reported to call SET function
| slot_node | Slot node |
| operation_type | Operation type to set |
| void user_credential_helpers::set_empty_admin_code | ( | attribute_store::attribute & | admin_pin_code_node, |
| attribute_store_node_value_state_t | state | ||
| ) |
Set the admin pin code node to an empty value.
We need this function since the attribute store doesn't support empty vector.
| admin_pin_code_node | Admin pin code node |
| state | State (REPORTED or DESIRED) |
| std::runtime_error | If admin_pin_code_node is not valid |
| void user_credential_helpers::set_operation_type | ( | attribute_store::attribute | base_node, |
| attribute_store_type_t | operation_type_node_type, | ||
| user_credential_operation_type_t | operation_type | ||
| ) |
Create operation_type_node_type if it doesn't exists, and set the desired value to operation_type (and clear reported)
| base_node | Base node to search for the attribute |
| operation_type_node_type | Type of the operation type node |
| operation_type | Operation type to set |
| void user_credential_helpers::set_user_operation_type | ( | attribute_store_node_t | user_node, |
| user_credential_operation_type_t | operation_type | ||
| ) |
Set User Operation.
Set the operation type as desired and clear reported to call SET function
| user_node | User node |
| operation_type | Operation type to set |
| bool user_credential_helpers::user_exists | ( | attribute_store::attribute | endpoint_node, |
| user_credential_user_unique_id_t | user_id | ||
| ) |
Get node associated with user ID (desired or reported)
| endpoint_node | Current endpoint node |
| user_id | User ID |