Functions

Reading and Writing Attributes
[H5hut C API]

Functions

h5_err_t H5WriteFileAttribString (h5_file_t *const f, const char *name, const char *value)
h5_err_t H5WriteStepAttribString (h5_file_t *const f, const char *name, const char *value)
h5_err_t H5WriteFileAttribFloat32 (h5_file_t *const f, const char *name, const h5_float32_t *values, const h5_size_t nelems)
h5_err_t H5WriteStepAttribFloat32 (h5_file_t *const f, const char *name, const h5_float32_t *values, const h5_size_t nelems)
h5_err_t H5WriteFileAttribFloat64 (h5_file_t *const f, const char *name, const h5_float64_t *values, const h5_size_t nelems)
h5_err_t H5WriteStepAttribFloat64 (h5_file_t *const f, const char *name, const h5_float64_t *values, const h5_size_t nelems)
h5_err_t H5WriteFileAttribInt32 (h5_file_t *const f, const char *name, const h5_int32_t *values, const h5_size_t nelems)
h5_err_t H5WriteStepAttribInt32 (h5_file_t *const f, const char *name, const h5_int32_t *values, const h5_size_t nelems)
h5_err_t H5WriteFileAttribInt64 (h5_file_t *const f, const char *name, const h5_int64_t *values, const h5_size_t nelems)
h5_err_t H5WriteStepAttribInt64 (h5_file_t *const f, const char *name, const h5_int64_t *values, const h5_size_t nelems)
h5_err_t H5ReadFileAttribString (h5_file_t *const f, const char *name, char *buffer)
h5_err_t H5ReadStepAttribString (h5_file_t *const f, const char *name, char *buffer)
h5_err_t H5ReadFileAttribInt32 (h5_file_t *const f, const char *name, h5_int32_t *buffer)
h5_err_t H5ReadStepAttribInt32 (h5_file_t *const f, const char *name, h5_int32_t *buffer)
h5_err_t H5ReadFileAttribInt64 (h5_file_t *const f, const char *name, h5_int64_t *buffer)
h5_err_t H5ReadStepAttribInt64 (h5_file_t *const f, const char *name, h5_int64_t *buffer)
h5_err_t H5ReadFileAttribFloat32 (h5_file_t *const f, const char *name, h5_float32_t *buffer)
h5_err_t H5ReadStepAttribFloat32 (h5_file_t *const f, const char *name, h5_float32_t *buffer)
h5_err_t H5ReadFileAttribFloat64 (h5_file_t *const f, const char *name, h5_float64_t *buffer)
h5_err_t H5ReadStepAttribFloat64 (h5_file_t *const f, const char *name, h5_float64_t *buffer)
h5_int64_t H5GetNumFileAttribs (h5_file_t *const f)
h5_int64_t H5GetNumStepAttribs (h5_file_t *const f)
h5_int64_t H5GetFileAttribInfo (h5_file_t *const f, const h5_size_t attrib_idx, char *attrib_name, const h5_size_t len_of_attrib_name, h5_int64_t *attrib_type, h5_size_t *attrib_nelem)
h5_int64_t H5GetStepAttribInfo (h5_file_t *const f, const h5_size_t attrib_idx, char *attrib_name, const h5_size_t len_of_attrib_name, h5_int64_t *attrib_type, h5_size_t *attrib_nelem)

Function Documentation

h5_err_t H5WriteFileAttribString ( h5_file_t *const   f,
const char *  name,
const char *  value 
)

Write an attribute name with the string value to the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valueValue of attribute
h5_err_t H5WriteStepAttribString ( h5_file_t *const   f,
const char *  name,
const char *  value 
)

Write an attribute name with the string value to the current timestep.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valueValue of attribute
h5_err_t H5WriteFileAttribFloat32 ( h5_file_t *const   f,
const char *  name,
const h5_float32_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with float32 values to the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteStepAttribFloat32 ( h5_file_t *const   f,
const char *  name,
const h5_float32_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with float32 values to the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteFileAttribFloat64 ( h5_file_t *const   f,
const char *  name,
const h5_float64_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with float64 values to the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteStepAttribFloat64 ( h5_file_t *const   f,
const char *  name,
const h5_float64_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with float64 values to the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteFileAttribInt32 ( h5_file_t *const   f,
const char *  name,
const h5_int32_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with int32 values to the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteStepAttribInt32 ( h5_file_t *const   f,
const char *  name,
const h5_int32_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with int32 values to the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteFileAttribInt64 ( h5_file_t *const   f,
const char *  name,
const h5_int64_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with int64 values to the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5WriteStepAttribInt64 ( h5_file_t *const   f,
const char *  name,
const h5_int64_t *  values,
const h5_size_t  nelems 
)

Write an attribute name with int64 values to the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[in]valuesValues of attribute
[in]nelemsNumber of values
h5_err_t H5ReadFileAttribString ( h5_file_t *const   f,
const char *  name,
char *  buffer 
)

Read a string into a buffer from an attribute name in the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValue of attribute
h5_err_t H5ReadStepAttribString ( h5_file_t *const   f,
const char *  name,
char *  buffer 
)

Read a string into a buffer from an attribute name in the current timestep.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValue of attribute
h5_err_t H5ReadFileAttribInt32 ( h5_file_t *const   f,
const char *  name,
h5_int32_t *  buffer 
)

Read int32 values into a buffer from an attribute name in the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadStepAttribInt32 ( h5_file_t *const   f,
const char *  name,
h5_int32_t *  buffer 
)

Read int32 values into a buffer from an attribute name in the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadFileAttribInt64 ( h5_file_t *const   f,
const char *  name,
h5_int64_t *  buffer 
)

Read int64 values into a buffer from an attribute name in the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadStepAttribInt64 ( h5_file_t *const   f,
const char *  name,
h5_int64_t *  buffer 
)

Read int64 values into a buffer from an attribute name in the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadFileAttribFloat32 ( h5_file_t *const   f,
const char *  name,
h5_float32_t *  buffer 
)

Read float32 values into a buffer from an attribute name in the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadStepAttribFloat32 ( h5_file_t *const   f,
const char *  name,
h5_float32_t *  buffer 
)

Read float32 values into a buffer from an attribute name in the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadFileAttribFloat64 ( h5_file_t *const   f,
const char *  name,
h5_float64_t *  buffer 
)

Read float64 values into a buffer from an attribute name in the file root ("/").

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_err_t H5ReadStepAttribFloat64 ( h5_file_t *const   f,
const char *  name,
h5_float64_t *  buffer 
)

Read float64 values into a buffer from an attribute name in the current time step.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]nameName of attribute to create
[out]bufferValues of attribute
h5_int64_t H5GetNumFileAttribs ( h5_file_t *const   f )

Gets the number of attributes in the file's root ("/").

Returns:
Number of attributes or error code.
Parameters:
[in]fHandle to open file
h5_int64_t H5GetNumStepAttribs ( h5_file_t *const   f )

Gets the number of attributes bound to the current step.

Returns:
Number of attributes or error code.
Parameters:
[in]fHandle to open file
h5_int64_t H5GetFileAttribInfo ( h5_file_t *const   f,
const h5_size_t  attrib_idx,
char *  attrib_name,
const h5_size_t  len_of_attrib_name,
h5_int64_t *  attrib_type,
h5_size_t *  attrib_nelem 
)

Gets the name, type and number of elements of the file attribute specified by its index.

This function can be used to retrieve all attributes bound to the file f by looping from 0 to the number of attribute minus one. The number of attributes bound to file f can be queried by calling H5GetNumFileAttribs.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]attrib_idxIndex of attribute to get infos about
[out]attrib_nameName of attribute
[in]len_of_attrib_namelength of buffer name
[out]attrib_typeType of value.
[out]attrib_nelemNumber of elements
h5_int64_t H5GetStepAttribInfo ( h5_file_t *const   f,
const h5_size_t  attrib_idx,
char *  attrib_name,
const h5_size_t  len_of_attrib_name,
h5_int64_t *  attrib_type,
h5_size_t *  attrib_nelem 
)

Gets the name, type and number of elements of the step attribute specified by its index.

This function can be used to retrieve all attributes bound to the current time-step by looping from 0 to the number of attribute minus one. The number of attributes bound to the current time-step can be queried by calling H5GetNumStepAttribs.

Returns:
H5_SUCCESS or error code
Parameters:
[in]fHandle to open file
[in]attrib_idxIndex of attribute to get infos about
[out]attrib_nameName of attribute
[in]len_of_attrib_namelength of buffer name
[out]attrib_typeType of value.
[out]attrib_nelemNumber of elements