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