Commit 7c75f39a authored by Alexander David Hellwig's avatar Alexander David Hellwig

Merge branch 'patch-5' into 'master'

someip

See merge request !16
parents 89a8a818 58b91a9f
Pipeline #157301 passed with stage
in 2 minutes and 42 seconds
......@@ -30,7 +30,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc</artifactId>
<version>0.1.10-SNAPSHOT</version>
<version>0.1.11-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -26,6 +26,7 @@ import de.monticore.lang.embeddedmontiarc.helper.SymbolPrinter;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.mqtt.MqttConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol;
import de.monticore.lang.monticar.stream._symboltable.NamedStreamSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
......@@ -297,4 +298,8 @@ public class EMAPortSymbol extends CommonSymbol implements EMAElementSymbol {
public boolean isMqttPort() {
return getMiddlewareSymbol().isPresent() && getMiddlewareSymbol().get().isKindOf(MqttConnectionSymbol.KIND);
}
public boolean isSomeIPPort() {
return getMiddlewareSymbol().isPresent() && getMiddlewareSymbol().get().isKindOf(SomeIPConnectionSymbol.KIND);
}
}
......@@ -28,6 +28,7 @@ import de.monticore.lang.embeddedmontiarc.helper.SymbolPrinter;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.mqtt.MqttConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol;
import de.monticore.lang.monticar.stream._symboltable.NamedStreamSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
......@@ -283,4 +284,8 @@ public class EMAPortInstanceSymbol extends EMAPortSymbol implements EMAElementIn
public boolean isMqttPort() {
return getMiddlewareSymbol().isPresent() && getMiddlewareSymbol().get().isKindOf(MqttConnectionSymbol.KIND);
}
public boolean isSomeIPPort() {
return getMiddlewareSymbol().isPresent() && getMiddlewareSymbol().get().isKindOf(SomeIPConnectionSymbol.KIND);
}
}
package de.monticore.lang.embeddedmontiarc.tagging.middleware.someip;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
import de.monticore.lang.tagging._symboltable.TagKind;
import java.util.Optional;
public class SomeIPConnectionSymbol extends MiddlewareSymbol {
public static final SomeIPConnectionKind KIND = SomeIPConnectionKind.INSTANCE;
public SomeIPConnectionSymbol() {
super(KIND, Optional.empty(), Optional.empty(), Optional.empty());
}
public SomeIPConnectionSymbol(int serviceID, int instanceID){
this(KIND, serviceID, instanceID);
}
public SomeIPConnectionSymbol(int serviceID, int instanceID, int eventgroupID) {
this(KIND, serviceID, instanceID, eventgroupID);
}
protected SomeIPConnectionSymbol(SomeIPConnectionKind kind, int serviceID, int instanceID, int eventgroupID) {
super(kind, Optional.ofNullable(serviceID), Optional.ofNullable(instanceID), Optional.ofNullable(eventgroupID));
}
protected SomeIPConnectionSymbol(SomeIPConnectionKind kind,int serviceID, int instanceID) {
super(kind, Optional.ofNullable(serviceID), Optional.ofNullable(instanceID), Optional.empty());
}
@Override
public String toString() {
return String.format("SomeIPConnection = %d, %d, %d",
getserviceID(), getinstanceID(), geteventgroupID());
}
public Optional<Integer> getserviceID() {
return getValue(0);
}
public Optional<Integer> getinstanceID() {
return getValue(1);
}
public Optional<Integer> geteventgroupID() {
return getValue(2);
}
public void setserviceID(int serviceID) {
this.values.set(0, Optional.ofNullable(serviceID));
}
public void setinstanceID(int instanceID) {
this.values.set(1, Optional.ofNullable(instanceID));
}
public void seteventgroupID(int eventgroupID) {
this.values.set(2, Optional.ofNullable(eventgroupID));
}
public static class SomeIPConnectionKind extends TagKind {
public static final SomeIPConnectionKind INSTANCE = new SomeIPConnectionKind();
protected SomeIPConnectionKind() {
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment