Subversion Repositories HomeAutomation

Rev

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

Rev 1642 Rev 1644
Line 39... Line 39...
39
    this->name_ = "console";
39
    this->name_ = "console";
40
   
40
   
41
    net::Manager::Instance()->ConnectSlots(net::Manager::SignalOnNewState::slot_type(&Console::SlotOnNewState, this, _1, _2, _3).track(this->tracker_),
41
    net::Manager::Instance()->ConnectSlots(net::Manager::SignalOnNewState::slot_type(&Console::SlotOnNewState, this, _1, _2, _3).track(this->tracker_),
42
                                           net::Manager::SignalOnNewData::slot_type(&Console::SlotOnNewData, this, _1, _2, _3).track(this->tracker_));
42
                                           net::Manager::SignalOnNewData::slot_type(&Console::SlotOnNewData, this, _1, _2, _3).track(this->tracker_));
43
   
43
   
44
    this->ExportFunction("Console_RegisterConsoleCommand", Console::Export_RegisterConsoleCommand);
44
    this->ExportFunction("ConsoleExport_RegisterCommand", Console::Export_RegisterCommand);
45
   
45
   
46
    try
46
    try
47
    {
47
    {
48
        this->server_id_ = net::Manager::Instance()->StartServer(net::PROTOCOL_TCP, port);
48
        this->server_id_ = net::Manager::Instance()->StartServer(net::PROTOCOL_TCP, port);
49
        LOG.Info("Started TCP server on port " + boost::lexical_cast<std::string>(port) + ".");
49
        LOG.Info("Started TCP server on port " + boost::lexical_cast<std::string>(port) + ".");
Line 191... Line 191...
191
    LOG.Debug("ExecutionResult: response=" + response + ", request_id=" + boost::lexical_cast<std::string>(request_id));
191
    LOG.Debug("ExecutionResult: response=" + response + ", request_id=" + boost::lexical_cast<std::string>(request_id));
192
   
192
   
193
    net::Manager::Instance()->SendTo(request_id, response);
193
    net::Manager::Instance()->SendTo(request_id, response);
194
}
194
}
195
 
195
 
196
Value Console::Export_RegisterConsoleCommand(const v8::Arguments& args)
196
Value Console::Export_RegisterCommand(const v8::Arguments& args)
197
{
197
{
198
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
198
    v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext());
199
   
199
   
200
    LOG.Debug(std::string(__FUNCTION__) + " called!");
200
    LOG.Debug(std::string(__FUNCTION__) + " called!");
201
   
201