# HG changeset patch # User Laurent Bessard # Date 1353021815 -3600 # Node ID 3fdf9d56d803e591b2dfd7a132f5b176ec505142 # Parent c9776ae8b5d0b46820033979ad1eafcc08e3f544 Fix bug in support for Etherlab specific fieldbus interface function blocks diff -r c9776ae8b5d0 -r 3fdf9d56d803 etherlab/etherlab.py --- a/etherlab/etherlab.py Thu Nov 15 22:43:44 2012 +0100 +++ b/etherlab/etherlab.py Fri Nov 16 00:23:35 2012 +0100 @@ -213,7 +213,8 @@ BLOCK_OUTPUT_TEMPLATE = " __SET_VAR(data__->,%(output_name)s, __GET_VAR(%(blockname)s.%(output_name)s));" BLOCK_FUNCTION_TEMPLATE = """ -void __%(blocktype)s_%(location)s(MCL_%(ucase_blocktype)s *data__) { +extern void ETHERLAB%(ucase_blocktype)s_body__(ETHERLAB%(ucase_blocktype)s* data__); +void __%(blocktype)s_%(location)s(MC_%(ucase_blocktype)s *data__) { extern ETHERLAB%(ucase_blocktype)s %(blockname)s; %(extract_inputs)s ETHERLAB%(ucase_blocktype)s_body__(&%(blockname)s); @@ -221,7 +222,7 @@ } """ - BLOCK_FUNTION_DEFINITION_TEMPLATE = " __CIA402Node_%(location)s.axis->__mcl_func_%(blocktype)s = &(__%(blocktype)s_%(location)s);" + BLOCK_FUNTION_DEFINITION_TEMPLATE = " __CIA402Node_%(location)s.axis->__mcl_func_MC_%(blocktype)s = &(__%(blocktype)s_%(location)s);" GLOBAL_INSTANCES = [ {"blocktype": "GetTorqueLimit",