/home/laradmin/lar/hmi/remote_monitor/src/remote_monitor.cpp File Reference

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>
Include dependency graph for remote_monitor.cpp:

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

Detailed Description

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.

Author:
José Viana

Definition in file remote_monitor.cpp.


Typedef Documentation

typedef boost::shared_ptr<DatabaseStructure> DatabaseStructurePtr

Definition at line 378 of file remote_monitor.cpp.


Function Documentation

const string currentDateTime (  ) 

Function for current time.

This function gets the instant time from the pc

Returns:
time

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

Returns:
date

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

Parameters:
DatabaseStructPtr 
id 
Returns:
void

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

Returns:
date

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

Returns:
date

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

Parameters:
pointer with the message
Returns:

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

Returns:
void

Definition at line 414 of file remote_monitor.cpp.

void watchdog ( Database **  database  ) 

Definition at line 569 of file remote_monitor.cpp.


Variable Documentation

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.

 All Classes Files Functions Variables Typedefs


remote_monitor
Author(s): Jose Viana
autogenerated on Wed Jul 23 04:35:32 2014