warehouse::WarehouseClient Class Reference

Class that wraps the warehouse ROS API. More...

#include <warehouse_client.h>

List of all members.

Public Member Functions

std::string dbName () const
std::vector< std::string > listCollections () const
 Get list of collections currently in db.
template<class M >
Collection< M > setupCollection (const string &collection, const string &topic, const StringVec &indexed, const StringVec &additional_metadata)
template<class M >
Collection< M > setupCollection (const string &collection, const StringVec &indexed, const StringVec &additional_metadata)
template<class M >
Collection< M > setupCollection (const std::string &collection, const StringVec &indexed_fields=StringVec(), const StringVec &additional_metadata_fields=StringVec())
template<class M >
Collection< M > setupCollection (const std::string &collection, const std::string &topic, const StringVec &indexed_fields=StringVec(), const StringVec &additional_metadata_fields=StringVec())
 Connect to a collection in the warehouse. Create the collection if.
 WarehouseClient (const string &db)
 Empty constructor.

Private Attributes

const std::string db_
ros::ServiceClient list_collections_client_
boost::mutex mutex_
ros::NodeHandle nh_
ros::ServiceClient setup_client_

Detailed Description

Class that wraps the warehouse ROS API.

Threadsafe. Does it's own spinning and callback queue management, so external code doesn't need to add any additional spinner threads.

Definition at line 64 of file warehouse_client.h.


Constructor & Destructor Documentation

warehouse::WarehouseClient::WarehouseClient ( const string &  db  ) 

Empty constructor.

Parameters:
db The name of the database in the warehouse that this client will talk to

Definition at line 51 of file warehouse_client.cpp.


Member Function Documentation

string warehouse::WarehouseClient::dbName (  )  const
Return values:
Name of the db this client talks to

Definition at line 74 of file warehouse_client.cpp.

vector< string > warehouse::WarehouseClient::listCollections (  )  const

Get list of collections currently in db.

Definition at line 62 of file warehouse_client.cpp.

template<class M >
Collection<M> warehouse::WarehouseClient::setupCollection ( const string &  collection,
const string &  topic,
const StringVec indexed,
const StringVec additional_metadata 
) [inline]

Definition at line 65 of file warehouse_client_impl.h.

template<class M >
Collection<M> warehouse::WarehouseClient::setupCollection ( const string &  collection,
const StringVec indexed,
const StringVec additional_metadata 
) [inline]

Definition at line 55 of file warehouse_client_impl.h.

template<class M >
Collection<M> warehouse::WarehouseClient::setupCollection ( const std::string &  collection,
const StringVec indexed_fields = StringVec(),
const StringVec additional_metadata_fields = StringVec() 
) [inline]

it doesn't exist, otherwise, check that the type and indexed fields match.

Template Parameters:
M Type of message
Exceptions:
WarehouseClientException if the service call fails at the ROS level (e.g., the warehouse node doesn't exist)
SetupCollectionException if the service call returns with an error
template<class M >
Collection<M> warehouse::WarehouseClient::setupCollection ( const std::string &  collection,
const std::string &  topic,
const StringVec indexed_fields = StringVec(),
const StringVec additional_metadata_fields = StringVec() 
) [inline]

Connect to a collection in the warehouse. Create the collection if.

Connect to a collection in the warehouse. Create the collection if it doesn't exist, otherwise, check that the type and indexed fields match. This version uses an existing ROS topic as the source for new messages.

Template Parameters:
M Type of message
Parameters:
topic Topic on which collection will listen for new messages
Exceptions:
WarehouseClientException if the service call fails at the ROS level (e.g., the warehouse node doesn't exist)
SetupCollectionException if the service call returns with an error

Member Data Documentation

const std::string warehouse::WarehouseClient::db_ [private]

Definition at line 111 of file warehouse_client.h.

ros::ServiceClient warehouse::WarehouseClient::list_collections_client_ [mutable, private]

Definition at line 114 of file warehouse_client.h.

boost::mutex warehouse::WarehouseClient::mutex_ [mutable, private]

Definition at line 110 of file warehouse_client.h.

ros::NodeHandle warehouse::WarehouseClient::nh_ [private]

Definition at line 112 of file warehouse_client.h.

ros::ServiceClient warehouse::WarehouseClient::setup_client_ [private]

Definition at line 113 of file warehouse_client.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines


warehouse
Author(s): Nate Koenig, Bhaskara Marthi
autogenerated on Fri Jan 11 10:09:02 2013