canfestival/config_utils.py
changeset 1722 89824afffef2
parent 1581 2295fdc5c271
child 1730 64d8f52bc8c8
equal deleted inserted replaced
1721:42f64435d740 1722:89824afffef2
   376                         raise PDOmappingException, msg
   376                         raise PDOmappingException, msg
   377                     else:
   377                     else:
   378                         numbit = None
   378                         numbit = None
   379                     
   379                     
   380                     if location["IEC_TYPE"] != "BOOL" and subentry_infos["type"] != COlocationtype:
   380                     if location["IEC_TYPE"] != "BOOL" and subentry_infos["type"] != COlocationtype:
   381                         raise PDOmappingException, _("Invalid type \"{a1}\"-> {a2} != {a3}  for location\"{a4}\"").\
   381                         raise PDOmappingException, _("Invalid type \"{a1}\"-> {a2} != {a3}  for location \"{a4}\"").\
   382                             format(a1 = location["IEC_TYPE"], a2 = COlocationtype, a3 = subentry_infos["type"] , a4 = name)
   382                             format(a1 = location["IEC_TYPE"], a2 = COlocationtype, a3 = subentry_infos["type"] , a4 = name)
   383                     
   383                     
   384                     typeinfos = node.GetEntryInfos(COlocationtype)
   384                     typeinfos = node.GetEntryInfos(COlocationtype)
   385                     self.IECLocations[name] = {"type":COlocationtype, "pdotype":SlavePDOType[direction],
   385                     self.IECLocations[name] = {"type":COlocationtype, "pdotype":SlavePDOType[direction],
   386                                                 "nodeid": nodeid, "index": index,"subindex": subindex,
   386                                                 "nodeid": nodeid, "index": index,"subindex": subindex,