OSFI-C  3.10.0
OpenSF Integration Library

Deprecated prior version of the ConFM functionality. More...

Data Structures

struct  osfiParameter
 

Macros

#define MAX_LENGTH_STRING   255
 
#define MAX_PARAMETER_FIELD_SIZE   255
 
#define MAX_PARAMETER_NAME_SIZE   255
 
#define MAX_PARAMETER_DESC_SIZE   255
 

Enumerations

enum  ParamType {
  ParamInteger = OSFI_CONFM_PT_INTEGER , ParamDouble = OSFI_CONFM_PT_DOUBLE , ParamBoolean = OSFI_CONFM_PT_BOOLEAN , ParamString = OSFI_CONFM_PT_STRING ,
  ParamFile = OSFI_CONFM_PT_FILE , ParamFolder = OSFI_CONFM_PT_FOLDER , ParamTime = OSFI_CONFM_PT_TIME
}
 Internal definition of parameter types. More...
 

Functions

int osfiConFMParamReader (const char *fileName, const char *schemaName)
 
bool osfiConFMReadConfigFile (const char *fileName)
 
enum osfi_confm_val_res osfiConFMValidateAgainst (const char *schemaFile)
 
void osfiConFMPrintParameters ()
 
void osfiConFMGetIntegerValue (int *value, const char *paramName)
 
void osfiConFMGetDoubleValue (double *value, const char *paramName)
 
void osfiConFMGetTimeValue (osfi_timevalue_t *value, const char *paramName)
 
bool osfiConFMGetBoolValue (const char *paramName)
 
void osfiConFMGetFileValue (char *param, int *length, const char *paramName)
 
void osfiConFMGetStringValue (char *param, int *length, const char *paramName)
 
void osfiConFMGetParameter (osfiParameter *param, const char *paramName)
 
void osfiConFMPrintParameter (const char *paramName)
 
void osfiConFMGetVectorDoubleValues (double *doubleList, int *size, const char *paramName)
 
void osfiConFMGetVectorIntegerValues (int *intList, int *size, const char *paramName)
 
void osfiConFMGetVectorTimeValues (osfi_timevalue_t *list, int *size, const char *paramName)
 
void osfiConFMGetVectorStringValues (char *stringList[], int *size, const char *paramName)
 
void osfiConFMGetVectorFileValues (char *fileList[], int *size, const char *paramName)
 
void osfiConFMGetVectorBooleanValues (bool *boolList, int *size, const char *paramName)
 
void osfiConFMGetLeafVectorDoubleValues (double *doubleList, int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetLeafVectorIntegerValues (int *intList, int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetLeafVectorTimeValues (osfi_timevalue_t *list, int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetLeafVectorStringValues (char *stringList[], int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetLeafVectorFileValues (char *fileList[], int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetLeafVectorBooleanValues (bool *boolList, int *size, const char *paramName, int node[], int depth)
 
void osfiConFMGetMatrixStringValues (char *stringMatrix[], int *rows, int *columns, const char *paramName)
 
void osfiConFMGetMatrixFileValues (char *fileMatrix[], int *rows, int *columns, const char *paramName)
 
void osfiConFMGetMatrixBooleanValues (bool *booleanMatrix, int *rows, int *columns, const char *paramName)
 
void osfiConFMfileExist (bool *booleanMatrix, int *rows, int *columns, const char *paramName)
 
void osfiConFMGetMatrixDoubleValues (double *doubleMatrix, int *rows, int *columns, const char *paramName)
 
void osfiConFMGetMatrixIntegerValues (int *intMatrix, int *rows, int *columns, const char *paramName)
 
void osfiConFMGetMatrixTimeValues (osfi_timevalue_t *intMatrix, int *rows, int *columns, const char *paramName)
 
void osfiConFMGetDimension (const char *paramName, int index, int *size)
 
void osfiConFMGetNodeDimension (const char *paramName, int node[], int depth, int *size)
 
bool osfiConFMIsLeaf (const char *paramName, int node[], int depth)
 
int osfiConFMGetRows (const char *paramName)
 
int osfiConFMGetColumns (const char *paramName)
 
bool osfiConFMExistParameter (const char *paramName)
 
ParamType osfiConFMGetElementType (const char *paramName)
 Returns the element type of the given parameter, or a default value if not found. More...
 
bool osfiConFMIsArray (const char *paramName)
 Returns true if the named parameter is of ARRAY type. Note that MATRIX parameters are not considered ARRAY-typed. More...
 

Detailed Description

Deprecated prior version of the ConFM functionality.

Deprecated:
The prior version of the ConFM API has been deprecated for both safety and usability concerns. All users should switch to the new API, which allows simultaneous parsing of multiple configuration files and does not require callers to preallocate the buffers in which the parameter data will be stored.
Warning
This API is deprecated and will be removed in a future version.

Enumeration Type Documentation

◆ ParamType

enum ParamType

Internal definition of parameter types.

Deprecated:
New constants use proper naming conventions, see osfi_confm_param_type
Enumerator
ParamInteger 

Integral number, with the value range of int32_t.

ParamDouble 

Floating point number, in decimal representation with the range of IEEE754 binary64.

ParamBoolean 

Truth value. Per the E2E-ICD, only TRUE or FALSE are accepted, capitalized.

ParamString 

A string composed of alphanumeric, punctuation or whitespace characters (but excluding control characters e.g. "\n") with length ranging from 0 to 255.

ParamFile 

Path to a file. If relative, it is resolved against the configured base directory, which, following the E2E-ICD, is read from the enviroment variable "E2E_HOME".

ParamFolder 

Path to a folder, with the same rules as ParamFile.

ParamTime 

Timecode formatted as CCSDS ASCII time format with milli- or micro-second precision.

Note
Notwithstanding the E2E-ICD, OSFI allows up to nanosecond precision.
See also
osfi_timevalue_t

Function Documentation

◆ osfiConFMExistParameter()

bool osfiConFMExistParameter ( const char *  paramName)

Checks the existence of a parameter within a configuration file.

Parameters
paramNameParameter name (full path and name)
Returns
boolean True if the parameter exists False otherwise.
Deprecated:
Replaced by osfiConFmParamExists()

◆ osfiConFMfileExist()

void osfiConFMfileExist ( bool *  booleanMatrix,
int *  rows,
int *  columns,
const char *  paramName 
)

Checks the presence of the files specified within a FILE parameter.

Parameters
booleanMatrix- Pointer to the boolean structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).

◆ osfiConFMGetBoolValue()

bool osfiConFMGetBoolValue ( const char *  paramName)

Gets the value of the parameter as a boolean type.

Parameters
paramName- Complete name of the parameter.
Returns
TRUE if value = "TRUE", FALSE either way
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetColumns()

int osfiConFMGetColumns ( const char *  paramName)

Gets an integer with the columns dimension of the parameter.

Parameters
paramName- Parameter name (full path and name).
Returns
int Integer with the number of columns
Deprecated:
Replaced by osfiConFmParamDimensions()

◆ osfiConFMGetDimension()

void osfiConFMGetDimension ( const char *  paramName,
int  index,
int *  size 
)

Gets an integer with the dimension of the parameter specified by index.

Parameters
paramName- Parameter name (full path and name).
index- Integer specifying the dimension that want to be returned. 0:rows 1:columns.
size- Pointer to integer where the dimension will be stored.
Deprecated:
Replaced by osfiConFmParamDimensions()

◆ osfiConFMGetDoubleValue()

void osfiConFMGetDoubleValue ( double *  value,
const char *  paramName 
)

Gets the value of the parameter as a double type.

Parameters
value- Pointer to the double where value will be stored.
paramName- Complete name of the parameter
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetElementType()

ParamType osfiConFMGetElementType ( const char *  paramName)

Returns the element type of the given parameter, or a default value if not found.

Deprecated:
Replaced by osfiConFmParamElementType()

◆ osfiConFMGetFileValue()

void osfiConFMGetFileValue ( char *  param,
int *  length,
const char *  paramName 
)

Gets the value of the parameter as a file type.

Parameters
param- Pointer to memory where file name will be stored.
length- Pointer to an integer where file name length will be stored.
paramName- Complete name of the parameter.
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetIntegerValue()

void osfiConFMGetIntegerValue ( int *  value,
const char *  paramName 
)

Gets the value of the parameter as an integer type.

Parameters
value- Pointer to the integer where value will be stored.
paramName- Complete name of the parameter
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetLeafVectorBooleanValues()

void osfiConFMGetLeafVectorBooleanValues ( bool *  boolList,
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of boolean values.

Parameters
boolList- Pointer to the boolean structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetLeafVectorDoubleValues()

void osfiConFMGetLeafVectorDoubleValues ( double *  doubleList,
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of double values.

Parameters
doubleList- Pointer to the double structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetLeafVectorFileValues()

void osfiConFMGetLeafVectorFileValues ( char *  fileList[],
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of file names.

Parameters
fileList- Pointer to the char structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetLeafVectorIntegerValues()

void osfiConFMGetLeafVectorIntegerValues ( int *  intList,
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of integer values.

Parameters
intList- Pointer to the integer structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetLeafVectorStringValues()

void osfiConFMGetLeafVectorStringValues ( char *  stringList[],
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of string values.

Parameters
stringList- Pointer to the char structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetLeafVectorTimeValues()

void osfiConFMGetLeafVectorTimeValues ( osfi_timevalue_t list,
int *  size,
const char *  paramName,
int  node[],
int  depth 
)

Gets the value of the parameter as a vector of timecode values.

Parameters
intList- Pointer to the array where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamArrayLeaf() or its family

◆ osfiConFMGetMatrixBooleanValues()

void osfiConFMGetMatrixBooleanValues ( bool *  booleanMatrix,
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of boolean values.

Parameters
booleanMatrix- Pointer to the boolean structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetMatrixDoubleValues()

void osfiConFMGetMatrixDoubleValues ( double *  doubleMatrix,
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of double values.

Parameters
doubleMatrix- Pointer to the double structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetMatrixFileValues()

void osfiConFMGetMatrixFileValues ( char *  fileMatrix[],
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of double values.

Parameters
fileMatrix- Pointer to the double structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetMatrixIntegerValues()

void osfiConFMGetMatrixIntegerValues ( int *  intMatrix,
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of integer values.

Parameters
intMatrix- Pointer to the integer structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetMatrixStringValues()

void osfiConFMGetMatrixStringValues ( char *  stringMatrix[],
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of string values.

Parameters
stringMatrix- Pointer to the char structure where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetMatrixTimeValues()

void osfiConFMGetMatrixTimeValues ( osfi_timevalue_t intMatrix,
int *  rows,
int *  columns,
const char *  paramName 
)

Gets the value of the parameter as a matrix of timecode values.

Parameters
intMatrix- Pointer to the array where parameter values will be stored.
rows- Pointer to integer where the number of rows will be stored.
columns- Pointer to integer where the number of columns will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetNodeDimension()

void osfiConFMGetNodeDimension ( const char *  paramName,
int  node[],
int  depth,
int *  size 
)

◆ osfiConFMGetParameter()

void osfiConFMGetParameter ( osfiParameter param,
const char *  paramName 
)

Gets a parameter structure corresponding with the first occurrence of a parameter name into a configuration file.

Parameters
param- Pointer to osfiParameter structure where parameter fields will be stored.
paramName- Parameter name (full path and name)

◆ osfiConFMGetRows()

int osfiConFMGetRows ( const char *  paramName)

Gets an integer with the rows dimension of the parameter.

Parameters
paramName- Parameter name (full path and name).
Returns
int Integer with the number of rows.
Deprecated:
Replaced by osfiConFmParamDimensions()

◆ osfiConFMGetStringValue()

void osfiConFMGetStringValue ( char *  param,
int *  length,
const char *  paramName 
)

Gets the value of the parameter as a string type.

Parameters
param- Pointer to memory where string will be stored.
length- Pointer to an integer where string length will be stored.
paramName- Complete name of the parameter.
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetTimeValue()

void osfiConFMGetTimeValue ( osfi_timevalue_t value,
const char *  paramName 
)

Gets the value of the parameter as a time code.

Parameters
value- Pointer to the timevalue variable where value will be stored.
paramName- Complete name of the parameter
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorBooleanValues()

void osfiConFMGetVectorBooleanValues ( bool *  boolList,
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of boolean values.

Parameters
boolList- Pointer to the boolean structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorDoubleValues()

void osfiConFMGetVectorDoubleValues ( double *  doubleList,
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of double values.

Parameters
doubleList- Pointer to the double structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorFileValues()

void osfiConFMGetVectorFileValues ( char *  fileList[],
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of file names.

Parameters
fileList- Pointer to the char structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorIntegerValues()

void osfiConFMGetVectorIntegerValues ( int *  intList,
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of integer values.

Parameters
intList- Pointer to the integer structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorStringValues()

void osfiConFMGetVectorStringValues ( char *  stringList[],
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of string values.

Parameters
stringList- Pointer to the char structure where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMGetVectorTimeValues()

void osfiConFMGetVectorTimeValues ( osfi_timevalue_t list,
int *  size,
const char *  paramName 
)

Gets the value of the parameter as a vector of timecode values.

Parameters
list- Pointer to the array where parameter values will be stored.
size- Pointer to integer where vector size will be stored.
paramName- Parameter name (full path and name).
Deprecated:
Replaced by osfiConFmParamValue() or its family

◆ osfiConFMIsArray()

bool osfiConFMIsArray ( const char *  paramName)

Returns true if the named parameter is of ARRAY type. Note that MATRIX parameters are not considered ARRAY-typed.

Deprecated:
Replaced by osfiConFmParamIsArray()

◆ osfiConFMIsLeaf()

bool osfiConFMIsLeaf ( const char *  paramName,
int  node[],
int  depth 
)

◆ osfiConFMParamReader()

int osfiConFMParamReader ( const char *  fileName,
const char *  schemaName 
)

Creates an instance of the ParamReader class, parses a given configuration XML file and stores every valid parameter.

Validating agains an XSD schema is optional.

Parameters
fileName- Configuration XML file
schemaName- Configuration XSD schema
Returns
FALSE (0) if errors occurred, nonzero otherwise
Deprecated:
Use osfiConFMReadConfigFile() followed by osfiConFMValidateAgainst()
See also
osfiCommonClose()

◆ osfiConFMPrintParameter()

void osfiConFMPrintParameter ( const char *  paramName)

Prints out to standard output a textual description of the parameter.

Parameters
paramName- Parameter name (full path and name).

◆ osfiConFMPrintParameters()

void osfiConFMPrintParameters ( )

Prints a textual representation of the list of Parameters on screen.

◆ osfiConFMReadConfigFile()

bool osfiConFMReadConfigFile ( const char *  fileName)

Creates an instance of the ParamReader class, parses a given configuration XML file and stores every valid parameter.

Parameters
fileName- Configuration XML file
Returns
false if errors occurred, nonzero otherwise
See also
osfiCommonClose()
Deprecated:
Replaced by osfiConFmCfgFileOpen()

◆ osfiConFMValidateAgainst()

enum osfi_confm_val_res osfiConFMValidateAgainst ( const char *  schemaFile)

Performs validation of the XML file for the current set of parameters against a schema document.

Parameters
schemaFileXSD file to use. If NULL, the schema is assumed to be referenced in the XML itself.
Deprecated:
Replaced by osfiConFmValidateSchema()