missing documentation added.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
/** available file endings / types. */
|
||||
enum FileType {
|
||||
ft_csv
|
||||
ft_csv // CSV
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief class for CSV config files.
|
||||
* @brief derived class for CSV config files.
|
||||
*/
|
||||
class ConfigFileCSV : public ConfigFile
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief class for class device.
|
||||
* @brief class to parse configuration files and store into commands instance.
|
||||
*/
|
||||
class ConfigCommands
|
||||
{
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
/**
|
||||
* @brief set file type and add recursive files from given path.
|
||||
* @param path to configuration files.
|
||||
* @param filetype to parse.
|
||||
* @param type to parse.
|
||||
*/
|
||||
ConfigCommands(const std::string path, const FileType type);
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief setter for file type.
|
||||
* @param filetype of files.
|
||||
* @param type of files.
|
||||
*/
|
||||
void setType(const FileType type);
|
||||
|
||||
|
||||
+3
-3
@@ -27,8 +27,8 @@
|
||||
|
||||
/** available device types. */
|
||||
enum DeviceType {
|
||||
dt_serial,
|
||||
dt_network,
|
||||
dt_serial, // serial device
|
||||
dt_network // network device
|
||||
};
|
||||
|
||||
/** max bytes write to bus. */
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief recvBytes read bytes from opened file descriptor.
|
||||
* @param timeoutmax time for new input data [usec].
|
||||
* @param timeout time for new input data [usec].
|
||||
* @param maxCount max size of receive buffer.
|
||||
* @return number of read bytes or -1 if an error has occured.
|
||||
*/
|
||||
|
||||
+46
-11
@@ -27,43 +27,78 @@
|
||||
|
||||
/** the available data types. */
|
||||
enum DataType {
|
||||
dt_none, // default value
|
||||
dt_bool, //
|
||||
dt_int, //
|
||||
dt_long, //
|
||||
dt_float, //
|
||||
dt_string, //
|
||||
dt_none, // default for __text_only__
|
||||
dt_bool, // boolean
|
||||
dt_int, // integer
|
||||
dt_long, // long
|
||||
dt_float, // float
|
||||
dt_string // string
|
||||
};
|
||||
|
||||
/** option types. */
|
||||
enum OptionType {
|
||||
ot_none, // default value
|
||||
ot_optional, // a value is optional
|
||||
ot_mandatory, // a value is mandatory
|
||||
ot_none, // no option type is needed
|
||||
ot_optional, // a value is optional
|
||||
ot_mandatory // a value is mandatory
|
||||
};
|
||||
|
||||
/** structure for defining application options */
|
||||
typedef struct opt {
|
||||
typedef struct {
|
||||
/** long option name */
|
||||
const char* name;
|
||||
/** short option name */
|
||||
const char* shortname;
|
||||
/** description for this option */
|
||||
const char* description;
|
||||
/** data type for this option */
|
||||
DataType datatype;
|
||||
/** indicates whether an option takes an argument */
|
||||
OptionType optiontype;
|
||||
} opt_t;
|
||||
|
||||
/** union for option values */
|
||||
/**
|
||||
* @brief union for option values
|
||||
*/
|
||||
union OptVal {
|
||||
/** boolean */
|
||||
bool b;
|
||||
/** integer */
|
||||
int i;
|
||||
/** long */
|
||||
long l;
|
||||
/** float */
|
||||
float f;
|
||||
/** string */
|
||||
const char* c;
|
||||
|
||||
/**
|
||||
* @brief clear memory
|
||||
*/
|
||||
OptVal() { memset(this, 0, sizeof(OptVal)); }
|
||||
/**
|
||||
* @brief create boolean type
|
||||
* @param _b the boolean
|
||||
*/
|
||||
OptVal(bool _b) : b(_b) {}
|
||||
/**
|
||||
* @brief create integer type
|
||||
* @param _i the integer
|
||||
*/
|
||||
OptVal(int _i) : i(_i) {}
|
||||
/**
|
||||
* @brief create long type
|
||||
* @param _l the long
|
||||
*/
|
||||
OptVal(long _l) : l(_l) {}
|
||||
/**
|
||||
* @brief create float type
|
||||
* @param _f the float
|
||||
*/
|
||||
OptVal(float _f) : f(_f) {}
|
||||
/**
|
||||
* @brief create string type
|
||||
* @param _c the string
|
||||
*/
|
||||
OptVal(const char* _c) : c(_c) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -35,16 +35,16 @@ enum AreasType {
|
||||
bus=4, // ebus
|
||||
cyc=8, // cycle
|
||||
all=15, // type for all subsystems
|
||||
Size_of_Areas=4, // number of possible areas
|
||||
Size_of_Areas=4 // number of possible areas
|
||||
};
|
||||
|
||||
/** available logging levels */
|
||||
enum LevelType {
|
||||
error=0, //
|
||||
event, //
|
||||
trace, //
|
||||
debug, //
|
||||
Size_of_Level, // number of possible levels
|
||||
error=0, // silent run, only errors will be printed
|
||||
event, // only interesting message for normal use
|
||||
trace, // most of the information for normal use
|
||||
debug, // print internal states too
|
||||
Size_of_Level // number of possible levels
|
||||
};
|
||||
|
||||
/** global function to get calculate logging areas */
|
||||
@@ -260,14 +260,14 @@ public:
|
||||
|
||||
/**
|
||||
* @brief adds a logging sink and returns the reference to logger.
|
||||
* @param pointer of logging sink.
|
||||
* @param sink the used logging sink.
|
||||
* @return the reference to logger.
|
||||
*/
|
||||
Logger& operator+=(LogSink* sink);
|
||||
|
||||
/**
|
||||
* @brief removes a logging sink and returns the reference to logger.
|
||||
* @param pointer of logging sink.
|
||||
* @param sink the used logging sink.
|
||||
* @return the reference to logger.
|
||||
*/
|
||||
Logger& operator-=(const LogSink* sink);
|
||||
|
||||
Reference in New Issue
Block a user