fix doxygen and put everything besides main function in namespace ebusd

This commit is contained in:
john30
2017-02-25 16:12:09 +01:00
parent d365cb1f9c
commit ca164185dc
31 changed files with 212 additions and 99 deletions
+3 -3
View File
@@ -19,13 +19,13 @@
#ifndef LIB_EBUS_CONTRIB_CONTRIB_H_
#define LIB_EBUS_CONTRIB_CONTRIB_H_
/** @file contrib.h
namespace ebusd {
/** @file lib/ebus/contrib/contrib.h
* Contributed sources that may be excluded from regular builds.
* configure switch: --without-contrib
*/
namespace ebusd {
/**
* Registration function that is called once during initialization.
* @return true if registration was successful.
+4 -4
View File
@@ -30,12 +30,12 @@
#include "lib/ebus/result.h"
#include "lib/ebus/datatype.h"
/** @file tem.h
* Contributed data types for TEM devices not part of regular releases.
*/
namespace ebusd {
/** @file lib/ebus/contrib/tem.h
* Contributed data types for TEM devices not necessarily part of regular releases.
*/
/**
* A special variant of @a NumberDataType for TEM/Dungs ParamID in master/slave
* data.
+3 -3
View File
@@ -30,7 +30,9 @@
#include "lib/ebus/filereader.h"
#include "lib/ebus/datatype.h"
/** @file data.h
namespace ebusd {
/** @file lib/ebus/data.h
* Classes related to defining fields based on data types in symbols on the
* eBUS.
*
@@ -46,8 +48,6 @@
* class.
*/
namespace ebusd {
class DataFieldTemplates;
class SingleDataField;
+55 -24
View File
@@ -31,7 +31,9 @@
#include "lib/ebus/result.h"
#include "lib/ebus/filereader.h"
/** @file datatype.h
namespace ebusd {
/** @file lib/ebus/datatype.h
* Classes, functions, and constants related to decoding/encoding of symbols
* on the eBUS to/from readable values and registry of data types.
*
@@ -47,8 +49,6 @@
* an @a istringstream to a @a SymbolString (see @a DataType#writeSymbols()).
*/
namespace ebusd {
using std::map;
using std::list;
@@ -80,12 +80,20 @@ using std::list;
/** the type for data output format options. */
typedef int OutputFormat;
/* the bit flags for @a OutputFormat. */
static const unsigned int OF_NAMES = 0x01; //!< include names.
static const unsigned int OF_UNITS = 0x02; //!< include units.
static const unsigned int OF_COMMENTS = 0x04; //!< include comments.
static const unsigned int OF_NUMERIC = 0x08; //!< numeric format (keep numeric value of value=name pairs).
static const unsigned int OF_JSON = 0x10; //!< JSON format.
/** bit flag for @a OutputFormat: include names. */
#define OF_NAMES 0x01
/** bit flag for @a OutputFormat: include units. */
#define OF_UNITS 0x02
/** bit flag for @a OutputFormat: include comments. */
#define OF_COMMENTS 0x04
/** bit flag for @a OutputFormat: numeric format (keep numeric value of value=name pairs). */
#define OF_NUMERIC 0x08
/** bit flag for @a OutputFormat: JSON format. */
#define OF_JSON 0x10
/** the message part in which a data field is stored. */
enum PartType {
@@ -94,21 +102,44 @@ enum PartType {
pt_slaveData, //!< stored in slave data
};
/* flags for @a DataType. */
static const unsigned int ADJ = 0x01; //!< adjustable length, bitCount is maximum length
static const unsigned int BCD = 0x02; //!< binary representation is BCD
static const unsigned int REV = 0x04; //!< reverted binary representation (most significant byte first)
static const unsigned int SIG = 0x08; //!< signed value
static const unsigned int IGN = 0x10; //!< ignore value during read and write
static const unsigned int FIX = 0x20; //!< fixed width formatting
static const unsigned int REQ = 0x40; //!< value may not be NULL
/** binary representation is hex converted to decimal and interpreted as 2 digits (also requires #BCD). */
static const unsigned int HCD = 0x80;
static const unsigned int EXP = 0x100; //!< exponential numeric representation
static const unsigned int DAY = 0x200; //!< forced value list defaulting to week days
static const unsigned int NUM = 0x400; //!< numeric type with base class @a NumberDataType
static const unsigned int SPE = 0x800; //!< special marker for certain types
static const unsigned int CON = 0x1000; //!< marker for a constant value
/** bit flag for @a DataType: adjustable length, bitCount is maximum length. */
#define ADJ 0x01
/** bit flag for @a DataType: binary representation is BCD. */
#define BCD 0x02
/** bit flag for @a DataType: reverted binary representation (most significant byte first). */
#define REV 0x04
/** bit flag for @a DataType: signed value. */
#define SIG 0x08
/** bit flag for @a DataType: ignore value during read and write. */
#define IGN 0x10
/** bit flag for @a DataType: fixed width formatting. */
#define FIX 0x20
/** bit flag for @a DataType: value may not be NULL. */
#define REQ 0x40
/** bit flag for @a DataType: binary representation is hex converted to decimal and interpreted as 2 digits (also requires #BCD). */
#define HCD 0x80
/** bit flag for @a DataType: exponential numeric representation. */
#define EXP 0x100
/** bit flag for @a DataType: forced value list defaulting to week days. */
#define DAY 0x200
/** bit flag for @a DataType: numeric type with base class @a NumberDataType. */
#define NUM 0x400
/** bit flag for @a DataType: special marker for certain types. */
#define SPE 0x800
/** bit flag for @a DataType: marker for a constant value. */
#define CON 0x1000
/**
+3 -3
View File
@@ -27,7 +27,9 @@
#include <fstream>
#include "lib/ebus/result.h"
/** @file device.h
namespace ebusd {
/** @file lib/ebus/device.h
* Classes providing access to the eBUS.
*
* A @a Device is either a @a SerialDevice directly connected to a local tty
@@ -36,8 +38,6 @@
* to a file and/or forwarding it to a logging function.
*/
namespace ebusd {
/**
* Interface for listening to data received on/sent to a device.
*/
+3 -3
View File
@@ -29,7 +29,9 @@
#include "lib/ebus/symbol.h"
#include "lib/ebus/result.h"
/** @file filereader.h
namespace ebusd {
/** @file lib/ebus/filereader.h
* Helper class and constants for reading configuration files.
*
* The @a FileReader template class allows to read CSV compliant text files
@@ -39,8 +41,6 @@
* with a "*" symbol.
*/
namespace ebusd {
using std::string;
using std::ostream;
using std::ostringstream;
+3 -3
View File
@@ -30,7 +30,9 @@
#include "lib/ebus/result.h"
#include "lib/ebus/symbol.h"
/** @file message.h
namespace ebusd {
/** @file lib/ebus/message.h
* Classes and functions for decoding and encoding of complete messages on the
* eBUS to and from readable values.
*
@@ -57,8 +59,6 @@
* template class.
*/
namespace ebusd {
using std::binary_function;
using std::priority_queue;
using std::deque;
+4 -4
View File
@@ -19,16 +19,16 @@
#ifndef LIB_EBUS_RESULT_H_
#define LIB_EBUS_RESULT_H_
/** @file result.h
namespace ebusd {
/** @file lib/ebus/result.h
* Functions, and constants related to execution results.
*
* The #result_t codes defined here are used by many functions to emit the
* The @a result_t codes defined here are used by many functions to emit the
* result of the function call. Zero and positive values indicate success,
* whereas negative values indicate failure.
*/
namespace ebusd {
/** type for result code. */
enum result_t {
RESULT_OK = 0, //!< success
+12 -8
View File
@@ -27,7 +27,9 @@
#include <vector>
#include "lib/ebus/result.h"
/** @file symbol.h
namespace ebusd {
/** @file lib/ebus/symbol.h
* Classes, functions, and constants related to symbols on the eBUS.
*
* The @a SymbolString class is used for escaping or unescaping a sequence of
@@ -63,17 +65,19 @@
* non-acknowledge, the receiving slave has to repeat its data once.
*/
namespace ebusd {
using std::string;
using std::vector;
/** escape symbol, either followed by 0x00 for the value 0xA9, or 0x01 for the value 0xAA. */
static const unsigned char ESC = 0xA9;
static const unsigned char SYN = 0xAA; //!< synchronization symbol
static const unsigned char ACK = 0x00; //!< positive acknowledge
static const unsigned char NAK = 0xFF; //!< negative acknowledge
static const unsigned char BROADCAST = 0xFE; //!< the broadcast destination address
#define ESC 0xA9
/** synchronization symbol. */
#define SYN 0xAA
/** positive acknowledge symbol. */
#define ACK 0x00
/** negative acknowledge symbol. */
#define NAK 0xFF
/** the broadcast destination address. */
#define BROADCAST 0xFE
/**