The node recive the masseges from manager and NavSatFix, pick the car that is needed and them send them to the remote DB. When the program is stopped a remote backup is created and after that the DataBase is cleared. More...
#include <iostream>
#include <ros/ros.h>
#include <string>
#include <vector>
#include <stdio.h>
#include <time.h>
#include <database_interface/db_class.h>
#include <boost/shared_ptr.hpp>
#include <database_interface/postgresql_database.h>
#include <libpq-fe.h>
#include <atlascar_base/ManagerStatus.h>
#include <sensor_msgs/NavSatFix.h>
#include <gps_common/GPSFix.h>
#include <boost/thread/thread.hpp>
Go to the source code of this file.
Classes | |
class | Database |
Function for database query execute. More... | |
class | DatabaseStructure |
Function for database structure criation. More... | |
class | Database::PGresultAutoPtr |
Typedefs | |
typedef boost::shared_ptr < DatabaseStructure > | DatabaseStructurePtr |
Functions | |
const string | currentDateTime () |
Function for current time. | |
const string | currentDateTimedate () |
Function for current date. | |
DatabaseStructurePtr | getDatabaseStructureById (vector< DatabaseStructurePtr > &atlas_status, int id) |
Function for geting a line from table with a specific id. | |
void | GpsFixCallback (const gps_common::GPSFixPtr &gps) |
int | main (int argc, char **argv) |
main function | |
void | ManagerStatusCallback (const atlascar_base::ManagerStatusPtr &msg) |
Function for current time. | |
void | NavSatFixCallback (const sensor_msgs::NavSatFixPtr &nav_sat) |
Function for GPS callback. | |
ostream & | operator<< (ostream &o, vector< DatabaseStructurePtr > &v) |
Function for print all the recieved data. | |
void | watchdog (Database **database) |
Variables | |
int | argc_g |
char ** | argv_g |
DatabaseStructure | atlas_insert |
The node recive the masseges from manager and NavSatFix, pick the car that is needed and them send them to the remote DB. When the program is stopped a remote backup is created and after that the DataBase is cleared.
Definition in file remote_monitor.cpp.
typedef boost::shared_ptr<DatabaseStructure> DatabaseStructurePtr |
Definition at line 378 of file remote_monitor.cpp.
const string currentDateTime | ( | ) |
Function for current time.
This function gets the instant time from the pc
Definition at line 467 of file remote_monitor.cpp.
const string currentDateTimedate | ( | ) |
Function for current date.
This function gets the instant date from the pc
Definition at line 484 of file remote_monitor.cpp.
DatabaseStructurePtr getDatabaseStructureById | ( | vector< DatabaseStructurePtr > & | atlas_status, | |
int | id | |||
) |
Function for geting a line from table with a specific id.
This fuction
DatabaseStructPtr | ||
id |
Definition at line 389 of file remote_monitor.cpp.
void GpsFixCallback | ( | const gps_common::GPSFixPtr & | gps | ) |
Definition at line 561 of file remote_monitor.cpp.
int main | ( | int | argc, | |
char ** | argv | |||
) |
main function
This function gets the instant time from the pc
Definition at line 593 of file remote_monitor.cpp.
void ManagerStatusCallback | ( | const atlascar_base::ManagerStatusPtr & | msg | ) |
Function for current time.
This function gets the instant time from the pc
Definition at line 501 of file remote_monitor.cpp.
void NavSatFixCallback | ( | const sensor_msgs::NavSatFixPtr & | nav_sat | ) |
Function for GPS callback.
when a new message is recieved from the gps, store them in the variables
pointer | with the message |
Definition at line 554 of file remote_monitor.cpp.
ostream& operator<< | ( | ostream & | o, | |
vector< DatabaseStructurePtr > & | v | |||
) |
Function for print all the recieved data.
Print's all the recived data
Definition at line 414 of file remote_monitor.cpp.
void watchdog | ( | Database ** | database | ) |
Definition at line 569 of file remote_monitor.cpp.
int argc_g |
Definition at line 61 of file remote_monitor.cpp.
char** argv_g |
Definition at line 62 of file remote_monitor.cpp.
Definition at line 459 of file remote_monitor.cpp.