Search in sources :

Example 1 with AccessConnectionImpl

use of org.osate.aadl2.impl.AccessConnectionImpl in project VERDICT by ge-high-assurance.

the class Aadl2Vdm method getConnectionKind.

/**
 * Returns the VDM ConnectionKind
 * @param kind
 * @return
 */
verdict.vdm.vdm_model.ConnectionKind getConnectionKind(Connection aConn) {
    String kindString = "port";
    if (aConn.getClass().getSimpleName().equalsIgnoreCase("AccessConnectionImpl")) {
        AccessConnectionImpl accessConnImpl = (AccessConnectionImpl) aConn;
        if (accessConnImpl.getAccessCategory().getName().equalsIgnoreCase("data")) {
            kindString = "dataAccess";
        } else if (accessConnImpl.getAccessCategory().getName().equalsIgnoreCase("bus")) {
            kindString = "busAccess";
        }
    } else if (aConn.getClass().getSimpleName().equalsIgnoreCase("PortConnectionImpl")) {
        kindString = "port";
    } else if (aConn.getClass().getSimpleName().equalsIgnoreCase("ParameterConnectionImpl")) {
        kindString = "parameter";
    }
    verdict.vdm.vdm_model.ConnectionKind returnKind = verdict.vdm.vdm_model.ConnectionKind.fromValue(kindString);
    return returnKind;
}
Also used : AccessConnectionImpl(org.osate.aadl2.impl.AccessConnectionImpl)

Aggregations

AccessConnectionImpl (org.osate.aadl2.impl.AccessConnectionImpl)1