Go to the documentation of this file.
40 IAS_OBJ_DESC *p_ODLTree,
41 const char *p_ClassName,
42 const char *p_LabelName,
56 if ( (p_LabelName ==
NULL) || (strlen(p_LabelName) == 0) )
90 if ((p_keyword= malloc(strlen(p_kwv)+1)) ==
NULL)
95 (void)
strcpy(p_keyword,p_kwv);
106 while ((p_newline = strchr(p_keyword,
'\n')) !=
NULL)
108 while (*p_newline !=
'\0')
110 *p_newline = *(p_newline + 1);
118 p_word = strtok(p_keyword,
"(,) \"\n");
119 while(p_word !=
NULL)
126 MemorySize -=
sizeof(long);
135 ValueType,p_word) ) !=
SUCCESS )
138 "%s",p_LabelName, p_word);
142 p_MemoryAddr = (
long *)p_MemoryAddr + 1;
146 MemorySize -=
sizeof(
int);
155 ValueType,p_word) ) !=
SUCCESS )
158 "%s",p_LabelName, p_word);
162 p_MemoryAddr = (
int *)p_MemoryAddr + 1;
166 MemorySize -=
sizeof(
float);
175 ValueType,p_word) ) !=
SUCCESS )
178 "%s",p_LabelName, p_word);
182 p_MemoryAddr = (
float *)p_MemoryAddr + 1;
187 MemorySize -=
sizeof(
double);
196 ValueType,p_word) ) !=
SUCCESS )
199 "%s",p_LabelName, p_word);
203 p_MemoryAddr = (
double *)p_MemoryAddr + 1;
207 MemorySize -=
sizeof(
char *);
216 ValueType,p_word) ) !=
SUCCESS )
218 for(
i=0;
i<*p_Count;
i++)
219 free((
char *)p_MemoryAddr +
i);
221 "%s",p_LabelName, p_word);
225 p_MemoryAddr = (
char *)p_MemoryAddr +
sizeof(
char *);
229 (void)
strncpy( p_MemoryAddr, p_word, MemorySize);
236 p_word = strtok(
NULL,
",() \"\n");
242 p_word = strtok(p_keyword,
"{,} \"\n");
243 while(p_word !=
NULL)
250 MemorySize -=
sizeof(
char *);
259 ValueType,p_word) ) !=
SUCCESS )
261 for(
i=0;
i<*p_Count;
i++)
262 free((
char *)p_MemoryAddr +
i);
264 "%s", p_LabelName, p_word);
268 p_MemoryAddr = (
char *)p_MemoryAddr +
sizeof(
char *);
272 (void)
strncpy( p_MemoryAddr, p_word, MemorySize);
274 "IAS_ODL_ArrayOfString only");
279 p_word = strtok(
NULL,
",{} \"\n");
287 char * p_start = p_kwv;
288 int len = strlen(p_kwv);
294 if (p_kwv[0] ==
'\"')
300 if (MemorySize < (len + 1))
303 (void)
strncpy(p_MemoryAddr, p_start, MemorySize);
304 ((
char *)p_MemoryAddr)[MemorySize-1] =
'\0';
309 (void)
strncpy(p_MemoryAddr, p_start, len);
310 ((
char *)p_MemoryAddr)[len] =
'\0';
317 MemorySize -=
sizeof(long);
321 MemorySize -=
sizeof(
int);
325 MemorySize -=
sizeof(
float);
330 MemorySize -=
sizeof(
double);
394 (*(
long *)p_destination) = strtol(kvalue,&p_endptr,10);
395 if (*p_endptr !=
'\0')
402 (*(
int *)p_destination) = (
int)strtol(kvalue,&p_endptr,10);
403 if (*p_endptr !=
'\0')
410 (*(
float *)p_destination) = (
float)strtod(kvalue,&p_endptr);
411 if (*p_endptr !=
'\0')
419 (*(
double *)p_destination) = strtod(kvalue,&p_endptr);
420 if (*p_endptr !=
'\0')
427 p_a = malloc(strlen(kvalue)+1);
434 (*(
char **)p_destination) = p_a;
#define IAS_LOG_ERROR(format,...)
OBJDESC * OdlFindObjDesc(OBJDESC *start_object, const char *object_class, const char *keyword_name, char *keyword_value, unsigned long object_position, unsigned short search_scope)
KEYWORD * OdlFindKwd(OBJDESC *start_object, const char *keyword_name, char *keyword_value, unsigned long keyword_position, unsigned short search_scope)
int convert_string(void *p_destination, IAS_ODL_TYPE parm_type, char *kvalue)
int ias_odl_get_field(void *p_MemoryAddr, int MemorySize, IAS_ODL_TYPE ValueType, IAS_OBJ_DESC *p_ODLTree, const char *p_ClassName, const char *p_LabelName, int *p_Count)
#define IAS_ODL_NOT_ENOUGH_MEMORY_SUPPLIED
char * OdlGetKwdValue(KEYWORD *keyword)
integer, parameter double
unsigned short OdlGetKwdValueType(KEYWORD *keyword)
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy(l2prod->name_prefix, "myprod", UNITLEN)
#define IAS_ODL_INVALID_DATA_TYPE
#define IAS_ODL_NOT_FOUND
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
#define ODL_RECURSIVE_DOWN