22 #include "pGobyMOOSAppTemplate.h" 26 using goby::moos::operator<<;
28 boost::shared_ptr<GobyMOOSAppTemplateConfig> master_config;
29 GobyMOOSAppTemplate* GobyMOOSAppTemplate::inst_ = 0;
31 int main(
int argc,
char* argv[]) {
return goby::moos::run<GobyMOOSAppTemplate>(argc, argv); }
33 GobyMOOSAppTemplate* GobyMOOSAppTemplate::get_instance()
37 master_config.reset(
new GobyMOOSAppTemplateConfig);
38 inst_ =
new GobyMOOSAppTemplate(*master_config);
43 void GobyMOOSAppTemplate::delete_instance() {
delete inst_; }
45 GobyMOOSAppTemplate::GobyMOOSAppTemplate(GobyMOOSAppTemplateConfig& cfg)
50 subscribe(
"DB_TIME", &GobyMOOSAppTemplate::handle_db_time,
this);
53 GobyMOOSAppTemplate::~GobyMOOSAppTemplate() {}
55 void GobyMOOSAppTemplate::loop()
58 publish(
"TEST", MOOSTime());
61 void GobyMOOSAppTemplate::handle_db_time(
const CMOOSMsg& msg)
63 glog.is(VERBOSE) &&
glog <<
"Time is: " << std::setprecision(15) << msg.GetDouble()
common::FlexOstream glog
Access the Goby logger through this object.