blob: cd616cb28faf1bf1958bd50886bcf30b575b8bc2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
package org.eclipse.etrice.examples.dynamicactors8;
import org.eclipse.etrice.runtime.java.modelbase.IPersistable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.eclipse.etrice.runtime.java.messaging.Address;
import org.eclipse.etrice.runtime.java.messaging.IRTObject;
import org.eclipse.etrice.runtime.java.messaging.IMessageReceiver;
import org.eclipse.etrice.runtime.java.modelbase.ActorClassBase;
import org.eclipse.etrice.runtime.java.modelbase.SubSystemClassBase;
import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
import org.eclipse.etrice.examples.dynamicactors8.PStep.*;
public class Optional2 extends Optional implements IPersistable {
//--------------------- ports
//--------------------- saps
//--------------------- services
//--------------------- optional actors
//--------------------- interface item IDs
/*--------------------- attributes ---------------------*/
/*--------------------- operations ---------------------*/
//--------------------- construction
public Optional2(IRTObject parent, String name) {
super(parent, name);
setClassName("Optional2");
// initialize attributes
// own ports
// own saps
// own service implementations
// sub actors
DebuggingService.getInstance().addMessageActorCreate(this, "sub");
new Sub2(this, "sub");
}
/* --------------------- attribute setters and getters */
//--------------------- port getters
//--------------------- lifecycle functions
public void stop(){
stopUser();
super.stop();
}
public void destroy() {
DebuggingService.getInstance().addMessageActorDestroy(this);
super.destroy();
}
//--------------------- no state machine
public void receiveEvent(InterfaceItemBase ifitem, int evt, Object data) {
handleSystemEvent(ifitem, evt, data);
}
public void executeInitTransition() {}
@Override
public void saveObject(ObjectOutput output) throws IOException {
saveAttributes(output);
}
protected void saveAttributes(ObjectOutput output) throws IOException {
super.saveAttributes(output);
}
@Override
public void loadObject(ObjectInput input) throws IOException, ClassNotFoundException {
loadAttributes(input);
}
protected void loadAttributes(ObjectInput input) throws IOException, ClassNotFoundException {
super.loadAttributes(input);
}
};
|