I am trying to create a compound datatype with variable length arrays. When created and tested to work in hypy, the format looks like this using h5dump:
HDF5 "camera_data.h5py" {
GROUP "/" {
GROUP "observations" {
DATASET "0" {
DATATYPE H5T_COMPOUND {
H5T_IEEE_F64LE "timestamp";
H5T_ARRAY { [1] H5T_VLEN { H5T_STD_U8LE} } "bgr";
H5T_ARRAY { [1] H5T_VLEN { H5T_STD_U8LE} } "d";
}
DATASPACE SIMPLE { ( 39000 ) / ( 39000 ) }
DATA {
(0): {
1.60865e+09,
[ (255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, 6, 6, 6, 7, 9, 8, 6, 7, 9, 7, 6, 6, 8, 11, 8, 9, 10, 10, 10, 10, 10, 6, 8, 11, 12, 11, 10, 12, 9, 10, 10, 10, 255, 219, 0, 67, 1, 2, 2, 2, 2, 2, 2, 5, 3, 3, 5, 10, 7, 6, 7,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 255, 192, 0, 17, 8, 1, 224, 3, 80, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, 255, 196, 0, 31, 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 255, 1
96, 0, 181, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103
, 104, 105, 106, 115, 116, 117,
Can you please tell me how to create such a compound datatype using the H5 C++ APIs. Couldnt find an example to repurpose, so I am asking here:
DATATYPE H5T_COMPOUND {
H5T_IEEE_F64LE “timestamp”;
H5T_ARRAY { [1] H5T_VLEN { H5T_STD_U8LE} } “bgr”;
H5T_ARRAY { [1] H5T_VLEN { H5T_STD_U8LE} } “d”;
}