use own namespace

This commit is contained in:
john30
2017-01-14 16:41:54 +01:00
parent 7bd9446f13
commit 774e01e937
43 changed files with 196 additions and 48 deletions
+7 -2
View File
@@ -27,8 +27,6 @@
#include <vector>
#include "result.h"
using namespace std;
/** @file symbol.h
* Classes, functions, and constants related to symbols on the eBUS.
*
@@ -65,6 +63,11 @@ using namespace std;
* non-acknowledge, the receiving slave has to repeat its data once.
*/
namespace ebusd {
using std::string;
using std::vector;
static const unsigned char ESC = 0xA9; //!< escape symbol, either followed by 0x00 for the value 0xA9, or 0x01 for the value 0xAA
static const unsigned char SYN = 0xAA; //!< synchronization symbol
static const unsigned char ACK = 0x00; //!< positive acknowledge
@@ -257,4 +260,6 @@ unsigned char getMasterNumber(unsigned char addr);
*/
bool isValidAddress(unsigned char addr, bool allowBroadcast = true);
} // namespace ebusd
#endif // LIB_EBUS_SYMBOL_H_