I guess I should have tagged the previous thread: https://forum.hdfgroup.org/t/reading-data-from-an-unknown-source/6342. I’ll now copy the example from there and append to it:
pid = [open group]
did = H5Dopen(pid, name);
type = H5Tget_class((tdid = H5Dget_type(did)));
switch (type){
case H5T_COMPOUND:
if ((H5Tget_table_info(pid, name, &fields, &records))<0){
// handle error
}
if ((H5Tget_field_info(pid, name, fnames, fsizes, foofsets, &size))<0){
// handle error
}
for (i=0; i<fields; ++i){
native_hid = H5Tget_member_type(tdid, i);
// From here, you have to use H5Tequal(native_hid, H5T_NATIVE_)
// I do a local static structure array with all of the H5T_NATIVE_ types an run it through a loop:
for (i=0; i0)
// Found it. This is not the problem.
else
// This is the string type that I cannot figure out.
As I stated in the above post, I have attempted H5tequal() with HF5_STR_NULLTERM (which does not compile), same for H5T_CSET_ASCII (which does not compile), and have attempted the H5T_C_S1 which does not equal.
@gheber: What you have is the writing side of things. What I have is a mixed bag of data files that I cannot trace back to any source that created them. I need to read the anonymous data sets to figure out where the data belongs… I can map it off of type and (in the case of the strings) the length, but I gotta have the length. I will, however, attempt the H5Tget_size() to see if that gives me what I want. If that works, I’ll try to limp along with that.
Thanks for the reply!
Andy