Public Member Functions | Protected Member Functions | Protected Attributes
moveit_warehouse::MoveItMessageStorage Class Reference

This class provides the mechanism to connect to a MongoDB and reads needed ROS parameters when appropriate. More...

#include <moveit_message_storage.h>

Inheritance diagram for moveit_warehouse::MoveItMessageStorage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const std::string & getDatabaseHost () const
unsigned int getDatabasePort () const
 MoveItMessageStorage (const std::string &host="", const unsigned int port=0, double wait_seconds=5.0)
 Initialize the storage to connect to a specified host and port for the MongoDB. If defaults are used for the parameters (empty host name, 0 port), the constructor looks for ROS params specifying which host/port to use. NodeHandle::searchParam() is used starting from ~ to look for warehouse_port and warehouse_host. If these params are not found either, a final attempt is made to look for the param values under /moveit_warehouse/warehouse_*. If no values are found, the defaults are left to be the ones MongoDB uses. If wait_seconds is above 0, then a maximum number of seconds can elapse until connection is successful, or a runtime exception is thrown.
virtual ~MoveItMessageStorage ()

Protected Member Functions

void drop (const std::string &db)
void filterNames (const std::string &regex, std::vector< std::string > &names) const
 Keep only the names that match regex.

Protected Attributes

std::string db_host_
unsigned int db_port_
double timeout_

Detailed Description

This class provides the mechanism to connect to a MongoDB and reads needed ROS parameters when appropriate.

Definition at line 48 of file moveit_message_storage.h.


Constructor & Destructor Documentation

moveit_warehouse::MoveItMessageStorage::MoveItMessageStorage ( const std::string &  host = "",
const unsigned int  port = 0,
double  wait_seconds = 5.0 
)

Initialize the storage to connect to a specified host and port for the MongoDB. If defaults are used for the parameters (empty host name, 0 port), the constructor looks for ROS params specifying which host/port to use. NodeHandle::searchParam() is used starting from ~ to look for warehouse_port and warehouse_host. If these params are not found either, a final attempt is made to look for the param values under /moveit_warehouse/warehouse_*. If no values are found, the defaults are left to be the ones MongoDB uses. If wait_seconds is above 0, then a maximum number of seconds can elapse until connection is successful, or a runtime exception is thrown.

Definition at line 41 of file moveit_message_storage.cpp.

Definition at line 72 of file moveit_message_storage.cpp.


Member Function Documentation

void moveit_warehouse::MoveItMessageStorage::drop ( const std::string &  db) [protected]

Definition at line 76 of file moveit_message_storage.cpp.

void moveit_warehouse::MoveItMessageStorage::filterNames ( const std::string &  regex,
std::vector< std::string > &  names 
) const [protected]

Keep only the names that match regex.

Definition at line 82 of file moveit_message_storage.cpp.

const std::string& moveit_warehouse::MoveItMessageStorage::getDatabaseHost ( ) const [inline]

Definition at line 61 of file moveit_message_storage.h.

Definition at line 66 of file moveit_message_storage.h.


Member Data Documentation

Definition at line 78 of file moveit_message_storage.h.

Definition at line 79 of file moveit_message_storage.h.

Definition at line 80 of file moveit_message_storage.h.


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


warehouse
Author(s): Ioan Sucan
autogenerated on Wed Aug 26 2015 12:43:45