ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
defines.hpp File Reference
#include <stdarg.h>
#include <string>
#include <map>
#include <list>
#include <fstream>
#include "rad/Logger.hpp"
#include "rad/Exceptions.hpp"

Go to the source code of this file.

Classes

class  ctd::defines::List< TYPE >
 @ brief STL like list that can be indexed with []'s. More...
 

Namespaces

 ifw
 Defines public header file.
 
 ctd
 Conversion source file.
 
 ctd::defines
 

Typedefs

using ctd::defines::IsoTime = std::string
 ISO8601 data type. More...
 

Enumerations

enum  ctd::defines::DataType {
  ctd::defines::DATA_TYPE_BOOLEAN = 1, ctd::defines::DATA_TYPE_INT8 = 2, ctd::defines::DATA_TYPE_UINT8 = 4, ctd::defines::DATA_TYPE_INT16 = 8,
  ctd::defines::DATA_TYPE_UINT16 = 16, ctd::defines::DATA_TYPE_INT32 = 32, ctd::defines::DATA_TYPE_UINT32 = 64, ctd::defines::DATA_TYPE_INT64 = 128,
  ctd::defines::DATA_TYPE_UINT64 = 256, ctd::defines::DATA_TYPE_FLOAT = 512, ctd::defines::DATA_TYPE_DOUBLE = 1024, ctd::defines::DATA_TYPE_STRING = 2048,
  ctd::defines::DATA_TYPE_NON_BASIC = 4096, ctd::defines::DATA_TYPE_TIME_DATE = 8192, ctd::defines::DATA_TYPE_TIMESTAMP = 16384, ctd::defines::DATA_TYPE_BLOB = 32768,
  ctd::defines::DATA_TYPE_ALL, ctd::defines::DATA_TYPE_UNKNOWN = 2147483648, ctd::defines::DATA_TYPE_BOOLEAN = 1, ctd::defines::DATA_TYPE_INT8 = 2,
  ctd::defines::DATA_TYPE_UINT8 = 4, ctd::defines::DATA_TYPE_INT16 = 8, ctd::defines::DATA_TYPE_UINT16 = 16, ctd::defines::DATA_TYPE_INT32 = 32,
  ctd::defines::DATA_TYPE_UINT32 = 64, ctd::defines::DATA_TYPE_INT64 = 128, ctd::defines::DATA_TYPE_UINT64 = 256, ctd::defines::DATA_TYPE_FLOAT = 512,
  ctd::defines::DATA_TYPE_DOUBLE = 1024, ctd::defines::DATA_TYPE_STRING = 2048, ctd::defines::DATA_TYPE_NON_BASIC = 4096, ctd::defines::DATA_TYPE_TIME_DATE = 8192,
  ctd::defines::DATA_TYPE_TIMESTAMP = 16384, ctd::defines::DATA_TYPE_BLOB = 32768, ctd::defines::DATA_TYPE_ALL, ctd::defines::DATA_TYPE_UNKNOWN = 2147483648,
  ctd::defines::DATA_TYPE_BOOLEAN = 1, ctd::defines::DATA_TYPE_INT8 = 2, ctd::defines::DATA_TYPE_UINT8 = 4, ctd::defines::DATA_TYPE_INT16 = 8,
  ctd::defines::DATA_TYPE_UINT16 = 16, ctd::defines::DATA_TYPE_INT32 = 32, ctd::defines::DATA_TYPE_UINT32 = 64, ctd::defines::DATA_TYPE_INT64 = 128,
  ctd::defines::DATA_TYPE_UINT64 = 256, ctd::defines::DATA_TYPE_FLOAT = 512, ctd::defines::DATA_TYPE_DOUBLE = 1024, ctd::defines::DATA_TYPE_STRING = 2048,
  ctd::defines::DATA_TYPE_NON_BASIC = 4096, ctd::defines::DATA_TYPE_TIME_DATE = 8192, ctd::defines::DATA_TYPE_TIMESTAMP = 16384, ctd::defines::DATA_TYPE_BLOB = 32768,
  ctd::defines::DATA_TYPE_ALL, ctd::defines::DATA_TYPE_UNKNOWN = 2147483648
}
 Data types numeric representations. More...
 

Functions

std::string ifw::Print (const char *format,...)
 Create formatted string, return formatted string (C formatting convention). More...
 
const std::map< DataType,
std::string > & 
ctd::defines::DataTypesNbMap ()
 Return reference to data types numeric to string map. More...
 
const std::map< std::string,
DataType > & 
ctd::defines::DataTypesNameMap ()
 Return reference to data types numeric to string map. More...
 
DataType ctd::defines::IfwDataTypeToNumeric (const std::string &data_type)
 Data type IFW string representation to IFW numeric representation. More...
 
std::string ctd::defines::IfwDataTypeToString (const DataType data_type)
 Data type IFW numeric representation to IFW string representation. More...
 
const std::map< DataType,
std::string > & 
ctd::defines::DataType2TypeIdMap ()
 Return reference to data types numeric to string map. More...
 
const std::map< std::string,
DataType > & 
ctd::defines::TypeId2DataTypeMap ()
 Return reference to data types numeric to string map. More...
 
template<class TYPE >
bool ctd::defines::SupportedType (const TYPE &variable)
 Check if the variable has a data type which is supported by the ELT ICS. More...
 
template<class TYPE >
void ctd::defines::CleanList (const List< TYPE > &list, const TYPE &pattern, List< TYPE > &clean_list)
 Remove elements from list, which are equal to "pattern". More...
 
template<class TYPE >
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. More...
 
template<class TYPE >
void ctd::defines::CheckRange (const std::string &par, const TYPE &value, List< TYPE > &valid_values)
 Check if a value is defined in a set. More...
 
template<class TYPE >
int32_t ctd::defines::ElInList (const List< TYPE > &list, const TYPE &value)
 Check for specific element in the list. More...
 
template<class TYPE >
std::string ctd::defines::DumpList (const List< TYPE > &list, const std::string &separator="\n")
 Dump contents of a list into a string buffer. More...
 
template<class MAP_TYPE >
bool ctd::defines::ElInMap (const std::string &key, const MAP_TYPE &map)
 Check if a given key is contained in an STL map. More...
 
void IFW_DEBUG (const char *format,...)
 Print out a temporary debug log. These kind of logs should be removed from the code. More...
 

Variables

const std::string ctd::defines::DATA_TYPE_BOOLEAN_STR = "Boolean"
 
const std::string ctd::defines::DATA_TYPE_INT8_STR = "Int8"
 
const std::string ctd::defines::DATA_TYPE_UINT8_STR = "UInt8"
 
const std::string ctd::defines::DATA_TYPE_INT16_STR = "Int16"
 
const std::string ctd::defines::DATA_TYPE_UINT16_STR = "UInt16"
 
const std::string ctd::defines::DATA_TYPE_INT32_STR = "Int32"
 
const std::string ctd::defines::DATA_TYPE_UINT32_STR = "UInt32"
 
const std::string ctd::defines::DATA_TYPE_INT64_STR = "Int64"
 
const std::string ctd::defines::DATA_TYPE_UINT64_STR = "UInt64"
 
const std::string ctd::defines::DATA_TYPE_FLOAT_STR = "Float"
 
const std::string ctd::defines::DATA_TYPE_DOUBLE_STR = "Double"
 
const std::string ctd::defines::DATA_TYPE_STRING_STR = "String"
 
const std::string ctd::defines::DATA_TYPE_NON_BASIC_STR = "NonBasic"
 
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_BLOB_STR = "Blob"
 
const std::string ctd::defines::DATA_TYPE_UNKNOWN_STR = "Unknown"
 
const std::string ctd::defines::EXT_FITS = "fits"
 
const std::string ctd::defines::EXT_YAML = "yaml"
 
const std::string ctd::defines::EXT_XML = "xml"
 
const std::string ctd::defines::EXT_CONFIG = "config"
 
const std::string ctd::defines::TRUE_STR = "True"
 
const std::string ctd::defines::FALSE_STR = "False"
 
const int64_t ctd::defines::NO_TIMEOUT = -1
 
const std::string ctd::defines::NO_TIMEOUT_STR = "NoTimeout"
 
const int64_t ctd::defines::ERROR = -1
 
const std::string ctd::defines::ERROR_STR = "Error"
 
const int64_t ctd::defines::ILLEGAL = -3
 
const std::string ctd::defines::ILLEGAL_STR = "Illegal"
 
const int64_t ctd::defines::INVALID = -4
 
const std::string ctd::defines::INVALID_STR = "__INVALID__"
 
const int64_t ctd::defines::NOT_IMPLEMENTED = -5
 
const std::string ctd::defines::NOT_IMPLEMENTED_STR = "NotImplemented"
 
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"
 
const int64_t ctd::defines::FAILURE = -8
 
const std::string ctd::defines::FAILURE_STR = "Failure"
 
const int64_t ctd::defines::SUCCESS = 0
 
const std::string ctd::defines::SUCCESS_STR = "Success"
 
const std::string ctd::defines::INDEFINITE_STR = "Indefinite"
 
const std::string ctd::defines::ALL_STR = "All"
 
const std::string ctd::defines::NONE_STR = "None"
 
const std::string ctd::defines::COMPLETED_STR = "Completed"
 
const std::string ctd::defines::PROCESSING_STR = "Processing"
 
const std::string ctd::defines::BUSY_STR = "Busy"
 
const std::string ctd::defines::ACTIVE_STR = "Active"
 
const std::string ctd::defines::MOVING_STR = "Moving"
 
const std::string ctd::defines::WARMING_UP_STR = "WarmingUp"
 
const std::string ctd::defines::COOLING_DOWN_STR = "CoolingDown"
 
const std::string ctd::defines::INITIALIZING_STR = "Initializing"
 
const std::string ctd::defines::OFFSETTING_STR = "Offsetting"
 
const std::string ctd::defines::CALIBRATING_STR = "Calibrating"
 
const std::string ctd::defines::ADJUSTING_STR = "Adjusting"
 
const std::string ctd::defines::RECEIVING_STR = "Receiving"
 
const std::string ctd::defines::TRANSFERRING_STR = "Transferring"
 
const std::string ctd::defines::STORING_STR = "Storing"
 
const std::string ctd::defines::READING_STR = "Reading"
 
const std::string ctd::defines::LOADING_STR = "Loading"
 
const std::string ctd::defines::PARSING_STR = "Parsing"
 
const std::string ctd::defines::ACQUIRING_STR = "Acquiring"
 
const std::string ctd::defines::INSTALLING_STR = "Installing"
 
const std::string ctd::defines::ON_STR = "On"
 
const std::string ctd::defines::OFF_STR = "Off"
 
const std::string ctd::defines::OK_STR = "OK"
 
const std::string ctd::defines::NOT_OK_STR = "NOK"
 

Function Documentation

void IFW_DEBUG ( const char *  format,
  ... 
)

Print out a temporary debug log. These kind of logs should be removed from the code.