Main Page
Namespaces
Classes
Files
File List
File Members
src
test_dbloader.cpp
Go to the documentation of this file.
1
#include <
warehouse_ros/database_loader.h
>
2
#include <
ros/ros.h
>
3
4
int
main
(
int
argc,
char
** argv)
5
{
6
ros::init
(argc, argv,
"db_loader_test"
,
ros::init_options::AnonymousName
);
7
8
warehouse_ros::DatabaseLoader
dbloader;
9
warehouse_ros::DatabaseConnection::Ptr
conn = dbloader.
loadDatabase
();
10
// conn->setParams("localhost", 27017, 10.0);
11
conn->setTimeout(10.0);
12
if
(!conn->connect())
13
ROS_ERROR
(
"Failed to connect to DB"
);
14
15
ros::shutdown
();
16
}
warehouse_ros::DatabaseLoader
This class provides the mechanism to connect to a database and reads needed ROS parameters when appro...
Definition:
database_loader.h:80
warehouse_ros::DatabaseLoader::loadDatabase
DatabaseConnection::Ptr loadDatabase()
Load a database connection using pluginlib Looks for ROS params specifying which plugin/host/port to ...
Definition:
database_loader.cpp:66
ros::init_options::AnonymousName
AnonymousName
ros::init
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
main
int main(int argc, char **argv)
Definition:
test_dbloader.cpp:4
boost::shared_ptr
database_loader.h
ros.h
ros::shutdown
ROSCPP_DECL void shutdown()
ROS_ERROR
#define ROS_ERROR(...)
warehouse_ros
Author(s): Bhaskara Marthi
, Connor Brew
autogenerated on Fri Jun 7 2019 21:44:23