H5LT: HDF5 Lite
HDF5 Lite API
The HDF5 Lite API consists of higher-level functions which do more operations per
call than the basic HDF5 interface. The purpose is to wrap intuitive functions around
certain sets of features in the existing APIs. This version of the API has two sets of functions: dataset and attribute related functions.
The following functions are part of the HDF5 Lite API version 1.0.
Currently we only provide a C interface for the library.
Dataset functions
Make dataset functions
Read dataset functions
Query dataset functions
General dataset functions
|
Attribute functions
Set attribute functions
Get attribute functions
Query attribute functions
|
- Name: H5LTmake_dataset
- Signature:
- herr_t H5LTmake_dataset ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t
type_id, const void *buffer )
- Purpose:
- Creates and writes a dataset of a type
type_id
.
- Description:
H5LT
make_dataset
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The parameter type_id
can be any valid HDF5 predefined
native datatype, for example H5T_NATIVE_INT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- hid_t
type_id
- IN: Identifier of the datatype to use when creating the dataset.
- const void *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_char
- Signature:
herr_t H5LTmake_dataset_char ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
char *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LT
make_dataset_char
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_CHAR.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const char *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_short
- Signature:
herr_t H5LTmake_dataset_short ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
short *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LTmake_dataset_short
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_SHORT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const short *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_int
- Signature:
herr_t H5LTmake_dataset_int ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
int *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LTmake_dataset_int
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_INT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const int *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_long
- Signature:
herr_t H5LTmake_dataset_long ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
long *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LTmake_dataset
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_LONG.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const long *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_float
- Signature:
herr_t H5LTmake_dataset_float ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
float *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LTmake_dataset
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_FLOAT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const float *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTmake_dataset_double
- Signature:
herr_t H5LTmake_dataset_double ( hid_t
loc_id, const char *dset_name, int rank, const hsize_t *dims, const
double *buffer )
- Purpose:
- Creates and writes a dataset.
- Description:
H5LTmake_dataset
creates and writes a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_DOUBLE.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to create the dataset within.
- const char *
dset_name
- IN: The name of the dataset to create.
- int
rank
- IN: Number of dimensions of dataspace.
- const hsize_t *
dims
- IN: An array of the size of each dimension.
- const double *
buffer
- IN: Buffer with data to be written to the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset
- Signature:
- herr_t H5LTread_dataset ( hid_t
loc_id, const char *dset_name, hid_t
type_id, void *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LT
read_dataset
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- hid_t
type_id
- IN: Identifier of the datatype to use when reading the dataset.
- void *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_char
- Signature:
- herr_t H5LTread_dataset_char ( hid_t
loc_id, const char *dset_name, char *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset_char
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_CHAR.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- char *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_short
- Signature:
- herr_t H5LTread_dataset_short ( hid_t
loc_id, const char *dset_name, short *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset_short
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_SHORT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- short *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_int
- Signature:
- herr_t H5LTread_dataset_int ( hid_t
loc_id, const char *dset_name, int *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset_int
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_INT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- int *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_long
- Signature:
- herr_t H5LTread_dataset_long ( hid_t
loc_id, const char *dset_name, long *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset_long
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_LONG.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- long *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_float
- Signature:
- herr_t H5LTread_dataset_float ( hid_t
loc_id, const char *dset_name, float *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_FLOAT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- float *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTread_dataset_double
- Signature:
- herr_t H5LTread_dataset_double ( hid_t
loc_id, const char *dset_name, double *buffer )
- Purpose:
- Reads a dataset from disk.
- Description:
H5LTread_dataset
reads a dataset named dset_name
attached to
the object specified by the identifier loc_id
. The HDF5
datatype is H5T_NATIVE_DOUBLE.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the file or group to read the dataset within.
- const char *
dset_name
- IN: The name of the dataset to read.
- double *
buffer
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTfind_dataset
- Signature:
- herr_t
H5LTfind_dataset ( hid_t loc_id, const char *dset_name )
- Purpose:
- Inquires if a dataset exists.
- Description:
H5LT
find_dataset
inquires if a dataset named dset_name
exists attached to the object loc_id
.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object to locate the dataset within.
- const char *
dset_name
- IN: The dataset name.
- Returns:
- Returns 1 if the dataset exists, returns 0 otherwise.
- Name: H5LTget_dataset_ndims
- Signature:
- herr_t
H5LTget_dataset_ndims ( hid_t loc_id, const char *dset_name,
int *rank )
- Purpose:
- Gets the dimensionality of a dataset.
- Description:
H5LT
get_dataset_ndims
gets the dimensionality of a dataset named dset_name
exists attached to the object loc_id
.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object to locate the dataset within.
- const char *
dset_name
- IN: The dataset name.
- int *
rank
- OUT: The dimensionality of the dataset.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_dataset_info
- Signature:
- herr_t
H5LTget_dataset_info ( hid_t loc_id, const char *dset_name,
hsize_t *dims, H5T_class_t *class_id, size_t *type_size )
- Purpose:
- Gets information about a dataset.
- Description:
H5LT
get_dataset_info
gets information about a dataset named dset_name
exists attached to the object loc_id
.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object to locate the dataset within.
- const char *
dset_name
- IN: The dataset name.
- hsize_t *
dims
- OUT: The dimensions of the dataset.
- H5T_class_t *
class_id
- OUT: The class identifier. To a list of the HDF5 class types please
refer to the Datatype Interface API help.
- size_t *
type_size
- OUT: The size of the datatype in bytes.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_string
- Signature:
- herr_t
H5LTset_attribute_string( hid_t loc_id, const char *obj_name, const char
*attr_name, const char *attr_data )
- Purpose:
- Creates and writes a string attribute.
- Description:
H5LT
attach_attribute
creates and writes a string attribute named attr_name
and
attaches it to the object specified by the name obj_name
. If the attribute already exists, it is overwritten.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object (dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- const char *
attr_data
- IN: Buffer with data to be written to the attribute.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_char
- Signature:
- herr_t
H5LTset_attribute_char ( hid_t loc_id, const char
*obj_name, const char
*attr_name, char *buffer, hsize_t size)
- Purpose:
- Creates and writes an attribute.
- Description:
H5LT
set_attribute_char
creates and writes a numerical attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_CHAR.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- char *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_uchar
- See H5LTset_attribute_char. This
function is the unsigned version and it uses the H5T_NATIVE_UCHAR datatype
instead.
- Name: H5LTset_attribute_short
- Signature:
- herr_t
H5LTset_attribute_short ( hid_t loc_id, const char
*obj_name, const char
*attr_name, short *buffer, hsize_t size)
- Purpose:
- Creates and writes an attribute.
- Description:
H5LTset_attribute_short
creates and writes a numerical attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_SHORT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- short *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_ushort
- See H5LTset_attribute_short. This
function is the unsigned version and it uses the H5T_NATIVE_USHORT datatype
instead.
- Name: H5LTset_attribute_int
- Signature:
- herr_t
H5LTset_attribute_int( hid_t loc_id, const char
*obj_name, const char
*attr_name, int *buffer, hsize_t size)
- Purpose:
- Creates and writes an attribute.
- Description:
H5LTset_attribute_int
creates and writes a numerical integer attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_INT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- int *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_uint
- See H5LTset_attribute_int. This
function is the unsigned version and it uses the H5T_NATIVE_UINT datatype
instead.
- Name: H5LTset_attribute_long
- Signature:
- herr_t
H5LTset_attribute_long ( hid_t loc_id, const char
*obj_name, const char
*attr_name, long *buffer, hsize_t size)
- Purpose:
- Creates and writes an attribute.
- Description:
H5LTset_attribute_long
creates and writes a numerical attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_LONG.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- long *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_ulong
- See H5LTset_attribute_long. This
function is the unsigned version and it uses the H5T_NATIVE_ULONG datatype
instead.
- Name: H5LTset_attribute_float
- Signature:
- herr_t
H5LTset_attribute_float( hid_t loc_id, const char
*obj_name, const char
*attr_name, float *buffer, hsize_t size )
- Purpose:
- Creates and writes an attribute.
- Description:
H5LT
set_attribute_float
creates and writes a numerical floating point attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_FLOAT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- float *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTset_attribute_double
- Signature:
- herr_t
H5LTset_attribute_double ( hid_t loc_id, const char
*obj_name, const char
*attr_name, double *buffer, hsize_t size)
- Purpose:
- Creates and writes an attribute.
- Description:
H5LTset_attribute_double
creates and writes a numerical attribute named attr_name
and
attaches it to the object specified by the name obj_name
. The attribute has
a dimensionality of 1. The HDF5
datatype of the attribute is H5T_NATIVE_DOUBLE.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to create the attribute within.
- const char *
obj_name
- IN: The name of the object to attach the attribute.
- const char *
attr_name
- IN: The attribute name.
- double *
buffer
- IN: Buffer with data to be written to the attribute.
- hsize_t
size
- IN: The size of the 1D array (one in the case of a scalar
attribute). This value is used by
H5Screate_simple
to create the
dataspace.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute
- Signature:
- herr_t
H5LTget_attribute( hid_t loc_id, const char
*obj_name, const char
*attr_name, hid_t mem_type_id, void *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LT
get_attribute
reads an attribute named attr_name
with the memory type mem_type_id.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- hid_t
mem_type_id
- IN: Identifier of the memory datatype.
- void *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_string
- Signature:
- herr_t
H5LTget_attribute_string( hid_t loc_id, const char
*obj_name, const char
*attr_name, char *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- char *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_char
- Signature:
- herr_t
H5LTget_attribute( hid_t loc_id, const char
*obj_name, const char
*attr_name, char *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_CHAR.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- char *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_uchar
- See H5LTget_attribute_char. This
function is the unsigned version and it uses the H5T_NATIVE_UCHAR datatype
instead.
- Name: H5LTget_attribute_short
- Signature:
- herr_t
H5LTget_attribute_short( hid_t loc_id, const char
*obj_name, const char
*attr_name, short *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_SHORT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- short *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_ushort
- See H5LTget_attribute_short. This
function is the unsigned version and it uses the H5T_NATIVE_USHORT datatype
instead.
- Name: H5LTget_attribute_int
- Signature:
- herr_t
H5LTget_attribute_int( hid_t loc_id, const char
*obj_name, const char
*attr_name, int *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_INT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- int *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_uint
- See H5LTget_attribute_int. This
function is the unsigned version and it uses the H5T_NATIVE_UINT datatype
instead.
- Name: H5LTget_attribute_long
- Signature:
- herr_t
H5LTget_attribute_long( hid_t loc_id, const char
*obj_name, const char
*attr_name, long *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_LONG.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- long *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_ulong
- See H5LTget_attribute_long. This
function is the unsigned version and it uses the H5T_NATIVE_ULONG datatype
instead.
- Name: H5LTget_attribute_float
- Signature:
- herr_t
H5LTget_attribute_float( hid_t loc_id, const char
*obj_name, const char
*attr_name, float *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_FLOAT.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- float *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_double
- Signature:
- herr_t
H5LTget_attribute_double( hid_t loc_id, const char
*obj_name, const char
*attr_name, double *data )
- Purpose:
- Reads an attribute from disk.
- Description:
H5LTget_attribute
reads an attribute named attr_name
that is attached to the object specified by the name obj_name.
The HDF5
datatype of the attribute is H5T_NATIVE_DOUBLE.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- double *
data
- OUT: Buffer with data.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_ndims
- Signature:
- herr_t
H5LTget_attribute_ndims( hid_t loc_id, const char
*obj_name, const char
*attr_name, int *rank )
- Purpose:
- Gets the dimensionality of an attribute.
- Description:
H5LT
get_attribute_ndims
gets the dimensionality of an attribute named attr_name
that is
attached to the object specified by the name obj_name.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- int *
rank
- OUT: The dimensionality of the attribute.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTget_attribute_info
- Signature:
- herr_t
H5LTget_attribute_info( hid_t loc_id, const char
*obj_name, const char
*attr_name, hsize_t *dims, H5T_class_t *type_class, size_t *type_size
)
- Purpose:
- Gets information about an attribute.
- Description:
H5LT
get_attribute_info
gets information about an attribute named attr_name
attached to the object specified by the name obj_name.
- Parameters:
- hid_t
loc_id
- IN: Identifier of the object ( dataset or group) to read the attribute
from.
- const char *
obj_name
- IN: The name of the object that the attribute is attached to.
- const char *
attr_name
- IN: The attribute name.
- hsize_t *
dims
- OUT: The dimensions of the attribute.
- H5T_class_t *
type_class
- OUT: The class identifier. To a list of the HDF5 class types please
refer to the Datatype Interface API help.
- size_t *
type_size
- OUT: The size of the datatype in bytes.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTcreate_compound_type
- Signature:
- hid_t H5LTcreate_compound_type( hsize_t
nfields, const char *field_names[], const hid_t *field_types
)
- Purpose:
- Creates a compound type.
- Description:
H5LTcreate_compound_type
creates a compound type.
- Parameters:
- hsize_t
nfields
- IN: The number of fields..
- const char *
field_names[]
- IN: An array containing the names of the fields.
- const hid_t *
field_types
- IN: An array containing the type of the fields.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
- Name: H5LTrepack
- Signature:
- hid_t H5LTrepack( hsize_t
nfields, hsize_t
nrecords, size_t src_size, const size_t
*src_offset, const size_t *src_sizes, size_t
dst_size, const size_t *dst_offset, const size_t
*dst_sizes, unsigned char *src_buf, unsigned char *dst_buf
)
- Purpose:
- Packs or unpacks data from one data buffer to another.
- Description:
- This function transfers data from a packed buffer, src_buf, to a "natural byte aligned" (an n-byte item at an n-byte boundary) buffer,
dst_buf, and vice-versa.
- Parameters:
- hsize_t
nfields
- IN: The number of fields.
- hsize_t
nrecords
- IN: The number of records.
- size_t src_size
- IN: The size of the source datatype.
- const size_t *src_offset
- IN: The source offsets.
- const size_t *src_sizes
- IN: The size of each source struct member datatype.
- size_t dst_size
- IN: The size of the destination datatype.
- const size_t *dst_offset
- IN: The destination offsets.
- const size_t *dst_sizes
- IN: The size of each destination struct member datatype.
- unsigned char * src_buf
- IN: A source buffer.
- unsigned char * dst_buf
- OUT: The destination buffer.
- Returns:
- Returns a non-negative value if successful; otherwise returns a negative value.
-
HDF Help Desk
Last modified: November 14, 2002