modbus/modbus.py
changeset 2589 d94d4f396bbf
parent 2459 21164625b393
child 2647 990004083eb8
equal deleted inserted replaced
2587:c67488bd8134 2589:d94d4f396bbf
   120             entries.append({
   120             entries.append({
   121                 "name": dataname + " " + str(offset),
   121                 "name": dataname + " " + str(offset),
   122                 "type": LOCATION_VAR_MEMORY,
   122                 "type": LOCATION_VAR_MEMORY,
   123                 "size": datasize,
   123                 "size": datasize,
   124                 "IEC_type": datatype,
   124                 "IEC_type": datatype,
   125                 "var_name": "var_name",
   125                 "var_name": "MB_" + "".join([w[0] for w in dataname.split()]) + "_" + str(offset),
   126                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
   126                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
   127                 "description": "description",
   127                 "description": "description",
   128                 "children": []})
   128                 "children": []})
   129         return {"name": name,
   129         return {"name": name,
   130                 "type": LOCATION_CONFNODE,
   130                 "type": LOCATION_CONFNODE,
   225             entries.append({
   225             entries.append({
   226                 "name": dataname + " " + str(offset),
   226                 "name": dataname + " " + str(offset),
   227                 "type": LOCATION_VAR_MEMORY,
   227                 "type": LOCATION_VAR_MEMORY,
   228                 "size": datasize,
   228                 "size": datasize,
   229                 "IEC_type": datatype,
   229                 "IEC_type": datatype,
   230                 "var_name": "var_name",
   230                 "var_name": "MB_" + "".join([w[0] for w in dataname.split()]) + "_" + str(offset),
   231                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
   231                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
   232                 "description": "description",
   232                 "description": "description",
   233                 "children": []})
   233                 "children": []})
   234         return {"name": name,
   234         return {"name": name,
   235                 "type": LOCATION_CONFNODE,
   235                 "type": LOCATION_CONFNODE,