ifw-core
2.0.0
|
Typedefs | |
using | IsoTime = std::string |
ISO8601 data type. More... | |
Enumerations | |
enum | DataType { DATA_TYPE_BOOLEAN = 1, DATA_TYPE_INT8 = 2, DATA_TYPE_UINT8 = 4, DATA_TYPE_INT16 = 8, DATA_TYPE_UINT16 = 16, DATA_TYPE_INT32 = 32, DATA_TYPE_UINT32 = 64, DATA_TYPE_INT64 = 128, DATA_TYPE_UINT64 = 256, DATA_TYPE_FLOAT = 512, DATA_TYPE_DOUBLE = 1024, DATA_TYPE_STRING = 2048, DATA_TYPE_NON_BASIC = 4096, DATA_TYPE_TIME_DATE = 8192, DATA_TYPE_TIMESTAMP = 16384, DATA_TYPE_BLOB = 32768, DATA_TYPE_ALL, DATA_TYPE_UNKNOWN = 2147483648 } |
Data types numeric representations. More... | |
Functions | |
std::string | GenUniqueId (const std::string &prefix="") |
Generate a unique UUID based ID. A prefix may be prepended, if requested. More... | |
DataType | IfwDataTypeToNumeric (const std::string &data_type) |
Data type IFW string representation to IFW numeric representation. More... | |
std::string | IfwDataTypeToString (const DataType data_type) |
Data type IFW numeric representation to IFW string representation. More... | |
template<class TYPE > | |
void | CleanVector (const std::vector< TYPE > &vect, const TYPE &pattern, std::vector< TYPE > &clean_vect) |
@ brief STL like list that can be indexed with []'s. More... | |
template<class TYPE > | |
void | CheckRange (const std::string &par, TYPE value, TYPE lower_limit, TYPE upper_limit) |
Check if a value is within a given range. More... | |
template<class TYPE > | |
void | CheckRange (const std::string &par, const TYPE &value, std::vector< TYPE > &valid_values) |
Check if a value is defined in a set. More... | |
template<class TYPE > | |
std::string | DumpVector (const std::vector< TYPE > &vector, const std::string &separator="\n") |
Dump contents of a list into a string buffer. More... | |
template<class MAP_TYPE > | |
bool | ElInMap (const std::string &key, const MAP_TYPE &map) |
Check if a given key is contained in an STL map. More... | |
DataType | DataTypeStr2Nb (const std::string &data_type) |
template<class TYPE > | |
bool | SupportedType (const TYPE &variable) |
Check if the variable has a data type which is supported by the ELT ICS. More... | |
Variables | |
const std::string | EXT_FITS = "fits" |
const std::string | EXT_YAML = "yaml" |
const std::string | EXT_XML = "xml" |
const std::string | EXT_CONFIG = "config" |
const std::string | TRUE_STR = "True" |
const std::string | FALSE_STR = "False" |
const int64_t | NO_TIMEOUT = -1 |
const std::string | NO_TIMEOUT_STR = "NoTimeout" |
const int64_t | ERROR = -1 |
const std::string | ERROR_STR = "Error" |
const int64_t | ILLEGAL = -3 |
const std::string | ILLEGAL_STR = "Illegal" |
const int64_t | INVALID = -4 |
const std::string | INVALID_STR = "__INVALID__" |
const int64_t | NOT_IMPLEMENTED = -5 |
const std::string | NOT_IMPLEMENTED_STR = "NotImplemented" |
const int64_t | UNDEFINED = -6 |
const std::string | UNDEFINED_STR = "__UNDEFINED__" |
const int64_t | UNKNOWN = -7 |
const std::string | UNKNOWN_STR = "Unknown" |
const int64_t | FAILURE = -8 |
const std::string | FAILURE_STR = "Failure" |
const int64_t | SUCCESS = 0 |
const std::string | SUCCESS_STR = "Success" |
const std::string | INDEFINITE_STR = "Indefinite" |
const std::string | ALL_STR = "All" |
const std::string | NONE_STR = "None" |
const std::string | COMPLETED_STR = "Completed" |
const std::string | BUSY_STR = "Busy" |
const std::string | ACTIVE_STR = "Active" |
const std::string | INITIALIZING_STR = "Initializing" |
const std::string | STORING_STR = "Storing" |
const std::string | READING_STR = "Reading" |
const std::string | LOADING_STR = "Loading" |
const std::string | PARSING_STR = "Parsing" |
const std::string | ACQUIRING_STR = "Acquiring" |
const std::string | INSTALLING_STR = "Installing" |
const std::string | ON_STR = "On" |
const std::string | OFF_STR = "Off" |
const std::string | OK_STR = "OK" |
const std::string | NOT_OK_STR = "NOK" |
const std::string | DATA_TYPE_BOOLEAN_STR = "Boolean" |
const std::string | DATA_TYPE_INT8_STR = "Int8" |
const std::string | DATA_TYPE_UINT8_STR = "UInt8" |
const std::string | DATA_TYPE_INT16_STR = "Int16" |
const std::string | DATA_TYPE_UINT16_STR = "UInt16" |
const std::string | DATA_TYPE_INT32_STR = "Int32" |
const std::string | DATA_TYPE_UINT32_STR = "UInt32" |
const std::string | DATA_TYPE_INT64_STR = "Int64" |
const std::string | DATA_TYPE_UINT64_STR = "UInt64" |
const std::string | DATA_TYPE_FLOAT_STR = "Float" |
const std::string | DATA_TYPE_DOUBLE_STR = "Double" |
const std::string | DATA_TYPE_STRING_STR = "String" |
const std::string | DATA_TYPE_NON_BASIC_STR = "NonBasic" |
const std::string | DATA_TYPE_TIME_DATE_STR = "TimeDate" |
const std::string | DATA_TYPE_TIMESTAMP_STR = "TimeStamp" |
const std::string | DATA_TYPE_BLOB_STR = "Blob" |
const std::string | DATA_TYPE_UNKNOWN_STR = "Unknown" |
const std::map< DataType, std::string > | DATA_TYPES_NB_MAP |
Mapping from data type numeric to string representation. More... | |
const std::map< std::string, DataType > | DATA_TYPES_NAME_MAP |
Mapping from data type string to numeric representation. More... | |
const std::map< DataType, std::string > | DATA_TYPE_2_TYPE_ID_MAP |
Mapping from IFW numeric data type to system typeid() string representation. More... | |
const std::map< std::string, DataType > | TYPE_ID_2_DATA_TYPE_MAP |
Mapping from system typeid() string representation to IFW numeric data type. More... | |
using ctd::defines::IsoTime = typedef std::string |
ISO8601 data type.
Data types numeric representations.
void ctd::defines::CheckRange | ( | const std::string & | par, |
TYPE | value, | ||
TYPE | lower_limit, | ||
TYPE | upper_limit | ||
) |
Check if a value is within a given range.
void ctd::defines::CheckRange | ( | const std::string & | par, |
const TYPE & | value, | ||
std::vector< TYPE > & | valid_values | ||
) |
Check if a value is defined in a set.
void ctd::defines::CleanVector | ( | const std::vector< TYPE > & | vect, |
const TYPE & | pattern, | ||
std::vector< TYPE > & | clean_vect | ||
) |
@ brief STL like list that can be indexed with []'s.
Remove elements from list, which are equal to "pattern".
DataType ctd::defines::DataTypeStr2Nb | ( | const std::string & | data_type | ) |
std::string ctd::defines::DumpVector | ( | const std::vector< TYPE > & | vector, |
const std::string & | separator = "\n" |
||
) |
Dump contents of a list into a string buffer.
bool ctd::defines::ElInMap | ( | const std::string & | key, |
const MAP_TYPE & | map | ||
) |
Check if a given key is contained in an STL map.
std::string ctd::defines::GenUniqueId | ( | const std::string & | prefix | ) |
Generate a unique UUID based ID. A prefix may be prepended, if requested.
DataType ctd::defines::IfwDataTypeToNumeric | ( | const std::string & | data_type | ) |
Data type IFW string representation to IFW numeric representation.
std::string ctd::defines::IfwDataTypeToString | ( | const DataType | data_type | ) |
Data type IFW numeric representation to IFW string representation.
bool ctd::defines::SupportedType | ( | const TYPE & | variable | ) |
Check if the variable has a data type which is supported by the ELT ICS.
const std::string ctd::defines::ACQUIRING_STR = "Acquiring" |
const std::string ctd::defines::ACTIVE_STR = "Active" |
const std::string ctd::defines::ALL_STR = "All" |
const std::string ctd::defines::BUSY_STR = "Busy" |
const std::string ctd::defines::COMPLETED_STR = "Completed" |
const std::map<DataType, std::string> ctd::defines::DATA_TYPE_2_TYPE_ID_MAP |
Mapping from IFW numeric data type to system typeid() string representation.
const std::string ctd::defines::DATA_TYPE_BLOB_STR = "Blob" |
const std::string ctd::defines::DATA_TYPE_BOOLEAN_STR = "Boolean" |
const std::string ctd::defines::DATA_TYPE_DOUBLE_STR = "Double" |
const std::string ctd::defines::DATA_TYPE_FLOAT_STR = "Float" |
const std::string ctd::defines::DATA_TYPE_INT16_STR = "Int16" |
const std::string ctd::defines::DATA_TYPE_INT32_STR = "Int32" |
const std::string ctd::defines::DATA_TYPE_INT64_STR = "Int64" |
const std::string ctd::defines::DATA_TYPE_INT8_STR = "Int8" |
const std::string ctd::defines::DATA_TYPE_NON_BASIC_STR = "NonBasic" |
const std::string ctd::defines::DATA_TYPE_STRING_STR = "String" |
const std::string ctd::defines::DATA_TYPE_TIME_DATE_STR = "TimeDate" |
const std::string ctd::defines::DATA_TYPE_TIMESTAMP_STR = "TimeStamp" |
const std::string ctd::defines::DATA_TYPE_UINT16_STR = "UInt16" |
const std::string ctd::defines::DATA_TYPE_UINT32_STR = "UInt32" |
const std::string ctd::defines::DATA_TYPE_UINT64_STR = "UInt64" |
const std::string ctd::defines::DATA_TYPE_UINT8_STR = "UInt8" |
const std::string ctd::defines::DATA_TYPE_UNKNOWN_STR = "Unknown" |
const std::map<std::string, DataType> ctd::defines::DATA_TYPES_NAME_MAP |
Mapping from data type string to numeric representation.
const std::map<DataType, std::string> ctd::defines::DATA_TYPES_NB_MAP |
Mapping from data type numeric to string representation.
const int64_t ctd::defines::ERROR = -1 |
const std::string ctd::defines::ERROR_STR = "Error" |
const std::string ctd::defines::EXT_CONFIG = "config" |
const std::string ctd::defines::EXT_FITS = "fits" |
const std::string ctd::defines::EXT_XML = "xml" |
const std::string ctd::defines::EXT_YAML = "yaml" |
const int64_t ctd::defines::FAILURE = -8 |
const std::string ctd::defines::FAILURE_STR = "Failure" |
const std::string ctd::defines::FALSE_STR = "False" |
const int64_t ctd::defines::ILLEGAL = -3 |
const std::string ctd::defines::ILLEGAL_STR = "Illegal" |
const std::string ctd::defines::INDEFINITE_STR = "Indefinite" |
const std::string ctd::defines::INITIALIZING_STR = "Initializing" |
const std::string ctd::defines::INSTALLING_STR = "Installing" |
const int64_t ctd::defines::INVALID = -4 |
const std::string ctd::defines::INVALID_STR = "__INVALID__" |
const std::string ctd::defines::LOADING_STR = "Loading" |
const int64_t ctd::defines::NO_TIMEOUT = -1 |
const std::string ctd::defines::NO_TIMEOUT_STR = "NoTimeout" |
const std::string ctd::defines::NONE_STR = "None" |
const int64_t ctd::defines::NOT_IMPLEMENTED = -5 |
const std::string ctd::defines::NOT_IMPLEMENTED_STR = "NotImplemented" |
const std::string ctd::defines::NOT_OK_STR = "NOK" |
const std::string ctd::defines::OFF_STR = "Off" |
const std::string ctd::defines::OK_STR = "OK" |
const std::string ctd::defines::ON_STR = "On" |
const std::string ctd::defines::PARSING_STR = "Parsing" |
const std::string ctd::defines::READING_STR = "Reading" |
const std::string ctd::defines::STORING_STR = "Storing" |
const int64_t ctd::defines::SUCCESS = 0 |
const std::string ctd::defines::SUCCESS_STR = "Success" |
const std::string ctd::defines::TRUE_STR = "True" |
const std::map<std::string, DataType> ctd::defines::TYPE_ID_2_DATA_TYPE_MAP |
Mapping from system typeid() string representation to IFW numeric data type.
const int64_t ctd::defines::UNDEFINED = -6 |
const std::string ctd::defines::UNDEFINED_STR = "__UNDEFINED__" |
const int64_t ctd::defines::UNKNOWN = -7 |
const std::string ctd::defines::UNKNOWN_STR = "Unknown" |