<refentry id="openhpi-RPT-Utilities">
<refmeta>
<refentrytitle>RPT Utilities</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>OPENHPI Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>RPT Utilities</refname><refpurpose>Resource Presence Table Utility Functions</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;SaHpi.h&gt;
#include &lt;glib.h&gt;


#define     <link linkend="FREE-RPT-DATA-CAPS">FREE_RPT_DATA</link>
#define     <link linkend="KEEP-RPT-DATA-CAPS">KEEP_RPT_DATA</link>
void        <link linkend="oh-flush-rpt">oh_flush_rpt</link>                    (RPTable *table);
void        <link linkend="rpt-diff">rpt_diff</link>                        	(RPTable *cur_rpt,
                                             	RPTable *new_rpt,
                                             	GSList **res_new,
                                             	GSList **rdr_new,
                                             	GSList **res_gone,
                                             	GSList **rdr_gone);
int         <link linkend="oh-add-resource">oh_add_resource</link>		(RPTable *table,
                                             	SaHpiRptEntryT *entry,
                                             	void *data,
                                             	int owndata);
int         <link linkend="oh-remove-resource">oh_remove_resource</link>        (RPTable *table,
                                             	SaHpiResourceIdT rid);
void*       <link linkend="oh-get-resource-data">oh_get_resource_data</link>    (RPTable *table,
                                             	SaHpiResourceIdT rid);
SaHpiRptEntryT* <link linkend="oh-get-resource-by-id">oh_get_resource_by_id</link>	(RPTable *table,
                                             		SaHpiResourceIdT rid);
SaHpiRptEntryT* <link linkend="oh-get-resource-by-ep">oh_get_resource_by_ep</link>      (RPTable *table,
                                             		SaHpiEntityPathT *ep);
SaHpiRptEntryT* <link linkend="oh-get-resource-next">oh_get_resource_next</link>        (RPTable *table,
                                             		SaHpiResourceIdT rid_prev);
int         <link linkend="oh-add-rdr">oh_add_rdr</link>                      	(RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiRdrT *rdr,
                                             	void *data,
                                             	int owndata);
int         <link linkend="oh-remove-rdr">oh_remove_rdr</link>                  (RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiEntryIdT rdrid);
void*       <link linkend="oh-get-rdr-data">oh_get_rdr_data</link>              (RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiEntryIdT rdrid);
SaHpiRdrT*  <link linkend="oh-get-rdr-by-id">oh_get_rdr_by_id</link>            (RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiEntryIdT rdrid);
SaHpiRdrT*  <link linkend="oh-get-rdr-by-type">oh_get_rdr_by_type</link>        (RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiRdrTypeT type,
                                             	SaHpiUint8T num);
SaHpiRdrT*  <link linkend="oh-get-rdr-next">oh_get_rdr_next</link>              (RPTable *table,
                                             	SaHpiResourceIdT rid,
                                             	SaHpiEntryIdT rdrid_prev);
SaHpiUint32T <link linkend="get-rdr-uid">get_rdr_uid</link>                    	(SaHpiRdrTypeT type,
                                             	SaHpiUint32T num);
</synopsis>
</refsynopsisdiv>







<refsect1>
<title>Description</title>
<para>
This interface was created to interact with a Resource Presence Table (RPT).
By using the interface you may add resources and rdrs to a table, remove them,
and fetch them.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="FREE-RPT-DATA-CAPS">FREE_RPT_DATA</title>
<programlisting>
#define		FREE_RPT_DATA	SAHPI_FALSE
</programlisting>
<para>
Used in the <link linkend="oh-add-resource">oh_add_resource</link>() and <link linkend="oh-add-rdr">oh_add_rdr</link>() calls to tell the interface
if it should free the <parameter>data</parameter> when the resource/rdr is removed.
</para></refsect2>
<refsect2>
<title><anchor id="KEEP-RPT-DATA-CAPS">KEEP_RPT_DATA</title>
<programlisting>
#define 	KEEP_RPT_DATA	SAHPI_TRUE
</programlisting>
<para>
Used in the <link linkend="oh-add-resource">oh_add_resource</link>() and <link linkend="oh-add-rdr">oh_add_rdr</link>() calls to tell the interface
if it should leave the  <parameter>data</parameter> pointer alone when the resource/rdr is removed.
</para></refsect2>
<refsect2>
<title><anchor id="oh-flush-rpt">oh_flush_rpt ()</title>
<programlisting>
void		oh_flush_rpt	(RPTable *table);
</programlisting>
<para>
Cleans RPT from all entries and RDRs and frees the memory
associated with them.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT to flush.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="rpt-diff">rpt_diff ()</title>
<programlisting>
void		rpt_diff	(RPTable *cur_rpt,
				 RPTable *new_rpt,
				 GSList **res_new,
				 GSList **rdr_new,
				 GSList **res_gone,
				 GSList **rdr_gone);
</programlisting>
<para>
Extracts from current the resources and rdrs that are not found
in new and puts them in res_gone and rdr_gone. Also, puts in res_new and rdr_new
the resources and rdrs that are not already in current Or that are not identical
to the ones in current.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>cur_rpt</parameter>&nbsp;:</term>
<listitem><simpara> IN. Pointer to RPTable that represents the current state of resources
and rdrs.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_rpt</parameter>&nbsp;:</term>
<listitem><simpara> IN. Pointer to RPTable that contains rpt entries and rdrs just recently
discovered.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res_new</parameter>&nbsp;:</term>
<listitem><simpara> OUT. List of new or changed rpt entries
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdr_new</parameter>&nbsp;:</term>
<listitem><simpara> OUT. List of new or changed rdrs
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>res_gone</parameter>&nbsp;:</term>
<listitem><simpara> OUT. List of old and not present resources.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdr_gone</parameter>&nbsp;:</term>
<listitem><simpara> OUT. List of old and not present rdrs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-add-resource">oh_add_resource ()</title>
<programlisting>
int	oh_add_resource		(RPTable *table,
				 SaHpiRptEntryT *entry,
				 void *data,
				 int owndata);
</programlisting>
<para>
Add a RPT entry to the RPT along with some private data.
If an RPT entry with the same resource id exists int the RPT, it will be
overlayed with the new RPT entry. Also, this function will assign the
resource id as its entry id since it is expected to be unique for the table.
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT to which the RPT entry will be added.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>entry</parameter>&nbsp;:</term>
<listitem><simpara> The RPT entry (resource) to be added to the RPT.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to private data for storing along with the RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>owndata</parameter>&nbsp;:</term>
<listitem><simpara> boolean flag. true (<literal>KEEP_RPT_DATA</literal>) to tell the interface *not*
to free the data when the resource is removed. false (<literal>FREE_RPT_DATA</literal>) to tell
the interface to free the data when the resource is removed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
0 - successful addition to the RPT.
-1 - table pointer is NULL.
-2 - entry is NULL.
-3 - entry does not have an id assigned.
-4 - entry has an invalid/reserved id assinged.
-5 - entity path does not contain root element.
-6 - failure and not enough memory could be allocated. 
for a new position in the RPT.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-remove-resource">oh_remove_resource ()</title>
<programlisting>
int	oh_remove_resource	(RPTable *table,
				 SaHpiResourceIdT rid);
</programlisting>
<para>
Remove a resource from the RPT. If the <parameter>rid</parameter> is
<literal>SAHPI_FIRST_ENTRY</literal>, the first RPT entry in the table will be removed.
The void data will be freed if <parameter>owndata</parameter> was false (<literal>FREE_RPT_DATA</literal>) when adding
the resource, otherwise if <parameter>owndata</parameter> was true (<literal>KEEP_RPT_DATA</literal>) it will not be freed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT from which an RPT entry will be removed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Resource id of the RPT entry to be removed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
0 - Successful removal from the RPT.
-1 - table pointer is NULL.
-2 - Failure. No resource found by that id.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-resource-data">oh_get_resource_data ()</title>
<programlisting>
void*	oh_get_resource_data	(RPTable *table,
				 SaHpiResourceIdT rid);
</programlisting>
<para>
Get the private data for a RPT entry.  If the <parameter>rid</parameter> is
<literal>SAHPI_FIRST_ENTRY</literal>, the first RPT entry's data in the table will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT for looking up the RPT entry's private data.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Resource id of the RPT entry that holds the private data.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-resource-by-id">oh_get_resource_by_id ()</title>
<programlisting>
SaHpiRptEntryT*	oh_get_resource_by_id	(RPTable *table,
					 SaHpiResourceIdT rid);
</programlisting>
<para>
Get a RPT entry from the RPT by using the resource id.
If <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RPT entry in the table will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT for looking up the RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Resource id of the RPT entry to be looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Pointer to the RPT entry found or NULL if an RPT entry by that
id was not found or the table was a NULL pointer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-resource-by-ep">oh_get_resource_by_ep ()</title>
<programlisting>
SaHpiRptEntryT* oh_get_resource_by_ep	(RPTable *table,
					 SaHpiEntityPathT *ep);
</programlisting>
<para>
Get a RPT entry from the RPT by using the entity path.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT for looking up the RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ep</parameter>&nbsp;:</term>
<listitem><simpara> Entity path of the RPT entry to be looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Pointer to the RPT entry found or NULL if an RPT entry by that
entity path was not found or the table was a NULL pointer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-resource-next">oh_get_resource_next ()</title>
<programlisting>
SaHpiRptEntryT* oh_get_resource_next	(RPTable *table,
					 SaHpiResourceIdT rid_prev);
</programlisting>
<para>
Get the RPT entry next to the specified RPT entry
from the RPT. If <parameter>rid_prev</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RPT entry
in the table will be returned.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT for looking up the RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid_prev</parameter>&nbsp;:</term>
<listitem><simpara> Resource id of the RPT entry previous to the one being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Pointer to the RPT entry found or NULL if the previous RPT entry by that
id was not found or the table was a NULL pointer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-add-rdr">oh_add_rdr ()</title>
<programlisting>
int	oh_add_rdr	(RPTable *table,
			 SaHpiResourceIdT rid,
			 SaHpiRdrT *rdr,
			 void *data,
			 int owndata);
</programlisting>
<para>
Add an RDR to a RPT entry's RDR repository.
If an RDR is found with the same record id as the one being added, the RDR being
added will overlay the existing one. Also, a unique record id will be assigned
to it based on the RDR type and its type's numeric id.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to RPT table containig the RPT entry to which the RDR will belong.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry that will own the RDR to be added.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdr</parameter>&nbsp;:</term>
<listitem><simpara> RDR to be added to an RPT entry's RDR repository.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to private data belonging to the RDR that is being added.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>owndata</parameter>&nbsp;:</term>
<listitem><simpara> boolean flag. true (<literal>KEEP_RPT_DATA</literal>) to tell the interface *not*
to free the data when the rdr is removed. false (<literal>FREE_RPT_DATA</literal>) to tell
the interface to free the data when the rdr is removed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
0 - Successful addition of RDR.
-1 - table pointer is NULL.
-2 - Failure. RDR is NULL.
-3 - Failure. RPT entry for that <parameter>rid</parameter> was not found.
-4 - Failure. RDR entity path is different from parent RPT entry.
-5 - Failure. Could not allocate enough memory to position the new RDR in the RDR
repository.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-remove-rdr">oh_remove_rdr ()</title>
<programlisting>
int	oh_remove_rdr	(RPTable *table,
			 SaHpiResourceIdT rid,
			 SaHpiEntryIdT rdrid);
</programlisting>
<para>
Remove an RDR from a RPT entry's RDR repository.
If <parameter>rdrid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RDR in the repository will be removed.
If <parameter>owndata</parameter> was set to false (<literal>FREE_RPT_DATA</literal>) on the rdr when it was added,
the data will be freed, otherwise if it was set to true (<literal>KEEP_RPT_DATA</literal>),
it will not be freed.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to RPT table containig the RPT entry from which the RDR will
be removed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry from which the RDR will be removed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdrid</parameter>&nbsp;:</term>
<listitem><simpara> Record id of the RDR to remove.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
0 - Successful removal of RDR.
-1 - table pointer is NULL.
-2 - Failure. RPT entry for that <parameter>rid</parameter> was not found.
-3 - Failure. No RDR by that <parameter>rdrid</parameter> was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-rdr-data">oh_get_rdr_data ()</title>
<programlisting>
void*	oh_get_rdr_data	(RPTable *table,
			 SaHpiResourceIdT rid,
			 SaHpiEntryIdT rdrid);</programlisting>
<para>
Get the private data associated to an RDR.
If <parameter>rdrid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RDR's data in the repository will be returned.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to RPT table containig the RPT entry from which the RDR's data
will be read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry from which the RDR's data will be read.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdrid</parameter>&nbsp;:</term>
<listitem><simpara> Record id of the RDR to read data from.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-rdr-by-id">oh_get_rdr_by_id ()</title>
<programlisting>
SaHpiRdrT*	oh_get_rdr_by_id	(RPTable *table,
					 SaHpiResourceIdT rid,
					 SaHpiEntryIdT rdrid);</programlisting>
<para>
Get a reference to an RDR by its record id.
If <parameter>rdrid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RDR in the repository will be returned.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to RPT table containig the RPT entry tha has the RDR
being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry containing the RDR being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdrid</parameter>&nbsp;:</term>
<listitem><simpara> Record id of the RDR being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Reference to the RDR looked up or NULL if no RDR was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-rdr-by-type">oh_get_rdr_by_type ()</title>
<programlisting>
SaHpiRdrT*	oh_get_rdr_by_type	(RPTable *table,
					 SaHpiResourceIdT rid,
					 SaHpiRdrTypeT type,
					 SaHpiUint8T num);
</programlisting>
<para>
Get a reference to an RDR by its type and number.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to RPT table containig the RPT entry tha has the RDR
being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry containing the RDR being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> RDR Type of the RDR being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num</parameter>&nbsp;:</term>
<listitem><simpara> RDR id within the RDR type for the specified RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Reference to the RDR looked up or NULL if no RDR was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="oh-get-rdr-next">oh_get_rdr_next ()</title>
<programlisting>
SaHpiRdrT*	oh_get_rdr_next		(RPTable *table,
					 SaHpiResourceIdT rid,
					 SaHpiEntryIdT rdrid_prev);
</programlisting>
<para>
Get the RDR next to the specified RDR in the specified
RPT entry's repository. If <parameter>rdrid_prev</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>, the first RDR
in the repository will be returned.
All rdr interface funtions, except <link linkend="oh-add-rdr">oh_add_rdr</link>() will act in the context of
the first RPT entry in the table, if <parameter>rid</parameter> is <literal>SAHPI_FIRST_ENTRY</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>table</parameter>&nbsp;:</term>
<listitem><simpara> Pointer to the RPT containing the RPT entry to look up the RDR in.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rid</parameter>&nbsp;:</term>
<listitem><simpara> Id of the RPT entry containing the RDR being looked up.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rdrid_prev</parameter>&nbsp;:</term>
<listitem><simpara> Record id of the RDR previous to the one being looked up, relative
to the specified RPT entry.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>
Pointer to the RDR found or NULL if the previous RDR by that
id was not found. If the <parameter>rdrid_prev</parameter> was <literal>SAHPI_FIRST_ENTRY</literal>, the first RDR in the list
will be returned.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="get-rdr-uid">get_rdr_uid ()</title>
<programlisting>
SaHpiUint32T	get_rdr_uid	(SaHpiRdrTypeT type,
				 SaHpiUint32T num);
</programlisting>
<para>
Helper function to derive the Record id of an rdr from its <parameter>type</parameter> and <parameter>num</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> type of rdr
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num</parameter>&nbsp;:</term>
<listitem><simpara> id number of the RDR unique withing the RDR type for that resource
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a derived Record Id used to identify RDRs within Resources
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
