Goby3  3.1.4
2024.02.22
goby::moos::GobyMOOSAppSelector< MOOSAppType > Class Template Referenceabstract

#include <goby/moos/goby_moos_app.h>

Inheritance diagram for goby::moos::GobyMOOSAppSelector< MOOSAppType >:
goby::moos::MOOSAppShell CMOOSApp

Protected Types

typedef boost::function< void(const CMOOSMsg &msg)> InboxFunc
 

Protected Member Functions

template<typename ProtobufConfig >
 GobyMOOSAppSelector (ProtobufConfig *cfg)
 
 ~GobyMOOSAppSelector () override=default
 
template<typename ProtobufMessage >
void publish_pb (const std::string &key, const ProtobufMessage &msg)
 
void publish (CMOOSMsg &msg)
 
void publish (const std::string &key, const std::string &value)
 
void publish (const std::string &key, double value)
 
goby::moos::DynamicMOOSVarsdynamic_vars ()
 
double start_time () const
 
void subscribe (const std::string &var, const InboxFunc &handler=InboxFunc(), double blackout=0)
 
template<typename V , typename A1 >
void subscribe (const std::string &var, void(V::*mem_func)(A1), V *obj, double blackout=0)
 
void subscribe (const std::string &var_pattern, const std::string &app_pattern, const InboxFunc &handler=InboxFunc(), double blackout=0)
 
template<typename V , typename A1 >
void subscribe (const std::string &var_pattern, const std::string &app_pattern, void(V::*mem_func)(A1), V *obj, double blackout=0)
 
template<typename V , typename ProtobufMessage >
void subscribe_pb (const std::string &var, void(V::*mem_func)(const ProtobufMessage &), V *obj, double blackout=0)
 
template<typename ProtobufMessage >
void subscribe_pb (const std::string &var, boost::function< void(const ProtobufMessage &msg)> handler, double blackout=0)
 
void register_timer (int period_seconds, const boost::function< void()> &handler)
 
template<typename V >
void register_timer (int period_seconds, void(V::*mem_func)(), V *obj)
 
template<typename App >
friend int ::goby::moos::run (int argc, char *argv[])
 
virtual void loop ()=0
 
bool ignore_stale ()
 
void set_ignore_stale (bool b)
 
bool dynamic_moos_vars_enabled ()
 
void set_dynamic_moos_vars_enabled (bool b)
 
std::pair< std::string, goby::moos::protobuf::TranslatorEntry::ParserSerializerTechniqueparse_type_technique (const std::string &type_and_technique)
 
- Protected Member Functions inherited from goby::moos::MOOSAppShell
bool Iterate () override
 
bool OnStartUp () override
 
bool OnConnectToServer () override
 
bool OnNewMail (MOOSMSG_LIST &) override
 
void RegisterVariables ()
 
void PostReport ()
 

Detailed Description

template<class MOOSAppType = MOOSAppShell>
class goby::moos::GobyMOOSAppSelector< MOOSAppType >

Definition at line 124 of file goby_moos_app.h.

Member Typedef Documentation

◆ InboxFunc

template<class MOOSAppType = MOOSAppShell>
typedef boost::function<void(const CMOOSMsg& msg)> goby::moos::GobyMOOSAppSelector< MOOSAppType >::InboxFunc
protected

Definition at line 127 of file goby_moos_app.h.

Constructor & Destructor Documentation

◆ GobyMOOSAppSelector()

template<class MOOSAppType = MOOSAppShell>
template<typename ProtobufConfig >
goby::moos::GobyMOOSAppSelector< MOOSAppType >::GobyMOOSAppSelector ( ProtobufConfig *  cfg)
inlineexplicitprotected

Definition at line 130 of file goby_moos_app.h.

◆ ~GobyMOOSAppSelector()

template<class MOOSAppType = MOOSAppShell>
goby::moos::GobyMOOSAppSelector< MOOSAppType >::~GobyMOOSAppSelector ( )
overrideprotecteddefault

Member Function Documentation

◆ dynamic_moos_vars_enabled()

template<class MOOSAppType = MOOSAppShell>
bool goby::moos::GobyMOOSAppSelector< MOOSAppType >::dynamic_moos_vars_enabled ( )
inlineprotected

Definition at line 253 of file goby_moos_app.h.

◆ dynamic_vars()

template<class MOOSAppType = MOOSAppShell>
goby::moos::DynamicMOOSVars& goby::moos::GobyMOOSAppSelector< MOOSAppType >::dynamic_vars ( )
inlineprotected

Definition at line 185 of file goby_moos_app.h.

◆ ignore_stale()

template<class MOOSAppType = MOOSAppShell>
bool goby::moos::GobyMOOSAppSelector< MOOSAppType >::ignore_stale ( )
inlineprotected

Definition at line 250 of file goby_moos_app.h.

◆ int ::goby::moos::run()

template<class MOOSAppType = MOOSAppShell>
template<typename App >
goby::moos::GobyMOOSAppSelector< MOOSAppType >::int ::goby::moos::run ( int  argc,
char argv[] 
)
protected

◆ loop()

template<class MOOSAppType = MOOSAppShell>
virtual void goby::moos::GobyMOOSAppSelector< MOOSAppType >::loop ( )
protectedpure virtual

◆ parse_type_technique()

template<class MOOSAppType = MOOSAppShell>
std::pair<std::string, goby::moos::protobuf::TranslatorEntry::ParserSerializerTechnique> goby::moos::GobyMOOSAppSelector< MOOSAppType >::parse_type_technique ( const std::string &  type_and_technique)
inlineprotected

Definition at line 257 of file goby_moos_app.h.

◆ publish() [1/3]

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::publish ( CMOOSMsg msg)
inlineprotected

Definition at line 165 of file goby_moos_app.h.

◆ publish() [2/3]

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::publish ( const std::string &  key,
const std::string &  value 
)
inlineprotected

Definition at line 173 of file goby_moos_app.h.

◆ publish() [3/3]

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::publish ( const std::string &  key,
double  value 
)
inlineprotected

Definition at line 179 of file goby_moos_app.h.

◆ publish_pb()

template<class MOOSAppType = MOOSAppShell>
template<typename ProtobufMessage >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::publish_pb ( const std::string &  key,
const ProtobufMessage &  msg 
)
inlineprotected

Definition at line 155 of file goby_moos_app.h.

◆ register_timer() [1/2]

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::register_timer ( int  period_seconds,
const boost::function< void()> &  handler 
)
inlineprotected

Definition at line 228 of file goby_moos_app.h.

◆ register_timer() [2/2]

template<class MOOSAppType = MOOSAppShell>
template<typename V >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::register_timer ( int  period_seconds,
void(V::*)()  mem_func,
V *  obj 
)
inlineprotected

Definition at line 241 of file goby_moos_app.h.

◆ set_dynamic_moos_vars_enabled()

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::set_dynamic_moos_vars_enabled ( bool  b)
inlineprotected

Definition at line 254 of file goby_moos_app.h.

◆ set_ignore_stale()

template<class MOOSAppType = MOOSAppShell>
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::set_ignore_stale ( bool  b)
inlineprotected

Definition at line 251 of file goby_moos_app.h.

◆ start_time()

template<class MOOSAppType = MOOSAppShell>
double goby::moos::GobyMOOSAppSelector< MOOSAppType >::start_time ( ) const
inlineprotected

Definition at line 186 of file goby_moos_app.h.

◆ subscribe() [1/4]

template<class MOOSAppType >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe ( const std::string &  var,
const InboxFunc handler = InboxFunc(),
double  blackout = 0 
)
protected

Definition at line 530 of file goby_moos_app.h.

◆ subscribe() [2/4]

template<class MOOSAppType = MOOSAppShell>
template<typename V , typename A1 >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe ( const std::string &  var,
void(V::*)(A1)  mem_func,
V *  obj,
double  blackout = 0 
)
inlineprotected

Definition at line 192 of file goby_moos_app.h.

◆ subscribe() [3/4]

template<class MOOSAppType >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe ( const std::string &  var_pattern,
const std::string &  app_pattern,
const InboxFunc handler = InboxFunc(),
double  blackout = 0 
)
protected

Definition at line 548 of file goby_moos_app.h.

◆ subscribe() [4/4]

template<class MOOSAppType = MOOSAppShell>
template<typename V , typename A1 >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe ( const std::string &  var_pattern,
const std::string &  app_pattern,
void(V::*)(A1)  mem_func,
V *  obj,
double  blackout = 0 
)
inlineprotected

Definition at line 202 of file goby_moos_app.h.

◆ subscribe_pb() [1/2]

template<class MOOSAppType = MOOSAppShell>
template<typename ProtobufMessage >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe_pb ( const std::string &  var,
boost::function< void(const ProtobufMessage &msg)>  handler,
double  blackout = 0 
)
inlineprotected

Definition at line 218 of file goby_moos_app.h.

◆ subscribe_pb() [2/2]

template<class MOOSAppType = MOOSAppShell>
template<typename V , typename ProtobufMessage >
void goby::moos::GobyMOOSAppSelector< MOOSAppType >::subscribe_pb ( const std::string &  var,
void(V::*)(const ProtobufMessage &)  mem_func,
V *  obj,
double  blackout = 0 
)
inlineprotected

Definition at line 210 of file goby_moos_app.h.


The documentation for this class was generated from the following file: