OSFI-C++  3.10.0
OpenSF Integration Library
osfi::confm Namespace Reference

Classes

struct  TimeValue
 
struct  parsed_type
 
struct  parsed_type< ElementType::INTEGER >
 
struct  parsed_type< ElementType::FLOAT >
 
struct  parsed_type< ElementType::BOOLEAN >
 
struct  parsed_type< ElementType::STRING >
 
struct  parsed_type< ElementType::FILE >
 
struct  parsed_type< ElementType::FOLDER >
 
struct  parsed_type< ElementType::TIME >
 

Typedefs

template<ElementType et>
using parsed_type_t = typename parsed_type< et >::type
 

Enumerations

enum class  ElementType {
  INTEGER = 1 , FLOAT , BOOLEAN , STRING ,
  FILE , FOLDER , TIME
}
 

Functions

std::string to_string (ElementType et)
 
ElementType as_ElementType (const std::string &str)
 
std::string to_string (const TimeValue &)
 
std::ostream & operator<< (std::ostream &, const TimeValue &)
 
bool operator== (const TimeValue &, const TimeValue &)
 
bool operator< (const TimeValue &, const TimeValue &)
 
bool operator!= (const TimeValue &a, const TimeValue &b)
 
bool operator<= (const TimeValue &a, const TimeValue &b)
 
bool operator>= (const TimeValue &a, const TimeValue &b)
 
bool operator> (const TimeValue &a, const TimeValue &b)
 

Detailed Description

Package bundling classes and routines related to the Configuration File Manager module of OSFI.

Typedef Documentation

◆ parsed_type_t

template<ElementType et>
using osfi::confm::parsed_type_t = typedef typename parsed_type<et>::type

Alias to use instead of parsed_type<et>::type.

Enumeration Type Documentation

◆ ElementType

Parameter types described in the E2E-ICD Issue 1 Rev 4.2 section 2.2.6.2. Note that only element types are included; ARRAY and MATRIX types are detected and their element type is parsed.

Enumerator
INTEGER 

Integral number, with the value range of std::int32_t.

FLOAT 

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

BOOLEAN 

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

STRING 

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

Note
OSFI does not place a limit on string length or contents.
FILE 

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".

FOLDER 

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

TIME 

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::confm::TimeValue

Function Documentation

◆ as_ElementType()

ElementType osfi::confm::as_ElementType ( const std::string &  str)

Conversion from a string to an ElementType value.

Exceptions
std::invalid_argumentif the string is not recognized as an element type name.

◆ operator<()

bool osfi::confm::operator< ( const TimeValue ,
const TimeValue  
)

Less-than operator. Use std::rel_ops to get the rest. Values are compared field by field from most to least significant. No adaptations are performed, so month=3 and dom=31 is less-than month=4 and dom=0.

◆ operator<<()

std::ostream& osfi::confm::operator<< ( std::ostream &  ,
const TimeValue  
)

Insertion operator, formats output according to CCSDS ASCII time code A.

◆ operator==()

bool osfi::confm::operator== ( const TimeValue ,
const TimeValue  
)

Equality comparison operator. Use std::rel_ops to get operator!=. Two instances are equal if all their field values are exactly equal. No conversions or adaptations are performed so month=4 and dom=0 is different from month=3 and dom=31.

◆ to_string() [1/2]

std::string osfi::confm::to_string ( const TimeValue )

String conversion, uses the insertion operator to a string stream.

◆ to_string() [2/2]

std::string osfi::confm::to_string ( ElementType  et)

Conversion from an ElementType to a string.

Exceptions
std::invalid_argumentif the enum value is not recognized.