156 def GetVariableLocationTree(self): |
156 def GetVariableLocationTree(self): |
157 current_location = self.GetCurrentLocation() |
157 current_location = self.GetCurrentLocation() |
158 locstr = "_".join(map(str, current_location)) |
158 locstr = "_".join(map(str, current_location)) |
159 name = self.BaseParams.getName() |
159 name = self.BaseParams.getName() |
160 entries = [] |
160 entries = [] |
161 for direction, data in self.modeldata.iteritems(): |
161 for direction, data in self.modeldata.items(): |
162 iec_direction_prefix = {"input": "__I", "output": "__Q"}[direction] |
162 iec_direction_prefix = {"input": "__I", "output": "__Q"}[direction] |
163 for row in data: |
163 for row in data: |
164 dname, ua_nsidx, ua_nodeid_type, _ua_node_id, ua_type, iec_number = row |
164 dname, ua_nsidx, ua_nodeid_type, _ua_node_id, ua_type, iec_number = row |
165 iec_type, C_type, iec_size_prefix, ua_type_enum, ua_type = UA_IEC_types[ua_type] |
165 iec_type, C_type, iec_size_prefix, ua_type_enum, ua_type = UA_IEC_types[ua_type] |
166 c_loc_name = iec_direction_prefix + iec_size_prefix + locstr + "_" + str(iec_number) |
166 c_loc_name = iec_direction_prefix + iec_size_prefix + locstr + "_" + str(iec_number) |