Classes | Functions | Variables
rosbag::bag Namespace Reference

Classes

class  _BagReader
class  _BagReader102_Indexed
class  _BagReader102_Unindexed
class  _BagReader200
class  _BZ2CompressorFileFacade
class  _ChunkHeader
class  _ChunkInfo
class  _ConnectionInfo
class  _IndexEntry
class  _IndexEntry102
class  _IndexEntry200
class  Bag
class  Compression
class  ROSBagException
class  ROSBagFormatException
class  ROSBagUnindexedException

Functions

def _get_message_type
def _human_readable_frequency
def _human_readable_size
def _median
def _mergesort
 See http://code.activestate.com/recipes/511509.
def _pack_time
def _pack_uint32
def _pack_uint64
def _pack_uint8
def _peek_next_header_op
def _read
def _read_field
def _read_header
def _read_record_data
def _read_sized
def _read_str_field
def _read_time
def _read_time_field
def _read_uint32
def _read_uint32_field
def _read_uint64
def _read_uint64_field
def _read_uint8
def _read_uint8_field
def _skip_record
def _skip_sized
def _time_to_str
def _unpack_time
def _unpack_uint32
def _unpack_uint64
def _unpack_uint8
def _write_header
def _write_record
def _write_sized

Variables

int _CHUNK_INDEX_VERSION = 1
int _FILE_HEADER_LENGTH = 4096
int _INDEX_VERSION = 1
dictionary _message_types = {}
int _OP_CHUNK = 0x05
int _OP_CHUNK_INFO = 0x06
dictionary _OP_CODES
int _OP_CONNECTION = 0x07
int _OP_FILE_HEADER = 0x03
int _OP_INDEX_DATA = 0x04
int _OP_MSG_DATA = 0x02
int _OP_MSG_DEF = 0x01
string _VERSION = '#ROSBAG V2.0'

Function Documentation

def rosbag.bag._get_message_type (   info) [private]

Definition at line 1305 of file bag.py.

def rosbag.bag._human_readable_frequency (   freq) [private]

Definition at line 2229 of file bag.py.

def rosbag.bag._human_readable_size (   size) [private]

Definition at line 2220 of file bag.py.

def rosbag.bag._median (   values) [private]

Definition at line 2323 of file bag.py.

def rosbag.bag._mergesort (   list_of_lists,
  key = None 
) [private]

See http://code.activestate.com/recipes/511509.

Perform an N-way merge operation on sorted lists.

@param list_of_lists: (really iterable of iterable) of sorted elements
(either by naturally or by C{key})
@param key: specify sort key function (like C{sort()}, C{sorted()})
@param iterfun: function that returns an iterator.

Yields tuples of the form C{(item, iterator)}, where the iterator is the
built-in list iterator or something you pass in, if you pre-generate the
iterators.

This is a stable merge; complexity O(N lg N)

Examples::

print list(x[0] for x in mergesort([[1,2,3,4],
                                    [2,3.5,3.7,4.5,6,7],
                                    [2.6,3.6,6.6,9]]))
[1, 2, 2, 2.6, 3, 3.5, 3.6, 3.7, 4, 4.5, 6, 6.6, 7, 9]

# note stability
print list(x[0] for x in mergesort([[1,2,3,4],
                                    [2,3.5,3.7,4.5,6,7],
                                    [2.6,3.6,6.6,9]], key=int))
[1, 2, 2, 2.6, 3, 3.5, 3.6, 3.7, 4, 4.5, 6, 6.6, 7, 9]

print list(x[0] for x in mergesort([[4,3,2,1],
                                    [7,6.5,4,3.7,3.3,1.9],
                                    [9,8.6,7.6,6.6,5.5,4.4,3.3]],
                                    key=lambda x: -x))
[9, 8.6, 7.6, 7, 6.6, 6.5, 5.5, 4.4, 4, 4, 3.7, 3.3, 3.3, 3, 2, 1.9, 1]

Definition at line 2239 of file bag.py.

def rosbag.bag._pack_time (   v) [private]

Definition at line 1335 of file bag.py.

def rosbag.bag._pack_uint32 (   v) [private]

Definition at line 1333 of file bag.py.

def rosbag.bag._pack_uint64 (   v) [private]

Definition at line 1334 of file bag.py.

def rosbag.bag._pack_uint8 (   v) [private]

Definition at line 1332 of file bag.py.

def rosbag.bag._peek_next_header_op (   f) [private]

Definition at line 1433 of file bag.py.

def rosbag.bag._read (   f,
  size 
) [private]

Definition at line 1337 of file bag.py.

def rosbag.bag._read_field (   header,
  field,
  unpack_fn 
) [private]

Definition at line 1362 of file bag.py.

def rosbag.bag._read_header (   f,
  req_op = None 
) [private]

Definition at line 1396 of file bag.py.

def rosbag.bag._read_record_data (   f) [private]

Definition at line 1440 of file bag.py.

def rosbag.bag._read_sized (   f) [private]

Definition at line 1351 of file bag.py.

def rosbag.bag._read_str_field (   header,
  field 
) [private]

Definition at line 1373 of file bag.py.

def rosbag.bag._read_time (   f) [private]

Definition at line 1325 of file bag.py.

def rosbag.bag._read_time_field (   header,
  field 
) [private]

Definition at line 1377 of file bag.py.

def rosbag.bag._read_uint32 (   f) [private]

Definition at line 1323 of file bag.py.

def rosbag.bag._read_uint32_field (   header,
  field 
) [private]

Definition at line 1375 of file bag.py.

def rosbag.bag._read_uint64 (   f) [private]

Definition at line 1324 of file bag.py.

def rosbag.bag._read_uint64_field (   header,
  field 
) [private]

Definition at line 1376 of file bag.py.

def rosbag.bag._read_uint8 (   f) [private]

Definition at line 1322 of file bag.py.

def rosbag.bag._read_uint8_field (   header,
  field 
) [private]

Definition at line 1374 of file bag.py.

def rosbag.bag._skip_record (   f) [private]

Definition at line 1343 of file bag.py.

def rosbag.bag._skip_sized (   f) [private]

Definition at line 1347 of file bag.py.

def rosbag.bag._time_to_str (   secs) [private]

Definition at line 2214 of file bag.py.

def rosbag.bag._unpack_time (   v) [private]

Definition at line 1330 of file bag.py.

def rosbag.bag._unpack_uint32 (   v) [private]

Definition at line 1328 of file bag.py.

def rosbag.bag._unpack_uint64 (   v) [private]

Definition at line 1329 of file bag.py.

def rosbag.bag._unpack_uint8 (   v) [private]

Definition at line 1327 of file bag.py.

def rosbag.bag._write_header (   f,
  header 
) [private]

Definition at line 1391 of file bag.py.

def rosbag.bag._write_record (   f,
  header,
  data = '',
  padded_size = None 
) [private]

Definition at line 1379 of file bag.py.

def rosbag.bag._write_sized (   f,
  v 
) [private]

Definition at line 1358 of file bag.py.


Variable Documentation

Definition at line 1224 of file bag.py.

Definition at line 1222 of file bag.py.

Definition at line 1223 of file bag.py.

dictionary rosbag::bag::_message_types = {}

Definition at line 1201 of file bag.py.

Definition at line 1207 of file bag.py.

Definition at line 1208 of file bag.py.

Initial value:
00001 {
00002     _OP_MSG_DEF:     'MSG_DEF',
00003     _OP_MSG_DATA:    'MSG_DATA',
00004     _OP_FILE_HEADER: 'FILE_HEADER',
00005     _OP_INDEX_DATA:  'INDEX_DATA',
00006     _OP_CHUNK:       'CHUNK',
00007     _OP_CHUNK_INFO:  'CHUNK_INFO',
00008     _OP_CONNECTION:  'CONNECTION'
00009 }

Definition at line 1211 of file bag.py.

Definition at line 1209 of file bag.py.

Definition at line 1205 of file bag.py.

Definition at line 1206 of file bag.py.

Definition at line 1204 of file bag.py.

Definition at line 1203 of file bag.py.

string rosbag::bag::_VERSION = '#ROSBAG V2.0'

Definition at line 1221 of file bag.py.



rosbag
Author(s): Tim Field, Jeremy Leibs, James Bowman
autogenerated on Fri Aug 28 2015 12:33:52