Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.etrice.tutorials.java/src-gen/HelloWorld/SubSystem_HelloWorld.java')
-rw-r--r--examples/org.eclipse.etrice.tutorials.java/src-gen/HelloWorld/SubSystem_HelloWorld.java83
1 files changed, 83 insertions, 0 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.java/src-gen/HelloWorld/SubSystem_HelloWorld.java b/examples/org.eclipse.etrice.tutorials.java/src-gen/HelloWorld/SubSystem_HelloWorld.java
new file mode 100644
index 000000000..d191fe044
--- /dev/null
+++ b/examples/org.eclipse.etrice.tutorials.java/src-gen/HelloWorld/SubSystem_HelloWorld.java
@@ -0,0 +1,83 @@
+package HelloWorld;
+
+import org.eclipse.etrice.runtime.java.messaging.MessageService;
+import org.eclipse.etrice.runtime.java.messaging.RTServices;
+import org.eclipse.etrice.runtime.java.messaging.Address;
+import org.eclipse.etrice.runtime.java.messaging.IRTObject;
+import org.eclipse.etrice.runtime.java.messaging.RTSystemServicesProtocol.*;
+import org.eclipse.etrice.runtime.java.modelbase.ActorClassBase;
+import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase;
+import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
+
+
+
+
+public class SubSystem_HelloWorld extends SubSystemClassBase{
+
+
+ public SubSystem_HelloWorld(String name) {
+ super(name);
+ }
+
+ @Override
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data){
+ }
+
+ @Override
+ public void instantiateMessageServices(){
+
+ RTServices.getInstance().getMsgSvcCtrl().addMsgSvc(new MessageService(this, new Address(0, 0, 0),"MessageService_Main"));
+ }
+
+ @Override
+ public void instantiateActors(){
+
+ // all addresses
+ // Addresses for the Subsystem Systemport
+ Address addr_item_SystemPort_0 = new Address(0,0,102);
+
+ // actor instance /SubSystem_HelloWorld/application itself => Systemport Address
+ // TODOTJ: For each Actor, multiple addresses should be generated (actor?, systemport, debugport)
+ Address addr_item__SubSystem_HelloWorld_application = new Address(0,0,101);
+ // interface items of /SubSystem_HelloWorld/application
+
+ // instantiate all actor instances
+ instances = new ActorClassBase[1];
+ instances[0] = new HelloWorldTop(
+ this,
+ "application",
+ // own interface item addresses
+ new Address[][] {{addr_item__SubSystem_HelloWorld_application}
+ },
+ // peer interface item addresses
+ new Address[][] {{addr_item_SystemPort_0}
+ }
+ );
+
+ // apply instance attribute configurations
+
+ // create the subsystem system port
+ RTSystemPort = new RTSystemServicesProtocolConjPortRepl(this, "RTSystemPort",
+ 0, //local ID
+ // own addresses
+ new Address[]{
+ addr_item_SystemPort_0
+ },
+ // peer addresses
+ new Address[]{
+ addr_item__SubSystem_HelloWorld_application
+ });
+ }
+
+
+ @Override
+ public void init(){
+ super.init();
+ }
+
+ @Override
+ public void stop(){
+ super.stop();
+ }
+
+};

Back to the top