Search in sources :

Example 1 with VIRTUAL_PROCESSOR

use of org.osate.aadl2.ComponentCategory.VIRTUAL_PROCESSOR in project osate2 by osate.

the class AadlClassifierUtil method getComponentImplementationEClass.

public static EClass getComponentImplementationEClass(final ComponentCategory cc) {
    Objects.requireNonNull(cc, "cc must not be null");
    final Aadl2Package p = Aadl2Package.eINSTANCE;
    switch(cc) {
        case ABSTRACT:
            return p.getAbstractImplementation();
        case BUS:
            return p.getBusImplementation();
        case DATA:
            return p.getDataImplementation();
        case DEVICE:
            return p.getDeviceImplementation();
        case MEMORY:
            return p.getMemoryImplementation();
        case PROCESS:
            return p.getProcessImplementation();
        case PROCESSOR:
            return p.getProcessorImplementation();
        case SUBPROGRAM:
            return p.getSubprogramImplementation();
        case SUBPROGRAM_GROUP:
            return p.getSubprogramGroupImplementation();
        case SYSTEM:
            return p.getSystemImplementation();
        case THREAD:
            return p.getThreadImplementation();
        case THREAD_GROUP:
            return p.getThreadGroupImplementation();
        case VIRTUAL_BUS:
            return p.getVirtualBusImplementation();
        case VIRTUAL_PROCESSOR:
            return p.getVirtualProcessorImplementation();
        default:
            throw new RuntimeException("Unexpected category: " + cc);
    }
}
Also used : Aadl2Package(org.osate.aadl2.Aadl2Package)

Example 2 with VIRTUAL_PROCESSOR

use of org.osate.aadl2.ComponentCategory.VIRTUAL_PROCESSOR in project osate2 by osate.

the class AadlClassifierUtil method getComponentTypeEClass.

public static EClass getComponentTypeEClass(final ComponentCategory cc) {
    Objects.requireNonNull(cc, "cc must not be null");
    final Aadl2Package p = Aadl2Package.eINSTANCE;
    switch(cc) {
        case ABSTRACT:
            return p.getAbstractType();
        case BUS:
            return p.getBusType();
        case DATA:
            return p.getDataType();
        case DEVICE:
            return p.getDeviceType();
        case MEMORY:
            return p.getMemoryType();
        case PROCESS:
            return p.getProcessType();
        case PROCESSOR:
            return p.getProcessorType();
        case SUBPROGRAM:
            return p.getSubprogramType();
        case SUBPROGRAM_GROUP:
            return p.getSubprogramGroupType();
        case SYSTEM:
            return p.getSystemType();
        case THREAD:
            return p.getThreadType();
        case THREAD_GROUP:
            return p.getThreadGroupType();
        case VIRTUAL_BUS:
            return p.getVirtualBusType();
        case VIRTUAL_PROCESSOR:
            return p.getVirtualProcessorType();
        default:
            throw new RuntimeException("Unexpected category: " + cc);
    }
}
Also used : Aadl2Package(org.osate.aadl2.Aadl2Package)

Aggregations

Aadl2Package (org.osate.aadl2.Aadl2Package)2