# device\_resource\_if.h ## **Overview** **Related Modules:** [DriverConfig](DriverConfig.md) **Description:** Declares the API for querying the configuration tree. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures

Data Structure Name

Description

DeviceResourceAttr

Defines the attributes of a tree node in the configuration tree.

DeviceResourceNode

Defines a tree node in the configuration tree.

DeviceResourceIface

Provides functions for obtaining information about the device resource configuration tree.

## Macros

Macro Name and Value

Description

DEV_RES_NODE_FOR_EACH_ATTR(node, attr)   for ((attr) = (node)->attrData; (attr) != NULL; (attr) = (attr)->next)

Traverses the attributes of the current configuration tree node.

DEV_RES_NODE_FOR_EACH_CHILD_NODE(node, childNode)   for ((childNode) = (node)->child; (childNode) != NULL; (childNode) = (childNode)->sibling)

Traverses the child nodes of the current configuration tree node.

## Enumerations

Enumeration Name

Description

DeviceResourceType { HDF_CONFIG_SOURCE = 0, INVALID }

Enumerates configuration file types.

## Functions

Function Name

Description

DeviceResourceGetIfaceInstance (DeviceResourceType type)

struct DeviceResourceIface

Obtains the device resource interface handle of the corresponding configuration tree type.