Public Member Functions | Public Attributes
warehouse_ros.message_collection.MessageCollection Class Reference

List of all members.

Public Member Functions

def __init__
def count
def ensure_index
def find_one
def insert
def process_entry
def query
def remove
def update

Public Attributes

 coll
 conn
 db
 fs
 host
 insertion_pub
 msg_class
 port

Detailed Description

Definition at line 45 of file message_collection.py.


Constructor & Destructor Documentation

def warehouse_ros.message_collection.MessageCollection.__init__ (   self,
  db,
  coll,
  msg_class,
  db_host = None,
  db_port = None,
  indexes = [] 
)
@param db: Name of database
@param coll: Name of collection
@param indexes: List of fields to build indexes on.
@param msg_class: The class of the message object being stored
@param db_host: The host where the db server is listening.
@param db_port: The port on which the db server is listening.

Creates collection, db, and indexes if don't already exist.
The database host and port are set to the provided values if given.
If not, the ROS parameters warehouse_host and warehouse_port are used,
and these in turn default to localhost and 27017.

Definition at line 47 of file message_collection.py.


Member Function Documentation

Definition at line 189 of file message_collection.py.

Definition at line 94 of file message_collection.py.

def warehouse_ros.message_collection.MessageCollection.find_one (   self,
  query,
  metadata_only = False,
  sort_by = '',
  ascending = True 
)
Like query except returns a single matching item, or None if
no item exists

Definition at line 145 of file message_collection.py.

def warehouse_ros.message_collection.MessageCollection.insert (   self,
  m,
  metadata = {},
  kwargs 
)
@param m: Message to insert
@param metadata: Dictionary of metadata to associate with message

Definition at line 103 of file message_collection.py.

Definition at line 161 of file message_collection.py.

def warehouse_ros.message_collection.MessageCollection.query (   self,
  query,
  metadata_only = False,
  sort_by = '',
  ascending = True 
)
Perform a query.

@return: Iterator over tuples (message, metadata) if metadata_only is
False, or iterator over metadata if it's true

Definition at line 127 of file message_collection.py.

Definition at line 152 of file message_collection.py.

def warehouse_ros.message_collection.MessageCollection.update (   self,
  entry,
  metadata = None,
  msg = None 
)
Update a message and/or metadata.

@param entry: The existing metadata entry
@param metadata: Updates to metadata.  These are merged with the existing dictionary entries.
@param msg: If specified, a new message object to store in place of the current one.

Definition at line 167 of file message_collection.py.


Member Data Documentation

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.

Definition at line 59 of file message_collection.py.


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


warehouse_ros
Author(s): Bhaskara Marthi
autogenerated on Thu Jun 6 2019 20:39:20