OpenHPI Manual | ||
---|---|---|
<<< Previous | Next >>> |
Resource UID Utilities
Synopsis
#include <SaHpi.h> #include <glib.h> SaErrorT oh_uid_initialize (void); guint oh_uid_from_entity_path (SaHpiEntityPathT *ep); guint oh_uid_remove (guint uid); guint oh_uid_lookup (SaHpiEntityPathT *ep); guint oh_entity_path_lookup (guint *id, SaHpiEntityPathT *ep); |
Description
This interface helps in generating a unique Resource Id based on an entity path provided. You can also look up entity paths by uid and vice versa.
Details
oh_uid_initialize ()
SaErrorT oh_uid_initialize (void); |
UID utils initialization routine This functions must be called before any other uid_utils are made.
- Returns :
success 0, failure -1.
oh_uid_from_entity_path ()
guint oh_uid_from_entity_path (SaHpiEntityPathT *ep); |
Returns a unique uid to be used as a resource id based upon an specified entity path. This functions returns a unique value to be used as an uid/resourceID base upon a unique entity path specified by ep. If the entity path already exists a return code of -1 is returned. Before returning this call updates the uid map file saved on disk.
- ep :
value to be removed from used
- Returns :
positive unsigned int, failure is -1.
oh_uid_remove ()
guint oh_uid_remove (guint uid); |
This functions removes the uid/entity path pair from use and removes the use of the uid forever. An new uid may be requested for this entity path in the future. oh_uid_from_entity_path() writes the entire uid/entity path pairings to file before returning. oh_uid_remove() deletes the pairing from file.
- uid :
value to be removed from used
- Returns :
success 0, failure -1.
<<< Previous | Home | Next >>> |
OpenHPI internal helper utility interfaces | Up | Sensor functions |