Lines Matching full:entity
653 pldm_entity entity; member
666 return node->entity; in pldm_entity_extract()
671 pldm_entity_node_get_remote_container_id(const pldm_entity_node *entity) in pldm_entity_node_get_remote_container_id() argument
673 assert(entity != NULL); in pldm_entity_node_get_remote_container_id()
675 return entity->remote_container_id; in pldm_entity_node_get_remote_container_id()
696 /* Insert after the the last node that matches the input entity type, or in find_insertion_at()
700 uint16_t this_type = start->entity.entity_type; in find_insertion_at()
703 (this_type != next->entity.entity_type)) { in find_insertion_at()
714 pldm_entity_association_tree *tree, pldm_entity *entity, in pldm_entity_association_tree_add() argument
718 return pldm_entity_association_tree_add_entity(tree, entity, in pldm_entity_association_tree_add()
726 pldm_entity_association_tree *tree, pldm_entity *entity, in pldm_entity_association_tree_add_entity() argument
731 if ((!tree) || (!entity)) { in pldm_entity_association_tree_add_entity()
737 node.entity_type = entity->entity_type; in pldm_entity_association_tree_add_entity()
756 node->entity.entity_type = entity->entity_type; in pldm_entity_association_tree_add_entity()
757 node->entity.entity_instance_num = in pldm_entity_association_tree_add_entity()
768 node->entity.entity_container_id = 0; in pldm_entity_association_tree_add_entity()
769 node->remote_container_id = node->entity.entity_container_id; in pldm_entity_association_tree_add_entity()
778 node->parent = parent->entity; in pldm_entity_association_tree_add_entity()
781 node->remote_container_id = entity->entity_container_id; in pldm_entity_association_tree_add_entity()
785 node->entity.entity_container_id = container_id; in pldm_entity_association_tree_add_entity()
790 node->entity.entity_container_id = in pldm_entity_association_tree_add_entity()
794 node->entity.entity_container_id = in pldm_entity_association_tree_add_entity()
795 entity->entity_container_id; in pldm_entity_association_tree_add_entity()
800 node->entity.entity_container_id; in pldm_entity_association_tree_add_entity()
806 find_insertion_at(start, entity->entity_type); in pldm_entity_association_tree_add_entity()
812 if (prev->entity.entity_type == entity->entity_type) { in pldm_entity_association_tree_add_entity()
813 if (prev->entity.entity_instance_num == UINT16_MAX) { in pldm_entity_association_tree_add_entity()
817 node->entity.entity_instance_num = in pldm_entity_association_tree_add_entity()
820 prev->entity.entity_instance_num + 1; in pldm_entity_association_tree_add_entity()
825 node->entity.entity_container_id = in pldm_entity_association_tree_add_entity()
826 prev->entity.entity_container_id; in pldm_entity_association_tree_add_entity()
827 node->remote_container_id = entity->entity_container_id; in pldm_entity_association_tree_add_entity()
829 entity->entity_instance_num = node->entity.entity_instance_num; in pldm_entity_association_tree_add_entity()
831 entity->entity_container_id = node->entity.entity_container_id; in pldm_entity_association_tree_add_entity()
854 pldm_entity *entity = &entities[*index]; in entity_association_tree_visit() local
856 entity->entity_type = node->entity.entity_type; in entity_association_tree_visit()
857 entity->entity_instance_num = node->entity.entity_instance_num; in entity_association_tree_visit()
858 entity->entity_container_id = node->entity.entity_container_id; in entity_association_tree_visit()
975 if (node->entity_type == curr->entity.entity_type && in pldm_is_current_parent_child()
977 curr->entity.entity_instance_num) { in pldm_is_current_parent_child()
1011 *container_id = htole16(curr->first_child->entity.entity_container_id); in entity_association_pdr_add_children()
1016 pldm_entity *entity = (pldm_entity *)start; in entity_association_pdr_add_children() local
1017 entity->entity_type = htole16(curr->entity.entity_type); in entity_association_pdr_add_children()
1018 entity->entity_instance_num = htole16(curr->entity.entity_instance_num); in entity_association_pdr_add_children()
1019 entity->entity_container_id = htole16(curr->entity.entity_container_id); in entity_association_pdr_add_children()
1028 pldm_entity *entity = (pldm_entity *)start; in entity_association_pdr_add_children() local
1029 entity->entity_type = htole16(node->entity.entity_type); in entity_association_pdr_add_children()
1030 entity->entity_instance_num = in entity_association_pdr_add_children()
1031 htole16(node->entity.entity_instance_num); in entity_association_pdr_add_children()
1032 entity->entity_container_id = in entity_association_pdr_add_children()
1033 htole16(node->entity.entity_container_id); in entity_association_pdr_add_children()
1103 static bool is_present(pldm_entity entity, pldm_entity **entities, in is_present() argument
1111 if ((*entities + i)->entity_type == entity.entity_type) { in is_present()
1131 // entity. This causes NULL current entity node, and the in entity_association_pdr_add()
1136 if (is_present(curr->entity, entities, num_entities)) { in entity_association_pdr_add()
1214 pldm_entity entity, pldm_entity_node **node) in find_entity_ref_in_tree() argument
1224 is_type = tree_node->entity.entity_type == entity.entity_type; in find_entity_ref_in_tree()
1225 is_entity_instance_num = tree_node->entity.entity_instance_num == in find_entity_ref_in_tree()
1226 entity.entity_instance_num; in find_entity_ref_in_tree()
1227 is_entity_container_id = tree_node->entity.entity_container_id == in find_entity_ref_in_tree()
1228 entity.entity_container_id; in find_entity_ref_in_tree()
1235 find_entity_ref_in_tree(tree_node->first_child, entity, node); in find_entity_ref_in_tree()
1236 find_entity_ref_in_tree(tree_node->next_sibling, entity, node); in find_entity_ref_in_tree()
1241 pldm_entity entity, pldm_entity_node **node) in pldm_find_entity_ref_in_tree() argument
1247 find_entity_ref_in_tree(tree->root, entity, node); in pldm_find_entity_ref_in_tree()
1376 pldm_entity *entity, in entity_association_tree_find_if_remote() argument
1386 is_entity_type = node->entity.entity_type == entity->entity_type; in entity_association_tree_find_if_remote()
1387 is_entity_instance_num = node->entity.entity_instance_num == in entity_association_tree_find_if_remote()
1388 entity->entity_instance_num; in entity_association_tree_find_if_remote()
1391 node->remote_container_id == entity->entity_container_id) { in entity_association_tree_find_if_remote()
1393 entity->entity_container_id = in entity_association_tree_find_if_remote()
1394 node->entity.entity_container_id; in entity_association_tree_find_if_remote()
1399 entity_association_tree_find_if_remote(node->next_sibling, entity, out, in entity_association_tree_find_if_remote()
1401 entity_association_tree_find_if_remote(node->first_child, entity, out, in entity_association_tree_find_if_remote()
1407 pldm_entity_association_tree *tree, pldm_entity *entity, bool is_remote) in pldm_entity_association_tree_find_with_locality() argument
1409 if (!tree || !entity) { in pldm_entity_association_tree_find_with_locality()
1413 entity_association_tree_find_if_remote(tree->root, entity, &node, in pldm_entity_association_tree_find_with_locality()
1419 pldm_entity *entity, in entity_association_tree_find() argument
1426 if (node->entity.entity_type == entity->entity_type && in entity_association_tree_find()
1427 node->entity.entity_instance_num == entity->entity_instance_num) { in entity_association_tree_find()
1428 entity->entity_container_id = node->entity.entity_container_id; in entity_association_tree_find()
1432 entity_association_tree_find(node->next_sibling, entity, out); in entity_association_tree_find()
1433 entity_association_tree_find(node->first_child, entity, out); in entity_association_tree_find()
1439 pldm_entity *entity) in pldm_entity_association_tree_find() argument
1441 if (!tree || !entity) { in pldm_entity_association_tree_find()
1446 entity_association_tree_find(tree->root, entity, &node); in pldm_entity_association_tree_find()
1465 (*new_node)->entity = org_node->entity; in entity_association_tree_copy()
1693 pldm_pdr *repo, pldm_entity *entity, uint32_t pdr_record_handle) in pldm_entity_association_pdr_add_contained_entity_to_remote_pdr() argument
1695 if (!repo || !entity) { in pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
1713 // check if adding another entity to record causes overflow before in pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
1791 // Add new contained entity as a child of new PDR in pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
1797 rc = pldm_msgbuf_init_errno(src, sizeof(struct pldm_entity), entity, in pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
1839 pldm_entity *entity, in pldm_entity_association_pdr_create_new() argument
1842 if (!repo || !parent || !entity || !entity_record_handle) { in pldm_entity_association_pdr_create_new()
1906 // Data for new PDR is obtained from parent PDR and new contained entity in pldm_entity_association_pdr_create_new()
1914 rc = pldm_msgbuf_init_errno(src_c, sizeof(struct pldm_entity), entity, in pldm_entity_association_pdr_create_new()
1915 sizeof(*entity)); in pldm_entity_association_pdr_create_new()
1935 // Add new entity as child in pldm_entity_association_pdr_create_new()
1938 // Extract and insert child entity container ID and add same value to in pldm_entity_association_pdr_create_new()
1939 // container ID of entity in pldm_entity_association_pdr_create_new()
1987 * entity
1991 pldm_pdr *repo, pldm_entity *entity, bool is_remote, in pldm_entity_association_find_record_handle_by_entity() argument
2038 if (pldm_entity_cmp(entity, &e)) { in pldm_entity_association_find_record_handle_by_entity()
2055 pldm_pdr *repo, pldm_entity *entity, bool is_remote, in pldm_entity_association_pdr_remove_contained_entity() argument
2066 if (!repo || !entity || !pdr_record_handle) { in pldm_entity_association_pdr_remove_contained_entity()
2073 repo, entity, is_remote, pdr_record_handle); in pldm_entity_association_pdr_remove_contained_entity()
2081 // check if removing an entity from record causes overflow before in pldm_entity_association_pdr_remove_contained_entity()
2142 …// This is the last child which is getting removed so we need to delete the Entity Association PDR. in pldm_entity_association_pdr_remove_contained_entity()
2162 if (pldm_entity_cmp(entity, &e)) { in pldm_entity_association_pdr_remove_contained_entity()
2352 const pldm_entity *entity) in pldm_entity_association_tree_delete_node() argument
2354 if (!tree || !entity) { in pldm_entity_association_tree_delete_node()
2358 pldm_find_entity_ref_in_tree(tree, *entity, &node); in pldm_entity_association_tree_delete_node()
2372 if (pldm_entity_cmp(entity, &curr->entity)) { in pldm_entity_association_tree_delete_node()