objdictgen/nodemanager.py
changeset 333 7e553315ef46
parent 327 b904d9a99e28
child 338 9ba9f4f7d080
equal deleted inserted replaced
332:97a7a0538dd1 333:7e553315ef46
  1043                             dic["value"] = node.GetTypeName(dic["value"])
  1043                             dic["value"] = node.GetTypeName(dic["value"])
  1044                     elif 0x1600 <= index <= 0x17FF or 0x1A00 <= index <= 0x1C00:
  1044                     elif 0x1600 <= index <= 0x17FF or 0x1A00 <= index <= 0x1C00:
  1045                         editor["value"] = "map"
  1045                         editor["value"] = "map"
  1046                         dic["value"] = node.GetMapName(dic["value"])
  1046                         dic["value"] = node.GetMapName(dic["value"])
  1047                     else:
  1047                     else:
  1048                         if dic["type"].startswith("VISIBLE_STRING"):
  1048                         if dic["type"].startswith("VISIBLE_STRING") or dic["type"].startswith("OCTET_STRING"):
  1049                             editor["value"] = "string"
  1049                             editor["value"] = "string"
  1050                         elif dic["type"] in ["TIME_OF_DAY","TIME_DIFFERENCE"]:
  1050                         elif dic["type"] in ["TIME_OF_DAY","TIME_DIFFERENCE"]:
  1051                             editor["value"] = "time"
  1051                             editor["value"] = "time"
  1052                         elif dic["type"] == "DOMAIN":
  1052                         elif dic["type"] == "DOMAIN":
  1053                             if index == 0x1F22:
  1053                             if index == 0x1F22:
  1070                                 editor["value"] = "string"
  1070                                 editor["value"] = "string"
  1071                             if values[0] == "INTEGER":
  1071                             if values[0] == "INTEGER":
  1072                                 editor["value"] = "number"
  1072                                 editor["value"] = "number"
  1073                             elif values[0] == "REAL":
  1073                             elif values[0] == "REAL":
  1074                                 editor["value"] = "float"
  1074                                 editor["value"] = "float"
  1075                             elif values[0] == "VISIBLE_STRING":
  1075                             elif values[0] in ["VISIBLE_STRING", "OCTET_STRING"]:
  1076                                 editor["length"] = values[0]
  1076                                 editor["length"] = values[0]
  1077                         result = range_model.match(dic["type"])
  1077                         result = range_model.match(dic["type"])
  1078                         if result:
  1078                         if result:
  1079                             values = result.groups()
  1079                             values = result.groups()
  1080                             if values[0] in ["UNSIGNED", "INTEGER", "REAL"]:
  1080                             if values[0] in ["UNSIGNED", "INTEGER", "REAL"]: