11 varDir = node.find(ns+
'direction').text
16 if varDir ==
'control_system_to_application' or varDir ==
'control_system_to_application_with_return' :
18 feeder =
'ControlSystem'
22 for peer
in node.find(ns+
'connections') :
23 peerType = peer.attrib[
'type']
24 peerDir = peer.attrib[
'direction']
25 if peerType ==
"ApplicationModule" or peerType ==
"Device" :
26 if peerType ==
"ApplicationModule" :
27 peerName = peer.attrib[
'class']
29 peerName =
'Device:'+peer.attrib[
'name']
30 if peerDir ==
'consuming' :
31 moduleList.add(peerName)
34 print(
"ERROR: Found two feeders!")
35 print(node.attrib[
'name'])
40 print(
"ERROR: No feeders found!")
41 print(node.attrib[
'name'])
46 if not m
in moduleConnections.keys():
47 moduleConnections[m] = set()
48 if not feeder
in moduleConnections.keys():
49 moduleConnections[feeder] = set()
52 moduleConnections[feeder].add(m)