SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SoDa::GPSmon Class Reference

#include <GPSmon.hxx>

Inheritance diagram for SoDa::GPSmon:
SoDa::SoDaThread SoDa::SoDaBase SoDa::Debug

Public Member Functions

 GPSmon (Params *params, CmdMBox *cmd_stream)
 
void run ()
 Each thread object must define its "run" loop. More...
 
- Public Member Functions inherited from SoDa::SoDaThread
 SoDaThread (const std::string &oname)
 
void start ()
 Execute the threads run loop. More...
 
void join ()
 more properly "Wait for this thread to exit its run loop". More...
 
bool waitForJoin (unsigned int m)
 wait for the thread to stop running, or the specified time to pass. More...
 
void execCommand (Command *cmd)
 Execute (dispatch) a message removed from the command stream to one of the basic Command handler functions. More...
 
- Public Member Functions inherited from SoDa::SoDaBase
 SoDaBase (const std::string &oname)
 The constructor – pass a name for the object. More...
 
std::string & getObjName ()
 get the name of this object More...
 
SoDaBasefindSoDaObject (const std::string &oname)
 find a SoDa Object by name. More...
 
double getTime ()
 Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS). More...
 
- Public Member Functions inherited from SoDa::Debug
 Debug (std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (const char *_unit_name_cstr)
 
 Debug (unsigned int _debug_level, std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (unsigned int _debug_level, const char *_unit_name_cstr)
 
void debugMsg (const std::string &msg, unsigned int threshold=1)
 
void debugMsg (const boost::format &fmt, unsigned int threshold=1)
 
void debugMsg (const char *msg, unsigned int threshold=1)
 
void setDebugLevel (unsigned int v)
 
unsigned int getDebugLevel ()
 

Private Member Functions

void execGetCommand (Command *cmd)
 optional method to handle "GET" commands – commands that request a response More...
 
void execSetCommand (Command *cmd)
 optional method to handle "SET" commands – commands that set internal state in the object. More...
 
void execRepCommand (Command *cmd)
 optional method that reports status or the result of some action. More...
 

Private Attributes

CmdMBoxcmd_stream
 
unsigned int cmd_subs
 
bool gps_server_ready
 

Additional Inherited Members

- Static Public Member Functions inherited from SoDa::Debug
static void setDefaultLevel (unsigned int v)
 
static unsigned int getDefaultLevel ()
 
static void setGlobalLevel (unsigned int v)
 
static unsigned int getGlobalLevel ()
 
- Static Public Attributes inherited from SoDa::Debug
static boost::mutex debug_msg_mutex
 
- Protected Member Functions inherited from SoDa::Debug
std::string curDateTime ()
 
- Protected Attributes inherited from SoDa::Debug
std::string unit_name
 the name of the unit reporting status More...
 
unsigned int debug_level
 the debug level (threshold) for messages More...
 
- Static Protected Attributes inherited from SoDa::Debug
static unsigned int default_debug_level = 0
 
static unsigned int global_debug_level = 0
 

Detailed Description

Definition at line 45 of file GPSmon.hxx.

Constructor & Destructor Documentation

◆ GPSmon()

SoDa::GPSmon::GPSmon ( Params params,
CmdMBox cmd_stream 
)

Member Function Documentation

◆ execGetCommand()

void SoDa::GPSmon::execGetCommand ( Command cmd)
privatevirtual

optional method to handle "GET" commands – commands that request a response

Reimplemented from SoDa::SoDaThread.

Definition at line 109 of file GPSmon.cxx.

◆ execRepCommand()

void SoDa::GPSmon::execRepCommand ( Command cmd)
privatevirtual

optional method that reports status or the result of some action.

Reimplemented from SoDa::SoDaThread.

Definition at line 121 of file GPSmon.cxx.

◆ execSetCommand()

void SoDa::GPSmon::execSetCommand ( Command cmd)
privatevirtual

optional method to handle "SET" commands – commands that set internal state in the object.

Reimplemented from SoDa::SoDaThread.

Definition at line 115 of file GPSmon.cxx.

◆ run()

void SoDa::GPSmon::run ( )
virtual

Each thread object must define its "run" loop.

This loop exits only when the thread has received a STOP command on one of its command mailboxes.

Implements SoDa::SoDaThread.

Definition at line 57 of file GPSmon.cxx.

References cmd_stream, cmd_subs, SoDa::SoDaThread::execCommand(), SoDa::MultiMBox< T >::free(), SoDa::MultiMBox< T >::get(), SoDa::Command::GPS_LATLON, gps_server_ready, SoDa::Command::GPS_UTC, SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::STOP, and SoDa::Command::target.

Member Data Documentation

◆ cmd_stream

CmdMBox* SoDa::GPSmon::cmd_stream
private

Definition at line 54 of file GPSmon.hxx.

Referenced by GPSmon(), and run().

◆ cmd_subs

unsigned int SoDa::GPSmon::cmd_subs
private

Definition at line 55 of file GPSmon.hxx.

Referenced by GPSmon(), and run().

◆ gps_server_ready

bool SoDa::GPSmon::gps_server_ready
private

Definition at line 60 of file GPSmon.hxx.

Referenced by GPSmon(), and run().


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