Page tree

The license could not be verified: License Certificate has expired!

 

JAVA

FORTRAN

C++

C

 

Link

H5L_UNPACK_ELINK_VAL

Decodes external link information

H5L_UNPACK_ELINK_VAL(ext_linkval, link_size, flags, filename, obj_path)

herr_t H5Lunpack_elink_val( char *ext_linkval, size_t link_size, unsigned *flags, const char **filename, const char **obj_path )

const char *ext_linkval    IN: Buffer containing external link information
size_t link_sizeIN: Size, in bytes, of the ext_linkval buffer
unsigned *flagsOUT: External link flags, packed as a bitmap 
(Reserved as a bitmap for flags; no flags are currently defined, so the only valid value is 0.)
const char **filenameOUT: Returned filename
const char **obj_pathOUT: Returned object path, relative to filename

H5L_UNPACK_ELINK_VAL decodes the external link information returned by H5L_GET_VAL in the ext_linkval buffer.

ext_linkval should be the buffer set by H5L_GET_VAL and will consist of two NULL-terminated strings, the filename and object path, one after the other.

Given this buffer, H5L_UNPACK_ELINK_VAL creates pointers to the filename and object path within the buffer and returns them in filename and obj_path, unless they are passed in as NULL.

H5L_UNPACK_ELINK_VAL requires that ext_linkval contain a concatenated pair of null-terminated strings, so use of this function on a string that is not an external link udata buffer may result in a segmentation fault. This failure can be avoided by adhering to the following procedure:

  1. Call H5L_GET_INFO to get the link type and the size of the link value.
  2. Verify that the link is an external link, i.e., that its link type is H5L_TYPE_EXTERNAL.
  3. Call H5L_GET_VAL to get the link value.
  4. Call H5L_UNPACK_ELINK_VAL to unpack that value.

Returns a non-negative value if successful; otherwise returns a negative value. 

Coming Soon!

Release    Change
1.8.0Function introduced in this release.

--- Last Modified: April 25, 2019 | 12:56 PM