forked from CATIA-Systems/Modelica-Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExternalArduino.mo
26 lines (23 loc) · 944 Bytes
/
ExternalArduino.mo
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
within Arduino.Internal;
class ExternalArduino "External object of Arduino"
extends ExternalObject;
function constructor "Open Arduino"
input Arduino.Internal.ModelicaFunctions callbacks;
output ExternalArduino externalArduino;
external"C" externalArduino =
ModelicaArduino_open(callbacks) annotation (
Library="ModelicaArduino");
end constructor;
function destructor "Close Arduino"
input ExternalArduino externalArduino;
external"C" ModelicaArduino_close(externalArduino) annotation (
Library="ModelicaArduino");
end destructor;
annotation(Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={
Rectangle(
lineColor={160,160,164},
fillColor={160,160,164},
fillPattern=FillPattern.Solid,
extent={{-100.0,-100.0},{100.0,100.0}},
radius=25.0)}));
end ExternalArduino;