hwi_tag_find()

Updated: May 06, 2022

Locate a specific instance of the named tag for a device

Synopsis:

#include <drvr/hwinfo.h>

hwi_tag *hwi_tag_find( unsigned hwi_off,
                       const char *tag_name,
                       unsigned *tag_idx );

Arguments:

hwi_off
The offset into the hwinfo section for the device.
tag_name
The tag that you're looking for.
tag_idx
A pointer to a specific tag that's of interest.

Library:

libdrvr

Use the -l drvr option to qcc to link against this library.

Description:

The hwi_tag_find() function locates a specific instance of the named tag tag_name for the device specified by hwi_off.

The tag_idx is pointer to the specific tag instance of interest. Some devices may contain multiple tags of the same type. This parameter lets you obtain a specific instance or repeatedly call this function to obtain all instances. For example, to obtain the second instance of tag_name, set *tag_idx to 1. Repeatedly calling this function with the tag_idx parameter sequentially retrieves each one starting with the second.

If you want only the first tag instance, set tag_idx to NULL, which is equivalent to setting *tag_idx to 0 and calling the function only once.

Returns:

A pointer to the tag, or NULL on error.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes