use of org.osate.aadl2.instance.SystemInstance in project osate2 by osate.
the class Schedule method analyzeInstanceModel.
@Override
protected void analyzeInstanceModel(final IProgressMonitor monitor, final AnalysisErrorReporterManager errManager, final SystemInstance root, final SystemOperationMode som) {
monitor.beginTask(getActionName(), IProgressMonitor.UNKNOWN);
logInfo("Processor Utilization/Scheduling Results");
try {
ForAllElement processProcessor = new ForAllElement(errManager) {
@Override
public void process(Element obj) {
ComponentInstance processor = (ComponentInstance) obj;
String protocol = GetProperties.getSchedulingProtocol(processor);
if (protocol == null || protocol.equalsIgnoreCase("EDF")) {
doUtilization(processor);
} else {
timingSchedulabilityAnalysis(processor);
}
}
};
processProcessor.processPreOrderComponentInstance(root, ComponentCategory.PROCESSOR);
} catch (InvalidModelException e) {
error(e.getElement(), e.getMessage());
}
// now report thread bindings
logInfo("\nThread binding report");
ForAllElement processThread = new ForAllElement(errManager) {
@Override
public void process(Element obj) {
reportProcessorBinding((ComponentInstance) obj);
return;
}
};
processThread.processPreOrderComponentInstance(root, ComponentCategory.THREAD);
monitor.done();
}
use of org.osate.aadl2.instance.SystemInstance in project osate2 by osate.
the class NotBoundResourceAnalysisHandler method doAaxlAction.
@Override
public void doAaxlAction(IProgressMonitor monitor, Element obj) {
// Get the system instance (if any)
final SystemInstance si = (obj instanceof InstanceObject) ? ((InstanceObject) obj).getSystemInstance() : null;
if (si != null) {
monitor.beginTask(getActionName(), IProgressMonitor.UNKNOWN);
NotBoundResourceAnalysis logic = null;
logic = new NotBoundResourceAnalysis(this);
final SOMIterator soms = new SOMIterator(si);
while (soms.hasNext()) {
logic.analyzeResourceBudget(si, soms.next());
}
monitor.done();
}
}
use of org.osate.aadl2.instance.SystemInstance in project osate2 by osate.
the class BoundResourceAnalysis method checkProcessorLoads.
private void checkProcessorLoads(SystemInstance si, final SystemOperationMode som) {
count = 0;
ForAllElement countme = new ForAllElement() {
@Override
protected void process(Element obj) {
count = count + 1;
}
};
countme.processPreOrderComponentInstance(si, ComponentCategory.PROCESSOR);
if (count > 0) {
errManager.infoSummaryReportOnly(si, null, "\nProcessor Summary Report: " + Aadl2Util.getPrintableSOMName(som));
} else {
errManager.infoSummaryReportOnly(si, null, "\nProcessor Summary Report: " + Aadl2Util.getPrintableSOMName(som) + "\n ** No processors");
}
ForAllElement mal = new ForAllElement() {
@Override
protected void process(Element obj) {
checkProcessorLoad((ComponentInstance) obj, som);
}
};
mal.processPreOrderComponentInstance(si, ComponentCategory.PROCESSOR);
}
use of org.osate.aadl2.instance.SystemInstance in project osate2 by osate.
the class PriorityInversion method checkSystemPriorityInversion.
public void checkSystemPriorityInversion(SystemInstance si) {
ForAllElement mal = new ForAllElement() {
@Override
protected void process(Element obj) {
checkPriorityInversion((ComponentInstance) obj);
}
};
mal.processPreOrderComponentInstance(si, ComponentCategory.PROCESSOR);
}
use of org.osate.aadl2.instance.SystemInstance in project osate2 by osate.
the class CheckA429PortConnectionConsistency method doAaxlAction.
@Override
public void doAaxlAction(final IProgressMonitor monitor, final Element obj) {
if (!(obj instanceof ComponentInstance)) {
Dialog.showWarning(getActionName(), "Please invoke command on an instance model");
monitor.done();
return;
}
// Get the system instance (if any)
SystemInstance si = ((ComponentInstance) obj).getSystemInstance();
monitor.beginTask(getActionName(), IProgressMonitor.UNKNOWN);
ARINC429ConnectionConsistency pcc = new ARINC429ConnectionConsistency(monitor, this);
pcc.doHeaders();
pcc.processPreOrderAll(si);
if (pcc.cancelled()) {
throw new OperationCanceledException();
}
monitor.done();
}
Aggregations