questions about H5DSiterate_scales

Howdy all!

For the iterator through the dimension scales, the docs have this to

    typedef herr_t (*H5DS_iterate_t)(hid_t did, unsigned dim, hid_t
    dsid, void *visitor_data); 

"The operation receives the Dimension Scale dataset identifier, dsid,
and the pointer to the operator data passed in to H5DDiterate_scales,

What does parameter did hold?

Also, when I try to use dsid to get the name of the dataset, I get

herr_t alien_visitor(hid_t did, unsigned dim, hid_t dsid, 
                     void *visitor_data)
   char name1[NC_MAX_NAME], name2[NC_MAX_NAME];

   (*(hid_t *)visitor_data) = dsid;
   if (H5Iget_name(did, name1, NC_MAX_NAME) < 0) ERR;
   if (H5Iget_name(dsid, name2, NC_MAX_NAME) < 0) ERR;
   /*printf("visiting did 0x%x dim %d dsid 0x%x name of did %s name of dsid 
     did, dim, dsid, name1, name2);*/
   printf("visiting did 0x%x dim %d dsid 0x%x name of did %s \n", 
          did, dim, dsid, name1);
   printf("name of dsid: %s\n", name2);
   return 0;

Called like this:

               /* Go through all dimscales for this var and learn about them. */
               for (d = 0; d < ndims; d++)
                  if (H5DSiterate_scales(datasetid, d, NULL, alien_visitor,
                                         &visitor_data) < 0) ERR;

Yields this:

visiting did 0x600000b dim 0 dsid 0x600000c name of did /simple_scales/var1 

Does dsid not have a valid name? Or am I missing something?

While in the visitor function, I need to know what dimscale I am


Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx