Functions

Reading and Writing Attributes
[H5Block C API]

Functions

h5_err_t H5BlockWriteFieldAttribString (h5_file_t *const f, const char *field_name, const char *attrib_name, const char *value)
h5_err_t H5BlockReadFieldAttribString (h5_file_t *const f, const char *field_name, const char *attrib_name, char *buffer)
h5_ssize_t H5BlockGetNumFieldAttribs (h5_file_t *const f, const char *field_name)
h5_int64_t H5BlockGetFieldAttribInfo (h5_file_t *const f, const char *field_name, 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_err_t H5BlockWriteFieldAttribFloat64 (h5_file_t *f, const char *field_name, const char *attrib_name, const h5_float64_t *values, const h5_size_t nvalues)
h5_err_t H5BlockReadFieldAttribFloat64 (h5_file_t *f, const char *field_name, const char *attrib_name, h5_float64_t *buffer)
h5_err_t H5BlockWriteFieldAttribFloat32 (h5_file_t *f, const char *field_name, const char *attrib_name, const h5_float32_t *values, const h5_size_t nvalues)
h5_err_t H5BlockReadFieldAttribFloat32 (h5_file_t *f, const char *field_name, const char *attrib_name, h5_float32_t *buffer)
h5_err_t H5BlockWriteFieldAttribInt64 (h5_file_t *f, const char *field_name, const char *attrib_name, const h5_int64_t *values, const h5_size_t nvalues)
h5_err_t H5BlockReadFieldAttribInt64 (h5_file_t *f, const char *field_name, const char *attrib_name, h5_int64_t *buffer)
h5_err_t H5BlockWriteFieldAttribInt32 (h5_file_t *f, const char *field_name, const char *attrib_name, const h5_int32_t *values, const h5_size_t nvalues)
h5_err_t H5BlockReadFieldAttribInt32 (h5_file_t *f, const char *field_name, const char *attrib_name, h5_int32_t *buffer)

Function Documentation

h5_err_t H5BlockWriteFieldAttribString ( h5_file_t *const   f,
const char *  field_name,
const char *  attrib_name,
const char *  value 
)

Write the string value as attribute attrib_name of field field_name.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
valueIN: attribute value
h5_err_t H5BlockReadFieldAttribString ( h5_file_t *const   f,
const char *  field_name,
const char *  attrib_name,
char *  buffer 
)

Read the string value from attribute attrib_name of field field_name into a buffer.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
bufferOUT: attribute value
h5_ssize_t H5BlockGetNumFieldAttribs ( h5_file_t *const   f,
const char *  field_name 
)

Query the number of attributes of field field_name.

Returns:
number of attributes or error code
h5_int64_t H5BlockGetFieldAttribInfo ( h5_file_t *const   f,
const char *  field_name,
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 field attribute specified by its index.

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

Returns:
H5_SUCCESS or error code
h5_err_t H5BlockWriteFieldAttribFloat64 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
const h5_float64_t *  values,
const h5_size_t  nvalues 
)

Write float64 values as attribute attrib_name of field field_name.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
valuesIN: attribute values
nvaluesIN: number of elements
h5_err_t H5BlockReadFieldAttribFloat64 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
h5_float64_t *  buffer 
)

Read float64 values from attribute attrib_name of field field_name into a buffer.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
bufferOUT: attribute values
h5_err_t H5BlockWriteFieldAttribFloat32 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
const h5_float32_t *  values,
const h5_size_t  nvalues 
)

Write float32 values as attribute attrib_name of field field_name.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
valuesIN: attribute values
nvaluesIN: number of elements
h5_err_t H5BlockReadFieldAttribFloat32 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
h5_float32_t *  buffer 
)

Read float32 values from attribute attrib_name of field field_name into a buffer.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
bufferOUT: attribute values
h5_err_t H5BlockWriteFieldAttribInt64 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
const h5_int64_t *  values,
const h5_size_t  nvalues 
)

Write int64 values as attribute attrib_name of field field_name.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
valuesIN: attribute values
nvaluesIN: number of elements
h5_err_t H5BlockReadFieldAttribInt64 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
h5_int64_t *  buffer 
)

Read int64 values from attribute attrib_name of field field_name into a buffer.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
bufferOUT: attribute values
h5_err_t H5BlockWriteFieldAttribInt32 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
const h5_int32_t *  values,
const h5_size_t  nvalues 
)

Write int32 values as attribute attrib_name of field field_name.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
valuesIN: attribute values
nvaluesIN: number of elements
h5_err_t H5BlockReadFieldAttribInt32 ( h5_file_t *  f,
const char *  field_name,
const char *  attrib_name,
h5_int32_t *  buffer 
)

Read int32 values from attribute attrib_name of field field_name into a buffer.

Returns:
H5_SUCCESS or error code
Parameters:
fIN: file handle
field_nameIN: field name
attrib_nameIN: attribute name
bufferOUT: attribute values