Fix bug in support for Etherlab specific fieldbus interface function blocks
authorLaurent Bessard
Fri, 16 Nov 2012 00:23:35 +0100
changeset 2093 3fdf9d56d803
parent 2092 c9776ae8b5d0
child 2094 72b74099b873
Fix bug in support for Etherlab specific fieldbus interface function blocks
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",