Public Member Functions | Public Attributes | Static Public Attributes
rosbag.migration.MessageUpdateRule Class Reference

Base class for all message update rules. More...

List of all members.

Public Member Functions

def __init__
 Initialize class.
def apply
 The function actually called by the message migrator.
def find_sub_paths
 Find all of the sub paths.
def get_class_def
 A helper function to print out the definiton of autogenerated messages.
def get_new_class
 Helper function to get the class of a submsg for the new type.
def get_old_class
 Helper function to get the class of a submsg for the old type.
def migrate
 Actually migrate one sub_type to another.
def migrate_array
 Helper function to migrate a whole array of messages.
def update
 The function which a user overrides to actually perform the message update.

Public Attributes

 location
 migrator
 new_class
 new_md5sum
 new_type
 new_types
 old_class
 old_md5sum
 old_type
 old_types
 rename_rule
 sub_rules
 sub_rules_done
 sub_rules_valid

Static Public Attributes

list migrated_types = []
string new_full_text = ''
string new_type = ''
string old_full_text = ''
string old_type = ''
int order = 1
 valid = False

Detailed Description

Base class for all message update rules.

Definition at line 247 of file migration.py.


Constructor & Destructor Documentation

def rosbag.migration.MessageUpdateRule.__init__ (   self,
  migrator,
  location 
)

Initialize class.

Definition at line 259 of file migration.py.


Member Function Documentation

def rosbag.migration.MessageUpdateRule.apply (   self,
  old_msg 
)

The function actually called by the message migrator.

Parameters:
old_msgAn instance of the old message type.
Returns:
An instance of a new message type

Definition at line 415 of file migration.py.

Find all of the sub paths.

For any migrated type the user might want to use, we must make sure the migrator had found a path for it. To facilitated this check we require that all migrated types must be listed as pairs in the migrated_types field.

It would be nice not to need these through performing some kind of other inspection of the update rule itself.

Definition at line 307 of file migration.py.

A helper function to print out the definiton of autogenerated messages.

Definition at line 408 of file migration.py.

Helper function to get the class of a submsg for the new type.

This function should be used inside of update to access new classes.

Parameters:
tThe subtype to return the class of
Returns:
The class of the new sub type

Definition at line 345 of file migration.py.

Helper function to get the class of a submsg for the old type.

This function should be used inside of update to access old classes.

Parameters:
tThe subtype to return the class of
Returns:
The class of the old sub type

Definition at line 360 of file migration.py.

def rosbag.migration.MessageUpdateRule.migrate (   self,
  msg_from,
  msg_to 
)

Actually migrate one sub_type to another.

This function should be used inside of update to migrate sub msgs.

Parameters:
msg_fromA message instance of the old message type
msg_toA message instance of a new message type to be populated

Definition at line 375 of file migration.py.

def rosbag.migration.MessageUpdateRule.migrate_array (   self,
  msg_from_array,
  msg_to_array,
  msg_to_name 
)

Helper function to migrate a whole array of messages.

This function should be used inside of update to migrate arrays of sub msgs.

Parameters:
msg_from_arrayAn array of messages of the old message type
msg_to_arrayAn array of messages of the new message type (this will be emptied if not already)
msg_to_classThe name of the new message type since msg_to_array may be an empty array.

Definition at line 389 of file migration.py.

def rosbag.migration.MessageUpdateRule.update (   self,
  old_msg,
  new_msg 
)

The function which a user overrides to actually perform the message update.

Parameters:
msg_fromA message instance of the old message type
msg_toA message instance of a new message type to be populated

Definition at line 435 of file migration.py.


Member Data Documentation

Definition at line 259 of file migration.py.

Definition at line 252 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 251 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 250 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 249 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 248 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 254 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 259 of file migration.py.

Definition at line 256 of file migration.py.


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


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