$search
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 | |
msg_class | |
port |
Definition at line 42 of file message_collection.py.
def mongo_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 44 of file message_collection.py.
def mongo_ros::message_collection::MessageCollection::count | ( | self | ) |
Definition at line 178 of file message_collection.py.
def mongo_ros::message_collection::MessageCollection::ensure_index | ( | self, | ||
ind | ||||
) |
Definition at line 88 of file message_collection.py.
def mongo_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 134 of file message_collection.py.
def mongo_ros::message_collection::MessageCollection::insert | ( | self, | ||
m, | ||||
metadata = {} | ||||
) |
@param m: Message to insert @param metadata: Dictionary of metadata to associate with message
Definition at line 96 of file message_collection.py.
def mongo_ros::message_collection::MessageCollection::process_entry | ( | self, | ||
r | ||||
) |
Definition at line 150 of file message_collection.py.
def mongo_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 116 of file message_collection.py.
def mongo_ros::message_collection::MessageCollection::remove | ( | self, | ||
query | ||||
) |
Definition at line 141 of file message_collection.py.
def mongo_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 156 of file message_collection.py.
Definition at line 73 of file message_collection.py.
Definition at line 64 of file message_collection.py.
Definition at line 72 of file message_collection.py.
Definition at line 74 of file message_collection.py.
Definition at line 60 of file message_collection.py.
Definition at line 75 of file message_collection.py.
Definition at line 61 of file message_collection.py.