45 std::cerr << boost::format(
"Could not open gpsd server connection. Error : %s\n") % gps_errstr(errno);
50 (void) gps_stream(&gps_data, WATCH_ENABLE, NULL);
59 bool exitflag =
false;
75 while (gps_waiting(&gps_data, 100000)) {
78 stat = gps_read(&gps_data);
82 time_t utc_time = (time_t) gps_data.fix.time;
85 gmtime_r(&utc_time, &btime);
93 gps_data.fix.latitude,
94 gps_data.fix.longitude));
97 std::cerr << boost::format(
"gps_read returned %d size is %d\n")
98 % stat % (
sizeof(
struct gps_data_t));
The Thread baseclass for all SoDa thread objects.
T * get(unsigned int subscriber_id)
void execGetCommand(Command *cmd)
optional method to handle "GET" commands – commands that request a response
void execSetCommand(Command *cmd)
optional method to handle "SET" commands – commands that set internal state in the object...
std::string getGPSHostName() const
This class handles command line parameters and built-ins.
std::string getGPSPortName() const
CmdTarget target
the thing we're touching
Report UTC (time) from GPS receiver.
void run()
Each thread object must define its "run" loop.
GPSmon(Params *params, CmdMBox *cmd_stream)
On receipt of a STOP command, all threads should exit their run loop.
This is a list of all the commands that can "do something" to one or more components in the SoDa radi...
Report LAT and LON from GPS receiver.
void execRepCommand(Command *cmd)
optional method that reports status or the result of some action.
void execCommand(Command *cmd)
Execute (dispatch) a message removed from the command stream to one of the basic Command handler func...