Subversion Repositories HomeAutomation

Rev

Rev 1310 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1310 Rev 1311
Line 26... Line 26...
26
#include "xml/Node.h"
26
#include "xml/Node.h"
27
#include "utils/Thread.h"
27
#include "utils/Thread.h"
28
#include "utils/BitBuffer.h"
28
#include "utils/BitBuffer.h"
29
#include "utils/UdpServer.h"
29
#include "utils/UdpServer.h"
30
#include "xml/Node.h"
30
#include "xml/Node.h"
31
#include "db/Database.h"
31
#include "protocol/Protocol.h"
32
 
32
 
33
namespace po = boost::program_options;
33
namespace po = boost::program_options;
34
 
34
 
35
#define foreach         BOOST_FOREACH
35
#define foreach         BOOST_FOREACH
36
#define reverse_foreach BOOST_REVERSE_FOREACH
36
#define reverse_foreach BOOST_REVERSE_FOREACH
Line 46... Line 46...
46
 
46
 
47
    LOG.info("Atom (" + string(AutoVersion::FULLVERSION_STRING) + " " + string(AutoVersion::STATUS) + ")");
47
    LOG.info("Atom (" + string(AutoVersion::FULLVERSION_STRING) + " " + string(AutoVersion::STATUS) + ")");
48
    LOG.info("Written by Mattias Runge 2009");
48
    LOG.info("Written by Mattias Runge 2009");
49
 
49
 
50
 
50
 
51
    db::Database::pointer db = db::Database::getInstance();
51
    Protocol::pointer protocol = Protocol::getInstance();
52
    db->load("../../Configuration/protocol.xml");
52
    protocol->load("../../Configuration/protocol.xml");
53
 
-
 
54
 
-
 
55
    xml::Node xmlNode("../../Configuration/protocol.xml");
-
 
56
    cout << xmlNode.toString() << endl;
53
    cout << protocol->getRootNode().toString() << endl;
57
 
-
 
58
    cout << "::" << xmlNode.selectFirst("datatypes").selectFirst("datatype", xml::Node::attributePair("name", "moduleId"))["lenght"] << endl;
-
 
59
 
54
 
60
 
55
 
61
    broker::Broker::pointer broker = broker::Broker::getInstance();
56
    broker::Broker::pointer broker = broker::Broker::getInstance();
62
 
57
 
63
    utils::UdpServer::pointer udpServer = utils::UdpServer::getInstance(1100);
58
    utils::UdpServer::pointer udpServer = utils::UdpServer::getInstance(1100);