Subversion Repositories HomeAutomation

Rev

Rev 1323 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1323 Rev 1326
Line 7... Line 7...
7
 
7
 
8
#ifndef HEADER_H_
8
#ifndef HEADER_H_
9
#define HEADER_H_
9
#define HEADER_H_
10
 
10
 
11
#include <map>
11
#include <map>
-
 
12
#include <boost/algorithm/string/trim.hpp>
12
#include "message/Variable.h"
13
#include "message/Variable.h"
13
#include "message/BitBuffer.h"
14
#include "message/BitBuffer.h"
14
#include "protocol/Protocol.h"
15
#include "protocol/Protocol.h"
15
#include "utils/convert.h"
16
#include "utils/convert.h"
-
 
17
#include "Exception.hpp"
-
 
18
#include "log/Logger.h"
16
 
19
 
17
namespace atom {
20
namespace atom {
18
namespace message {
21
namespace message {
19
 
22
 
20
using namespace std;
23
using namespace std;
-
 
24
using namespace boost::algorithm;
21
 
25
 
22
class Header
26
class Header
23
{
27
{
24
    typedef std::map<std::string, Variable> variableMap;
28
    typedef std::map<std::string, Variable> variableMap;
25
 
29
 
Line 33... Line 37...
33
    string getModuleType();
37
    string getModuleType();
34
    string getMessageType();
38
    string getMessageType();
35
 
39
 
36
    void readBits(BitBuffer & buffer);
40
    void readBits(BitBuffer & buffer);
37
    void writeBits(BitBuffer & buffer);
41
    void writeBits(BitBuffer & buffer);
-
 
42
 
-
 
43
    string toString();
38
 
44
 
39
private:
45
private:
-
 
46
    log::Logger LOG;
-
 
47
 
40
    variableMap myVariables;
48
    variableMap myVariables;
41
 
49
 
42
    void loadVariables();
50
    void loadVariables();
43
};
51
};
44
 
52