use of EAnalysis.BinPacking.CompositeSoftNode in project osate2 by osate.
the class Binpack method getThreadBindings.
private Map getThreadBindings(final Set hardware) {
final Map threadsToProc = new HashMap();
for (Iterator iter = hardware.iterator(); iter.hasNext(); ) {
HardwareNode n = (HardwareNode) iter.next();
for (Iterator taskSet = n.getTaskSet().iterator(); taskSet.hasNext(); ) {
SoftwareNode m = (SoftwareNode) taskSet.next();
if (m instanceof CompositeSoftNode) {
final Set set = ((CompositeSoftNode) m).getBasicComponents();
for (Iterator software = set.iterator(); software.hasNext(); ) {
final SoftwareNode sn = (SoftwareNode) software.next();
threadsToProc.put(sn.getSemanticObject(), n.getSemanticObject());
}
} else {
if (!(m instanceof Message)) {
threadsToProc.put(m.getSemanticObject(), n.getSemanticObject());
}
}
}
}
return threadsToProc;
}
Aggregations