Functions | Variables
generate_message_processors Namespace Reference

Functions

def find_fields (msg_srv_class, field_name_pattern=None, field_type_pattern=None)
 
def format_indent (indent_level)
 
def generate_cpp_iteration (field, default_accessor, processor)
 
def get_accessor (indent_level)
 
def is_msg_array (field_type)
 
def is_primitive_msg (field_type)
 

Variables

 args = parser.parse_args()
 
 cpp_out
 
string FIELD_NAME_FILTER = 'field_name_filter'
 
list field_processors = [generate_cpp_iteration(field, 'msg->', processor_name) for field in fields]
 
string FIELD_TYPE_FILTER = 'field_type_filter'
 
 fields
 
 h_out
 
 header_template = Template(f.read(), searchList=[template_namespace])
 
 help
 
string MESSAGES = 'msgs'
 
 metavar
 
 msg_base = msg_name.partition('/')[2]
 
 msg_class = get_message_class(msg_name)
 
 nargs
 
 parser = argparse.ArgumentParser(description='Generate message processor headers and sources.')
 
 pp = pprint.PrettyPrinter(indent=1)
 
dictionary processors
 
list SERVICE_COMPONENTS
 
 ServiceComponent = namedtuple("ServiceComponent", "name accessor member_class")
 
string SERVICES = 'srvs'
 
 source_template = Template(f.read(), searchList=[template_namespace])
 
 srv_base = srv_name.partition('/')[2]
 
 srv_class = get_service_class(srv_name)
 
dictionary template_namespace = {}
 

Function Documentation

def generate_message_processors.find_fields (   msg_srv_class,
  field_name_pattern = None,
  field_type_pattern = None 
)

Definition at line 81 of file generate_message_processors.py.

def generate_message_processors.format_indent (   indent_level)

Definition at line 67 of file generate_message_processors.py.

def generate_message_processors.generate_cpp_iteration (   field,
  default_accessor,
  processor 
)

Definition at line 36 of file generate_message_processors.py.

def generate_message_processors.get_accessor (   indent_level)

Definition at line 72 of file generate_message_processors.py.

def generate_message_processors.is_msg_array (   field_type)

Definition at line 116 of file generate_message_processors.py.

def generate_message_processors.is_primitive_msg (   field_type)

Definition at line 112 of file generate_message_processors.py.

Variable Documentation

generate_message_processors.args = parser.parse_args()

Definition at line 130 of file generate_message_processors.py.

generate_message_processors.cpp_out

Definition at line 132 of file generate_message_processors.py.

string generate_message_processors.FIELD_NAME_FILTER = 'field_name_filter'

Definition at line 137 of file generate_message_processors.py.

list generate_message_processors.field_processors = [generate_cpp_iteration(field, 'msg->', processor_name) for field in fields]

Definition at line 171 of file generate_message_processors.py.

string generate_message_processors.FIELD_TYPE_FILTER = 'field_type_filter'

Definition at line 138 of file generate_message_processors.py.

generate_message_processors.fields
Initial value:
1 = find_fields(msg_srv_class=msg_class, field_name_pattern=processor[FIELD_NAME_FILTER],
2  field_type_pattern=processor[FIELD_TYPE_FILTER])
def find_fields(msg_srv_class, field_name_pattern=None, field_type_pattern=None)

Definition at line 169 of file generate_message_processors.py.

generate_message_processors.h_out

Definition at line 134 of file generate_message_processors.py.

generate_message_processors.header_template = Template(f.read(), searchList=[template_namespace])

Definition at line 201 of file generate_message_processors.py.

generate_message_processors.help

Definition at line 122 of file generate_message_processors.py.

string generate_message_processors.MESSAGES = 'msgs'

Definition at line 139 of file generate_message_processors.py.

generate_message_processors.metavar

Definition at line 122 of file generate_message_processors.py.

generate_message_processors.msg_base = msg_name.partition('/')[2]

Definition at line 167 of file generate_message_processors.py.

generate_message_processors.msg_class = get_message_class(msg_name)

Definition at line 168 of file generate_message_processors.py.

generate_message_processors.nargs

Definition at line 123 of file generate_message_processors.py.

generate_message_processors.parser = argparse.ArgumentParser(description='Generate message processor headers and sources.')

Definition at line 121 of file generate_message_processors.py.

generate_message_processors.pp = pprint.PrettyPrinter(indent=1)

Definition at line 32 of file generate_message_processors.py.

dictionary generate_message_processors.processors
Initial value:
1 = {
2  'frame_id_processor': {
3  FIELD_NAME_FILTER: '.*frame_id.*',
4  FIELD_TYPE_FILTER: 'string',
5  },
6  'time_processor': {
7  FIELD_NAME_FILTER: None,
8  FIELD_TYPE_FILTER: 'time',
9  },
10  }

Definition at line 153 of file generate_message_processors.py.

list generate_message_processors.SERVICE_COMPONENTS
Initial value:
1 = [ServiceComponent(name="req", accessor="req.", member_class="_request_class"),
2  ServiceComponent(name="res", accessor="res.", member_class="_response_class")]

Definition at line 143 of file generate_message_processors.py.

generate_message_processors.ServiceComponent = namedtuple("ServiceComponent", "name accessor member_class")

Definition at line 142 of file generate_message_processors.py.

string generate_message_processors.SERVICES = 'srvs'

Definition at line 140 of file generate_message_processors.py.

generate_message_processors.source_template = Template(f.read(), searchList=[template_namespace])

Definition at line 199 of file generate_message_processors.py.

generate_message_processors.srv_base = srv_name.partition('/')[2]

Definition at line 177 of file generate_message_processors.py.

generate_message_processors.srv_class = get_service_class(srv_name)

Definition at line 178 of file generate_message_processors.py.

dictionary generate_message_processors.template_namespace = {}

Definition at line 190 of file generate_message_processors.py.



message_relay
Author(s):
autogenerated on Wed Jul 17 2019 03:27:53