OSFI-C  3.10.0
OpenSF Integration Library
OSFIC.h
Go to the documentation of this file.
1 /*
2  * openSF Integration Libraries (OSFI)
3  * Deimos Space, S.L.U.
4  *
5  * This file is part of OSFI. OSFI is free software; you can redistribute it
6  * and/or modify it under the terms of the 'ESA Software Community Licence Permissive' as
7  * published by the European Space Agency; either version 2.4 of the License,
8  * or (at your option) any later version. You should have received a
9  * copy of the 'ESA Software Community Licence Permissive - v2.4' along with this program
10  * or one can be found at <http://eop-cfi.esa.int/index.php/docs-and-mission-data/licensing-documents>.
11  */
12 
17 #ifndef OSFI_C_INTERFACE
18 #define OSFI_C_INTERFACE 1
19 
20 #include <stdbool.h>
21 #include <stdint.h>
22 
23 
26 #if __STDC_VERSION__ >= 202311L
27  #define OSFI_NO_RETURN [[noreturn]] /* In C23: attribute */
28 #elif __STDC_VERSION__ >= 201112L
29  #define OSFI_NO_RETURN _Noreturn /* In C11: keyword */
30 #else
31  #define OSFI_NO_RETURN /* Below C11: nothing */
32 #endif
33 
36 #if __STDC_VERSION__ >= 202311L
37  #define OSFI_DEPRECATED(reason) [[deprecated(reason)]] // In C23: attribute
38 #else
39  #define OSFI_DEPRECATED(reason) // Below C23: nothing
40 #endif
41 
42 
53 void osfiLoggerError(const char *format,...);
54 
60 void osfiLoggerWarning(const char *format,...);
61 
67 void osfiLoggerInfo(const char *format,...);
68 
76 void osfiLoggerDebug(const char *format,...);
77 
84 void osfiLoggerProgress(int n, int m);
85 
94 
101 void osfiLoggerQuality(const char *name, const char *value);
102 
109 void osfiLoggerQualityDouble(const char *name, double value);
110 
122 typedef struct osfi_clp_files {
124  int count;
126  const char* files[];
128 
139 typedef struct osfi_clp_args {
154 
163 osfi_clp_args_t* osfiClpParseArgs(int argc, char *argv[]);
164 
171 
208 };
209 
211 typedef struct osfi_paramreader osfi_paramreader_t;
212 
224 };
225 
232 typedef struct osfi_timevalue {
233  int16_t year;
234  int8_t month;
235  int8_t dom;
236  int8_t hour;
237  int8_t minute;
238  int8_t sec;
239  int32_t nanosec;
241 
250 
251 #define OSFI_STRTYPE struct {\
252  int size; \
253  char value[]; \
254  }
255 // Note: in order for the generic getters to work, str and file must be different types!
257 typedef OSFI_STRTYPE osfi_ownstr_t;
261 typedef OSFI_STRTYPE osfi_ownfile_t;
262 #undef OSFI_STRTYPE
263 
264 #define OSFI_VECTYPE(T) struct {\
265  int count; \
266  T values[]; \
267  }
269 typedef OSFI_VECTYPE(int32_t) osfi_vecInteger_t;
271 typedef OSFI_VECTYPE(double) osfi_vecDouble_t;
273 typedef OSFI_VECTYPE(bool) osfi_vecBoolean_t;
275 typedef OSFI_VECTYPE(osfi_timevalue_t) osfi_vecTime_t;
277 typedef OSFI_VECTYPE(char*) osfi_vecString_t;
281 typedef OSFI_VECTYPE(char*) osfi_vecFile_t;
282 #undef OSFI_VECTYPE
283 
284 #define OSFI_MATTYPE(T) struct {\
285  int numel; \
286  int rows; \
287  int cols; \
288 \
289 \
290 \
291  T values[];\
292  }
294 typedef OSFI_MATTYPE(int32_t) osfi_matInteger_t;
296 typedef OSFI_MATTYPE(double) osfi_matDouble_t;
298 typedef OSFI_MATTYPE(bool) osfi_matBoolean_t;
300 typedef OSFI_MATTYPE(osfi_timevalue_t) osfi_matTime_t;
302 typedef OSFI_MATTYPE(char*) osfi_matString_t;
306 typedef OSFI_MATTYPE(char*) osfi_matFile_t;
307 #undef OSFI_MATTYPE
308 
327 
340 
341 #if __STDC_VERSION__ >= 201112L
364 #define osfiConFmParamValue(dest, pr, param) \
365  _Generic((dest),\
366  int32_t*: osfiConFmParamValueInteger,\
367  double*: osfiConFmParamValueDouble,\
368  bool*: osfiConFmParamValueBoolean,\
369  osfi_timevalue_t*: osfiConFmParamValueTime,\
370  osfi_ownstr_t**: osfiConFmParamValueString,\
371  osfi_ownfile_t**: osfiConFmParamValueFile,\
372  osfi_vecInteger_t**: osfiConFmParamVectorInteger,\
373  osfi_vecDouble_t**: osfiConFmParamVectorDouble,\
374  osfi_vecBoolean_t**: osfiConFmParamVectorBoolean,\
375  osfi_vecTime_t**: osfiConFmParamVectorTime,\
376  osfi_vecString_t**: osfiConFmParamVectorString,\
377  osfi_vecFile_t**: osfiConFmParamVectorFile,\
378  osfi_matInteger_t**: osfiConFmParamMatrixInteger,\
379  osfi_matDouble_t**: osfiConFmParamMatrixDouble,\
380  osfi_matBoolean_t**: osfiConFmParamMatrixBoolean,\
381  osfi_matTime_t**: osfiConFmParamMatrixTime,\
382  osfi_matString_t**: osfiConFmParamMatrixString,\
383  osfi_matFile_t**: osfiConFmParamMatrixFile\
384  )((dest), (pr), (param))
385 
407 #define osfiConFmParamArrayLeaf(dest, pr, param, depth, node) \
408  _Generic((dest),\
409  osfi_vecInteger_t**: osfiConFmParamArrayLeafInteger,\
410  osfi_vecDouble_t**: osfiConFmParamArrayLeafDouble,\
411  osfi_vecBoolean_t**: osfiConFmParamArrayLeafBoolean,\
412  osfi_vecTime_t**: osfiConFmParamArrayLeafTime,\
413  osfi_vecString_t**: osfiConFmParamArrayLeafString,\
414  osfi_vecFile_t**: osfiConFmParamArrayLeafFile\
415  )((dest), (pr), (param), (depth), (node))
416 #endif // C11-exclusive generic getters
417  // Member group "Basic usage"
419 
431 enum osfi_confm_val_res osfiConFmValidateSchema(osfi_paramreader_t* pr, const char* schemaFile);
432 
439 bool osfiConFmParamExists(osfi_paramreader_t* pr, const char* param);
440 
448 
461 bool osfiConFmGetChildParams(osfi_vecString_t** out, osfi_paramreader_t* pr, const char* group);
462  // Member group "Queries about a configuration file"
464 
475 bool osfiConFmParamIsArray(osfi_paramreader_t* pr, const char* param);
476 bool osfiConFmParamLocalName(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
477 bool osfiConFmParamDescription(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
478 bool osfiConFmParamMinValue(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
479 bool osfiConFmParamMaxValue(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
480 bool osfiConFmParamUnits(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
481 bool osfiConFmParamRawValue(osfi_ownstr_t** out, osfi_paramreader_t* pr, const char* param);
518 bool osfiConFmParamNodeIsLeaf(osfi_paramreader_t* pr, const char* param, int depth, const int node[depth]);
532 int osfiConFmParamNodeSize(osfi_paramreader_t* pr, const char* param, int depth, const int node[depth]);
540 void osfiConFmParamPrint(osfi_paramreader_t* pr, const char* param); // Member group "Non-value queries about a specific parameter"
542 
549 #define OSFI_DECL_TYPED_GETTERS(Type, Tsc) \
550  bool osfiConFmParamValue##Type(Tsc* dest, osfi_paramreader_t* pr, const char* param); \
551  bool osfiConFmParamVector##Type(osfi_vec##Type##_t** dest, osfi_paramreader_t* pr, const char* param); \
552  bool osfiConFmParamMatrix##Type(osfi_mat##Type##_t** dest, osfi_paramreader_t* pr, const char* param); \
553  bool osfiConFmParamArrayLeaf##Type(osfi_vec##Type##_t** dest, osfi_paramreader_t* pr, \
554  const char* param, int depth, const int node[depth]);
555 
556 OSFI_DECL_TYPED_GETTERS(Integer, int32_t)
557 OSFI_DECL_TYPED_GETTERS(Double, double)
558 OSFI_DECL_TYPED_GETTERS(Boolean, bool)
559 OSFI_DECL_TYPED_GETTERS(Time, osfi_timevalue_t)
560 OSFI_DECL_TYPED_GETTERS(String, osfi_ownstr_t*)
561 OSFI_DECL_TYPED_GETTERS(File, osfi_ownfile_t*)
562 
563 #undef OSFI_DECL_TYPED_GETTERS
564  // Member group "Typed value getters"
566  // Group ConFM
568 
584 #define MAX_LENGTH_FILE_NAME 255
585 
595 OSFI_DEPRECATED("Use osfiClpParseArgs() instead.")
596 int osfiCLP(int argc, char *argv[]);
597 
606 OSFI_DEPRECATED("Modules with a single configuration file are deprecated.")
607 void osfiCLPGetConfFile(char * fileName, int *length);
608 
617 OSFI_DEPRECATED("Use osfiClpParseArgs() instead.")
618 void osfiCLPGetConfFiles(char *confFiles[], int *noFiles);
619 
628 OSFI_DEPRECATED("Use osfiClpParseArgs() instead.")
629 void osfiCLPGetInputFiles(char *inputFiles[], int *noFiles);
630 
639 OSFI_DEPRECATED("Use osfiClpParseArgs() instead.")
640 void osfiCLPGetOutputFiles(char *outputFiles[], int *noFiles);
641 
654 # define MAX_LENGTH_STRING 255
655 # define MAX_PARAMETER_FIELD_SIZE 255
656 # define MAX_PARAMETER_NAME_SIZE 255
657 # define MAX_PARAMETER_DESC_SIZE 255
658 
663 typedef enum
664 {
690 
691 typedef struct {
692  char *name;
693  char *description;
694  char *value;
695  char *units;
696  int dims[3];
697  char *min;
698  char *max;
699  ParamType type;
700 } osfiParameter;
701 
713 OSFI_DEPRECATED("Use osfiConFMReadConfigFile() followed by osfiConFMValidateAgainst()")
714 int osfiConFMParamReader(const char *fileName, const char *schemaName);
715 
725 OSFI_DEPRECATED("Replaced by osfiConFmCfgFileOpen()")
726 bool osfiConFMReadConfigFile(const char *fileName);
727 
734 enum osfi_confm_val_res osfiConFMValidateAgainst(const char* schemaFile);
735 
741 
748 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
749 void osfiConFMGetIntegerValue(int *value, const char *paramName);
750 
757 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
758 void osfiConFMGetDoubleValue(double *value, const char *paramName);
759 
766 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
767 void osfiConFMGetTimeValue(osfi_timevalue_t *value, const char *paramName);
768 
775 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
776 bool osfiConFMGetBoolValue(const char *paramName);
777 
785 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
786 void osfiConFMGetFileValue(char *param, int *length, const char *paramName);
787 
795 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
796 void osfiConFMGetStringValue(char *param, int *length, const char *paramName);
797 
803 void osfiConFMGetParameter(osfiParameter *param, const char *paramName);
804 
809 void osfiConFMPrintParameter(const char *paramName);
810 
818 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
819 void osfiConFMGetVectorDoubleValues(double *doubleList, int *size,
820  const char *paramName);
821 
829 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
830 void osfiConFMGetVectorIntegerValues(int *intList, int *size, const char *paramName);
831 
839 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
840 void osfiConFMGetVectorTimeValues(osfi_timevalue_t *list, int *size, const char *paramName);
841 
849 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
850 void osfiConFMGetVectorStringValues(char *stringList[], int *size, const char *paramName);
851 
859 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
860 void osfiConFMGetVectorFileValues(char *fileList[], int *size, const char *paramName);
861 
869 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
870 void osfiConFMGetVectorBooleanValues(bool *boolList, int *size, const char *paramName);
871 
879 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
880 void osfiConFMGetLeafVectorDoubleValues(double *doubleList, int *size,
881  const char *paramName, int node[], int depth);
882 
890 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
891 void osfiConFMGetLeafVectorIntegerValues(int *intList, int *size, const char *paramName, int node[], int depth);
892 
900 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
901 void osfiConFMGetLeafVectorTimeValues(osfi_timevalue_t *list, int *size, const char *paramName, int node[], int depth);
902 
910 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
911 void osfiConFMGetLeafVectorStringValues(char *stringList[], int *size, const char *paramName, int node[], int depth);
912 
920 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
921 void osfiConFMGetLeafVectorFileValues(char *fileList[], int *size, const char *paramName, int node[], int depth);
922 
930 OSFI_DEPRECATED("Replaced by osfiConFmParamArrayLeaf() or its family")
931 void osfiConFMGetLeafVectorBooleanValues(bool *boolList, int *size, const char *paramName, int node[], int depth);
932 
941 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
942 void osfiConFMGetMatrixStringValues(char *stringMatrix[], int *rows, int *columns, const char *paramName);
943 
952 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
953 void osfiConFMGetMatrixFileValues(char *fileMatrix[], int *rows, int *columns, const char *paramName);
954 
963 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
964 void osfiConFMGetMatrixBooleanValues(bool *booleanMatrix, int *rows, int *columns, const char *paramName);
965 
973 void osfiConFMfileExist(bool *booleanMatrix, int *rows, int *columns, const char *paramName);
974 
983 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
984 void osfiConFMGetMatrixDoubleValues(double *doubleMatrix, int *rows,
985  int *columns, const char *paramName);
986 
995 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
996 void osfiConFMGetMatrixIntegerValues(int *intMatrix, int *rows, int *columns,
997  const char *paramName);
998 
1007 OSFI_DEPRECATED("Replaced by osfiConFmParamValue() or its family")
1008 void osfiConFMGetMatrixTimeValues(osfi_timevalue_t *intMatrix, int *rows, int *columns,
1009  const char *paramName);
1010 
1019 void osfiConFMGetDimension(const char *paramName, int index, int *size);
1020 
1024 OSFI_DEPRECATED("Replaced by osfiConFmParamNodeSize()")
1025 void osfiConFMGetNodeDimension(const char *paramName, int node[], int depth, int *size);
1026 
1031 bool osfiConFMIsLeaf(const char *paramName, int node[], int depth);
1039 int osfiConFMGetRows(const char *paramName);
1040 
1048 int osfiConFMGetColumns(const char *paramName);
1049 
1056 OSFI_DEPRECATED("Replaced by osfiConFmParamExists()")
1057 bool osfiConFMExistParameter(const char *paramName);
1058 
1063 ParamType osfiConFMGetElementType(const char* paramName);
1068 OSFI_DEPRECATED("Replaced by osfiConFmParamIsArray()")
1069 bool osfiConFMIsArray(const char* paramName);
1070 
1078 
1087 #endif // !defined(OSFI_C_INTERFACE)
#define OSFI_DEPRECATED(reason)
Definition: OSFIC.h:39
#define OSFI_NO_RETURN
Definition: OSFIC.h:29
int osfiCommonClose()
osfi_clp_args_t * osfiClpParseArgs(int argc, char *argv[])
Parse the command-line arguments provided to the module.
void osfiClpFree(osfi_clp_args_t *p)
Release a previously allocated result returned by osfiClpParseArgs().
struct osfi_clp_args osfi_clp_args_t
Result of parsing CLI arguments, contains the files of each type passed to the module.
struct osfi_clp_files osfi_clp_files_t
List of files of a specific type, allocated by osfiClpParseArgs().
bool osfiConFmParamExists(osfi_paramreader_t *pr, const char *param)
Finds a parameter in the given configuration file.
bool osfiConFmGetChildParams(osfi_vecString_t **out, osfi_paramreader_t *pr, const char *group)
Retrieves the path of all parameters that are children of the given group.
bool osfiConFmParamNodeIsLeaf(osfi_paramreader_t *pr, const char *param, int depth, const int node[depth])
Checks whether the given array node in a parameter has no children (is a leaf node).
enum osfi_confm_param_type osfiConFmParamElementType(osfi_paramreader_t *pr, const char *param)
Returns the value type of the given parameter.
#define osfiConFmParamArrayLeaf(dest, pr, param, depth, node)
Value getter for ARRAY parameters.
Definition: OSFIC.h:407
void osfiConFmParamPrint(osfi_paramreader_t *pr, const char *param)
Writes information about the chosen parameter to the standard output.
int osfiTimevalue_cmp(const osfi_timevalue_t *a, const osfi_timevalue_t *b)
Compares two values of a TIME parameter.
struct osfi_timevalue osfi_timevalue_t
Representation of the value of a TIME parameter.
void osfiConFmCfgFileClose(osfi_paramreader_t *pr)
Closes the configuration file pointed by pr and releases all resources tied to it.
struct osfi_paramreader osfi_paramreader_t
Opaque type representing an open configuration file.
Definition: OSFIC.h:211
bool osfiConFmParamDimensions(osfi_vecInteger_t **out, osfi_paramreader_t *pr, const char *param)
Retrieves the dimensions of the given parameter.
#define osfiConFmParamValue(dest, pr, param)
Value getter for non-ARRAY parameters.
Definition: OSFIC.h:364
enum osfi_confm_val_res osfiConFmValidateSchema(osfi_paramreader_t *pr, const char *schemaFile)
Performs validation of the given configuration file against a schema document.
bool osfiConFmGetAllParams(osfi_vecString_t **out, osfi_paramreader_t *pr)
Retrieves the path of every parameter in the given configuration file.
osfi_confm_param_type
Types of parameter values.
Definition: OSFIC.h:179
osfi_paramreader_t * osfiConFmCfgFileOpen(const char *path)
Parses the configuration file at path and returns a handle to it.
int osfiConFmParamNodeSize(osfi_paramreader_t *pr, const char *param, int depth, const int node[depth])
Returns the number of elements (if a leaf) or children of an array node in a parameter.
bool osfiConFmParamIsArray(osfi_paramreader_t *pr, const char *param)
Checks if the given parameter is of type ARRAY.
osfi_confm_val_res
Return values for the function that validates a configuration file against a schema.
Definition: OSFIC.h:217
@ OSFI_CONFM_PT_FILE
Definition: OSFIC.h:199
@ OSFI_CONFM_PT_INTEGER
Integral number with the value range of its associated type int32_t.
Definition: OSFIC.h:181
@ OSFI_CONFM_PT_STRING
Definition: OSFIC.h:193
@ OSFI_CONFM_PT_DOUBLE
Definition: OSFIC.h:186
@ OSFI_CONFM_PT_TIME
Definition: OSFIC.h:207
@ OSFI_CONFM_PT_BOOLEAN
Truth value, its associated type is bool.
Definition: OSFIC.h:188
@ OSFI_CONFM_PT_FOLDER
Path to a folder, with the same rules and representation as OSFI_CONFM_PT_FILE.
Definition: OSFIC.h:201
@ OSFI_CONFM_VAL_PASSED
Definition: OSFIC.h:219
@ OSFI_CONFM_VAL_INVALID
Definition: OSFIC.h:221
@ OSFI_CONFM_VAL_ERRORS
Definition: OSFIC.h:223
void osfiLoggerQualityDouble(const char *name, double value)
void osfiLoggerInfo(const char *format,...)
void osfiLoggerQuality(const char *name, const char *value)
void osfiLoggerError(const char *format,...)
_Noreturn void osfiLoggerFinishExecution(int errorCode)
void osfiLoggerProgress(int n, int m)
void osfiLoggerDebug(const char *format,...)
void osfiLoggerWarning(const char *format,...)
void osfiCLPGetConfFile(char *fileName, int *length)
void osfiCLPGetOutputFiles(char *outputFiles[], int *noFiles)
void osfiCLPGetConfFiles(char *confFiles[], int *noFiles)
void osfiCLPGetInputFiles(char *inputFiles[], int *noFiles)
int osfiCLP(int argc, char *argv[])
int osfiConFMGetColumns(const char *paramName)
void osfiConFMGetMatrixDoubleValues(double *doubleMatrix, int *rows, int *columns, const char *paramName)
void osfiConFMGetVectorDoubleValues(double *doubleList, int *size, const char *paramName)
void osfiConFMGetDoubleValue(double *value, const char *paramName)
void osfiConFMGetLeafVectorStringValues(char *stringList[], int *size, const char *paramName, int node[], int depth)
void osfiConFMGetVectorStringValues(char *stringList[], int *size, const char *paramName)
void osfiConFMGetStringValue(char *param, int *length, const char *paramName)
bool osfiConFMReadConfigFile(const char *fileName)
void osfiConFMfileExist(bool *booleanMatrix, int *rows, int *columns, const char *paramName)
void osfiConFMGetNodeDimension(const char *paramName, int node[], int depth, int *size)
void osfiConFMGetVectorTimeValues(osfi_timevalue_t *list, int *size, const char *paramName)
void osfiConFMGetIntegerValue(int *value, const char *paramName)
void osfiConFMGetFileValue(char *param, int *length, const char *paramName)
void osfiConFMGetParameter(osfiParameter *param, const char *paramName)
void osfiConFMGetLeafVectorFileValues(char *fileList[], int *size, const char *paramName, int node[], int depth)
ParamType
Internal definition of parameter types.
Definition: OSFIC.h:664
void osfiConFMGetMatrixStringValues(char *stringMatrix[], int *rows, int *columns, const char *paramName)
bool osfiConFMIsLeaf(const char *paramName, int node[], int depth)
void osfiConFMGetVectorBooleanValues(bool *boolList, int *size, const char *paramName)
void osfiConFMGetLeafVectorTimeValues(osfi_timevalue_t *list, int *size, const char *paramName, int node[], int depth)
void osfiConFMGetTimeValue(osfi_timevalue_t *value, const char *paramName)
int osfiConFMGetRows(const char *paramName)
void osfiConFMGetMatrixBooleanValues(bool *booleanMatrix, int *rows, int *columns, const char *paramName)
void osfiConFMGetDimension(const char *paramName, int index, int *size)
void osfiConFMGetLeafVectorIntegerValues(int *intList, int *size, const char *paramName, int node[], int depth)
void osfiConFMPrintParameter(const char *paramName)
void osfiConFMPrintParameters()
bool osfiConFMGetBoolValue(const char *paramName)
void osfiConFMGetVectorFileValues(char *fileList[], int *size, const char *paramName)
void osfiConFMGetVectorIntegerValues(int *intList, int *size, const char *paramName)
void osfiConFMGetMatrixTimeValues(osfi_timevalue_t *intMatrix, int *rows, int *columns, const char *paramName)
bool osfiConFMExistParameter(const char *paramName)
bool osfiConFMIsArray(const char *paramName)
Returns true if the named parameter is of ARRAY type. Note that MATRIX parameters are not considered ...
void osfiConFMGetMatrixIntegerValues(int *intMatrix, int *rows, int *columns, const char *paramName)
void osfiConFMGetLeafVectorBooleanValues(bool *boolList, int *size, const char *paramName, int node[], int depth)
enum osfi_confm_val_res osfiConFMValidateAgainst(const char *schemaFile)
int osfiConFMParamReader(const char *fileName, const char *schemaName)
void osfiConFMGetLeafVectorDoubleValues(double *doubleList, int *size, const char *paramName, int node[], int depth)
void osfiConFMGetMatrixFileValues(char *fileMatrix[], int *rows, int *columns, const char *paramName)
ParamType osfiConFMGetElementType(const char *paramName)
Returns the element type of the given parameter, or a default value if not found.
@ ParamDouble
Floating point number, in decimal representation with the range of IEEE754 binary64.
Definition: OSFIC.h:668
@ ParamFile
Definition: OSFIC.h:680
@ ParamInteger
Integral number, with the value range of int32_t.
Definition: OSFIC.h:666
@ ParamBoolean
Truth value. Per the E2E-ICD, only TRUE or FALSE are accepted, capitalized.
Definition: OSFIC.h:670
@ ParamFolder
Path to a folder, with the same rules as ParamFile.
Definition: OSFIC.h:682
@ ParamString
Definition: OSFIC.h:675
@ ParamTime
Definition: OSFIC.h:688
Definition: OSFIC.h:691
Result of parsing CLI arguments, contains the files of each type passed to the module.
Definition: OSFIC.h:139
osfi_clp_files_t * output
Output files, never null.
Definition: OSFIC.h:152
osfi_clp_files_t * config
Configuration files, never null.
Definition: OSFIC.h:148
osfi_clp_files_t * input
Input files, never null.
Definition: OSFIC.h:150
List of files of a specific type, allocated by osfiClpParseArgs().
Definition: OSFIC.h:122
const char * files[]
Path of each file, contains count valid entries and one final NULL entry.
Definition: OSFIC.h:126
int count
Number of valid pointers to strings in files.
Definition: OSFIC.h:124
Matrix of Boolean values, with dimension sizes and contents.
Definition: OSFIC.h:298
Matrix of floating point values, with dimension sizes and contents.
Definition: OSFIC.h:296
Matrix of file/folder values, with dimension sizes and contents.
Definition: OSFIC.h:306
Matrix of integer values, with dimension sizes and contents.
Definition: OSFIC.h:294
Matrix of string values, with dimension sizes and contents.
Definition: OSFIC.h:302
Matrix of time values, with dimension sizes and contents.
Definition: OSFIC.h:300
String allocated by OSFI.
Definition: OSFIC.h:261
String allocated by OSFI.
Definition: OSFIC.h:257
Representation of the value of a TIME parameter.
Definition: OSFIC.h:232
int8_t hour
Hour of day, from 0 to 23.
Definition: OSFIC.h:236
int16_t year
Year number, from 1 to 9999 inclusive.
Definition: OSFIC.h:233
int8_t dom
Day of month, from 1 to the appropriate length according to the year.
Definition: OSFIC.h:235
int32_t nanosec
Fraction of second in ns resolution, from 0 to 999999999.
Definition: OSFIC.h:239
int8_t sec
Second of minute, from 0 to 60 to allow for leap seconds.
Definition: OSFIC.h:238
int8_t month
Month number, from 1 to 12.
Definition: OSFIC.h:234
int8_t minute
Minute of hour, from 0 to 59.
Definition: OSFIC.h:237
Vector of Boolean values, with size and contents.
Definition: OSFIC.h:273
Vector of floating point values, with size and contents.
Definition: OSFIC.h:271
Vector of file/folder values, with size and contents.
Definition: OSFIC.h:281
Vector of integer values, with size and contents.
Definition: OSFIC.h:269
Vector of string values, with size and contents.
Definition: OSFIC.h:277
Vector of time values, with size and contents.
Definition: OSFIC.h:275