Subversion Repositories HomeAutomation

Rev

Rev 1315 | Rev 1326 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1315 Rev 1323
Line 11... Line 11...
11
#include <string>
11
#include <string>
12
#include <vector>
12
#include <vector>
13
#include <map>
13
#include <map>
14
#include "log/Logger.h"
14
#include "log/Logger.h"
15
#include "message/Variable.h"
15
#include "message/Variable.h"
-
 
16
#include "message/Header.h"
16
#include "protocol/Protocol.h"
17
#include "protocol/Protocol.h"
17
#include "utils/convert.h"
18
#include "utils/convert.h"
18
 
19
 
19
using namespace std;
20
using namespace std;
20
 
21
 
Line 27... Line 28...
27
    typedef std::vector<std::string> responseList;
28
    typedef std::vector<std::string> responseList;
28
 
29
 
29
public:
30
public:
30
    typedef boost::shared_ptr<Message> pointer;
31
    typedef boost::shared_ptr<Message> pointer;
31
 
32
 
32
    Message(string moduletype, unsigned int moduleId, string type);
33
    Message(Header header);
33
    Message();
34
    Message();
34
    virtual ~Message();
35
    virtual ~Message();
35
 
36
 
36
    void setOrigin(const void *origin);
37
    void setOrigin(const void *origin);
37
    bool isOrigin(const void *origin);
38
    bool isOrigin(const void *origin);
38
 
39
 
39
    bool isFromModule();
-
 
40
    string getModuletype();
-
 
41
    unsigned int getModuleId();
-
 
42
    string getType();
40
    Header & getHeader();
43
    Variable & getVariable(string name);
41
    Variable & getVariable(string name);
44
    responseList getResponses();
42
    responseList getResponses();
45
 
43
 
46
    void readBits(BitBuffer & buffer);
44
    void readBits(BitBuffer & buffer);
-
 
45
    void writeBits(BitBuffer & buffeer);
47
 
46
 
48
private:
47
private:
49
    log::Logger LOG;
48
    log::Logger LOG;
50
 
49
 
51
    const void *myOrigin;
50
    const void *myOrigin;
52
 
51
 
53
    bool myFromModule;
-
 
54
    string myModuletype;
-
 
55
    unsigned int myModuleId;
-
 
56
    string myType;
52
    Header myHeader;
57
    variableMap myVariables;
53
    variableMap myVariables;
58
    responseList myResponses;
54
    responseList myResponses;
59
};
55
};
60
 
56
 
61
}
57
}