plugger.py
changeset 604 5b1c92060fc2
parent 601 d0e3fc4b9951
child 607 c68b662e0c2a
equal deleted inserted replaced
603:e1ef99c609eb 604:5b1c92060fc2
  1325                "VAR":"extern __IEC_%(type)s_t %(C_path)s;"}[v["vartype"]]%v 
  1325                "VAR":"extern __IEC_%(type)s_t %(C_path)s;"}[v["vartype"]]%v 
  1326                for v in self._VariablesList if v["vartype"] != "FB" and v["C_path"].find('.')<0]),
  1326                for v in self._VariablesList if v["vartype"] != "FB" and v["C_path"].find('.')<0]),
  1327            "for_each_variable_do_code":"\n".join([
  1327            "for_each_variable_do_code":"\n".join([
  1328                {"EXT":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
  1328                {"EXT":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
  1329                 "IN":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
  1329                 "IN":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
  1330                 "MEM":"    (*fp)((void*)&%(C_path)s,%(type)s_P_ENUM);\n",
  1330                 "MEM":"    (*fp)((void*)&%(C_path)s,%(type)s_O_ENUM);\n",
  1331                 "OUT":"    (*fp)((void*)&%(C_path)s,%(type)s_O_ENUM);\n",
  1331                 "OUT":"    (*fp)((void*)&%(C_path)s,%(type)s_O_ENUM);\n",
  1332                 "VAR":"    (*fp)((void*)&%(C_path)s,%(type)s_ENUM);\n"}[v["vartype"]]%v
  1332                 "VAR":"    (*fp)((void*)&%(C_path)s,%(type)s_ENUM);\n"}[v["vartype"]]%v
  1333                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ]),
  1333                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ]),
  1334            "find_variable_case_code":"\n".join([
  1334            "find_variable_case_code":"\n".join([
  1335                "    case %(num)s:\n"%v+
  1335                "    case %(num)s:\n"%v+
  1336                "        *varp = (void*)&%(C_path)s;\n"%v+
  1336                "        *varp = (void*)&%(C_path)s;\n"%v+
  1337                {"EXT":"        return %(type)s_P_ENUM;\n",
  1337                {"EXT":"        return %(type)s_P_ENUM;\n",
  1338                 "IN":"        return %(type)s_P_ENUM;\n",
  1338                 "IN":"        return %(type)s_P_ENUM;\n",
  1339                 "MEM":"        return %(type)s_P_ENUM;\n",
  1339                 "MEM":"        return %(type)s_O_ENUM;\n",
  1340                 "OUT":"        return %(type)s_O_ENUM;\n",
  1340                 "OUT":"        return %(type)s_O_ENUM;\n",
  1341                 "VAR":"        return %(type)s_ENUM;\n"}[v["vartype"]]%v
  1341                 "VAR":"        return %(type)s_ENUM;\n"}[v["vartype"]]%v
  1342                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ])}
  1342                 for v in self._VariablesList if v["vartype"] != "FB" and v["type"] in DebugTypesSize ])}
  1343         
  1343         
  1344         return debug_code
  1344         return debug_code