#ident "$URL: svn://elmer/devel/SVN/SDDAS/trunk/libPIDF/DTNames.c $ %D% SwRI" #include #include "pidf_local.h" SDDAS_INT DataTypeNames (SDDAS_ULONG key, const SDDAS_CHAR *exten, SDDAS_INT data_type, SDDAS_CHAR **names) { SDDAS_INT number_tot_sensors; SDDAS_INT i; SDDAS_CHAR name [MAX_PIDF_NAME]; SDDAS_INT idx = 0; SDDAS_INT error_code; if ((error_code = ReadNewPidf (key, exten, data_type, NOTUSED, NOTUSED, NUMOF, (void *) &number_tot_sensors)) == ALL_OKAY) { for (i = 0; i < number_tot_sensors; i++) { if ((error_code = ReadNewPidf (key, exten, data_type, i, NOTUSED, NAME, (void *) &name)) == ALL_OKAY) { sprintf (names [idx], "%s", name); idx++; } else return (error_code); } } else return (error_code); return (ALL_OKAY); }