Skip to content

Commit

Permalink
Merge pull request #108 from kochigami/add-initializing-message
Browse files Browse the repository at this point in the history
* add naoqi_driver initialized message
* modify the message of service and subscriber registering process
  • Loading branch information
nlyubova authored May 3, 2018
2 parents 9869a3d + 06ff49c commit d12752d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions include/naoqi_driver/service/service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Service
{
std::cout << name() << " is resetting" << std::endl;
srvPtr_->reset( nh );
std::cout << name() << " reset" << std::endl;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/external_registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int main(int argc, char** argv)
bs->init();
}

std::cout << BOLDYELLOW << "naoqi_driver initialized" << RESETCOLOR << std::endl;
app.run();
bs->stopService();
app.session()->close();
Expand Down
8 changes: 3 additions & 5 deletions src/naoqi_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,9 @@ void Driver::registerService( service::Service srv )

void Driver::registerDefaultServices()
{
registerService( boost::make_shared<service::RobotConfigService>("robot config service", "/naoqi_driver/get_robot_config", sessionPtr_) );
registerService( boost::make_shared<service::SetLanguageService>("set language service", "/naoqi_driver/set_language", sessionPtr_) );
registerService( boost::make_shared<service::GetLanguageService>("get language service", "/naoqi_driver/get_language", sessionPtr_) );
registerService( boost::make_shared<service::RobotConfigService>("get_robot_config", "/naoqi_driver/get_robot_config", sessionPtr_) );
registerService( boost::make_shared<service::SetLanguageService>("set_language", "/naoqi_driver/set_language", sessionPtr_) );
registerService( boost::make_shared<service::GetLanguageService>("get_language", "/naoqi_driver/get_language", sessionPtr_) );
}

std::vector<std::string> Driver::getAvailableConverters()
Expand Down Expand Up @@ -964,13 +964,11 @@ void Driver::setMasterURINet( const std::string& uri, const std::string& network

for_each( subscriber::Subscriber& sub, subscribers_ )
{
std::cout << "resetting subscriber " << sub.name() << std::endl;
sub.reset( *nhPtr_ );
}

for_each( service::Service& srv, services_ )
{
std::cout << "resetting service " << srv.name() << std::endl;
srv.reset( *nhPtr_ );
}
}
Expand Down

0 comments on commit d12752d

Please sign in to comment.