blob: 8b269b40af6f09f4b9d6de19974350d234fe70c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class ArduinoIPCWrite
import InterProcessCommunication.SharedMemory.*;
Real ModelicaInput;
Real ModelicaOutput (start = 1);
Real OutputDummy;
equation
ModelicaOutput = sin(time)*100;
when sample(0, 0.005) then
ModelicaInput = InterProcessCommunication.SharedMemory.SharedMemoryRead(1);
OutputDummy = InterProcessCommunication.SharedMemory.SharedMemoryWrite(1, ModelicaOutput);
end when;
annotation(
experiment(StartTime = 0, StopTime = 20, Tolerance = 1e-6, Interval = 0.12));
end ArduinoIPCWrite;
|