Skip to content

Commit

Permalink
Modelica standard library, version 1.6, release date June 30, 2004.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@12 7ce873d0-865f-4ce7-a662-4bb36ea78beb
  • Loading branch information
Dag authored and Dag committed Aug 18, 2004
1 parent 4461da7 commit 6a90d1a
Show file tree
Hide file tree
Showing 938 changed files with 23,595 additions and 10,419 deletions.
347 changes: 166 additions & 181 deletions Blocks/Continuous.mo

Large diffs are not rendered by default.

150 changes: 75 additions & 75 deletions Blocks/Examples.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package Examples "Demonstration examples of the components of this package"

extends Icons.Example;

annotation (Documentation(info="<HTML>
annotation( Documentation(info="<HTML>
<p><b>Signal bus concept</b></p>
<p>
Expand Down Expand Up @@ -109,28 +109,28 @@ blocks should be the same as the inputs of the 'send' signal blocks.
</p>
</HTML>"));
protected
Interfaces.Bus bus annotation (extent=[-80, -20; 80, -14]);
Interfaces.Bus bus annotation( extent=[-80, -20; 80, -14]);
public
BusAdaptors.SendReal putRealSignal1 annotation (extent=[-60, 0; -40, 20],
BusAdaptors.SendReal putRealSignal1 annotation( extent=[-60, 0; -40, 20],
rotation=-90);
BusAdaptors.SendBoolean putBooleanSignal annotation (extent=[-20, 0; 0, 20]
, rotation=-90);
BusAdaptors.SendInteger putIntegerSignal annotation (extent=[20, 0; 40, 20]
, rotation=-90);
BusAdaptors.ReceiveReal getRealSignal1 annotation (extent=[-40, -80; -20, -
BusAdaptors.SendBoolean putBooleanSignal annotation( extent=[-20, 0; 0, 20],
rotation=-90);
BusAdaptors.SendInteger putIntegerSignal annotation( extent=[20, 0; 40, 20],
rotation=-90);
BusAdaptors.ReceiveReal getRealSignal1 annotation( extent=[-40, -80; -20, -
60], rotation=-90);
BusAdaptors.ReceiveBoolean getBooleanSignal annotation (extent=[0, -80; 20
, -60], rotation=-90);
BusAdaptors.ReceiveInteger getIntegerSignal annotation (extent=[40, -80; 60
, -60], rotation=-90);
RestBus restBus(set_realSignal2=true) annotation (extent=[60, 20; 80, 40]);
BusAdaptors.ReceiveBoolean getBooleanSignal annotation( extent=[0, -80; 20,
-60], rotation=-90);
BusAdaptors.ReceiveInteger getIntegerSignal annotation( extent=[40, -80; 60,
-60], rotation=-90);
RestBus restBus(set_realSignal2=true) annotation( extent=[60, 20; 80, 40]);
Sources.IntegerStep generateIntegerSignal(
height={1},
offset={2},
startTime={0.5}) annotation (extent=[20, 60; 40, 80], rotation=270);
Sources.BooleanStep generateBooleanSignal(startTime={0.5}) annotation (
height={1},
offset={2},
startTime={0.5}) annotation( extent=[20, 60; 40, 80], rotation=270);
Sources.BooleanStep generateBooleanSignal(startTime={0.5}) annotation(
extent=[-20, 60; 0, 80], rotation=270);
Sources.Sine generateRealSignal1 annotation (extent=[-60, 60; -40, 80],
Sources.Sine generateRealSignal1 annotation( extent=[-60, 60; -40, 80],
rotation=270);

encapsulated package Interfaces "Interfaces specialised for this example"
Expand All @@ -139,7 +139,7 @@ blocks should be the same as the inputs of the 'send' signal blocks.
Real myRealSignal;
Boolean myBooleanSignal;

annotation (Icon(Rectangle(extent=[-100, 100; 100, -100], style(
annotation( Icon(Rectangle(extent=[-100, 100; 100, -100], style(
fillColor=76, fillPattern=1))), Diagram(Rectangle(extent=[-
100, 100; 100, -100], style(fillColor=76, fillPattern=1))));
end MultiPort;
Expand All @@ -155,21 +155,21 @@ blocks should be the same as the inputs of the 'send' signal blocks.
BooleanPort booleanSignal "Boolean signal";
MultiPort multiSignal "Combined signal";

annotation (
annotation(
Icon(Rectangle(extent=[-100, 100; 100, -100], style(
color=77,
fillColor=77,
color=77,
fillColor=77,
fillPattern=1)), Text(
extent=[-134, 168; 134, 108],
string="%name",
style(color=77))),
extent=[-134, 168; 134, 108],
string="%name",
style(color=77))),
Diagram(Text(
extent=[-134, 168; 134, 108],
string="%name",
extent=[-134, 168; 134, 108],
string="%name",
style(color=77)), Rectangle(extent=[-100, 100; 100, -100], style(
color=77,
fillColor=77,
fillPattern=1))),
color=77,
fillColor=77,
fillPattern=1))),
Documentation(info="<HTML>
<p>Defines connector for signalbus.</p>
</HTML>
Expand All @@ -180,13 +180,13 @@ blocks should be the same as the inputs of the 'send' signal blocks.
encapsulated model Part "Component with MultiPort connector"
import Modelica.Blocks.Examples;

Examples.BusUsage.Interfaces.MultiPort multiSignal annotation (extent=[
Examples.BusUsage.Interfaces.MultiPort multiSignal annotation( extent=[
100, -10; 120, 10]);

annotation (Icon(Rectangle(extent=[-100, 60; 100, -60], style(fillColor=
annotation( Icon(Rectangle(extent=[-100, 60; 100, -60], style(fillColor=
76, fillPattern=1)), Text(
extent=[-106, 124; 114, 68],
style(fillColor=76, fillPattern=1),
extent=[-106, 124; 114, 68],
style(fillColor=76, fillPattern=1),
string="%name")));
equation
multiSignal.myRealSignal = time;
Expand All @@ -207,33 +207,33 @@ blocks should be the same as the inputs of the 'send' signal blocks.
"Set dummy value for desiredGear";
parameter Boolean set_multiSignal=false "Set dummy value for ignition";

annotation (Icon(
Rectangle(extent=[-100, 100; 100, -100], style(fillColor=7,
fillPattern=1)),
annotation( Icon(
Rectangle(extent=[-100, 100; 100, -100], style(fillColor=7,
fillPattern=1)),
Text(
extent=[-100, 156; 100, 96],
string="%name",
style(pattern=0)),
style(color=77),
extent=[-100, 156; 100, 96],
string="%name",
style(pattern=0)),
style(color=77),
Text(
extent=[46, -10; 88, -40],
style(color=0),
string="0"),
extent=[46, -10; 88, -40],
style(color=0),
string="0"),
Text(
extent=[-82, 62; 38, 34],
style(color=0),
string="false"),
extent=[-82, 62; 38, 34],
style(color=0),
string="false"),
Line(points=[-28, 24; -28, -66; 0, -66; 0, -104; 0, -102], style(
color=77,
fillColor=7,
fillPattern=1)),
color=77,
fillColor=7,
fillPattern=1)),
Line(points=[68, -46; 68, -66; 0, -66; 0, -108], style(
color=77,
fillColor=7,
fillPattern=1)),
Rectangle(extent=[-90, 78; 46, 24], style(color=0)),
color=77,
fillColor=7,
fillPattern=1)),
Rectangle(extent=[-90, 78; 46, 24], style(color=0)),
Rectangle(extent=[40, -4; 92, -46], style(color=0))));
Examples.BusUsage.Interfaces.Bus bus annotation (extent=[-10, -120; 10, -
Examples.BusUsage.Interfaces.Bus bus annotation( extent=[-10, -120; 10, -
100], rotation=90);
equation
if set_realSignal1 then
Expand All @@ -254,34 +254,34 @@ blocks should be the same as the inputs of the 'send' signal blocks.
end if;
end RestBus;

Part part annotation (extent=[-100, -60; -80, -40]);
Part part annotation( extent=[-100, -60; -80, -40]);
equation

connect(putRealSignal1.toBus, bus.realSignal1) annotation (points=[-50, -2
; -50, -16], style(color=77));
connect(putIntegerSignal.toBus, bus.integerSignal) annotation (points=[30,
connect(putRealSignal1.toBus, bus.realSignal1) annotation( points=[-50, -2;
-50, -16], style(color=77));
connect(putIntegerSignal.toBus, bus.integerSignal) annotation( points=[30,
-2; 30, -16], style(color=77));
connect(generateRealSignal1.outPort, putRealSignal1.inPort) annotation (
connect(generateRealSignal1.outPort, putRealSignal1.inPort) annotation(
points=[-50, 58; -50, 24], style(color=3));
connect(generateBooleanSignal.outPort, putBooleanSignal.inPort) annotation
(points=[-10, 58; -10, 24], style(color=5));
connect(generateIntegerSignal.outPort, putIntegerSignal.inPort) annotation
(points=[30, 58; 30, 24], style(color=45));
connect(getRealSignal1.fromBus, bus.realSignal1) annotation (points=[-30, -
connect(generateBooleanSignal.outPort, putBooleanSignal.inPort) annotation(
points=[-10, 58; -10, 24], style(color=5));
connect(generateIntegerSignal.outPort, putIntegerSignal.inPort) annotation(
points=[30, 58; 30, 24], style(color=45));
connect(getRealSignal1.fromBus, bus.realSignal1) annotation( points=[-30, -
58; -30, -18], style(color=77));
connect(getIntegerSignal.fromBus, bus.integerSignal) annotation (points=[50
, -60; 50, -18], style(color=77));
connect(restBus.bus, bus) annotation (points=[70, 20; 70, -18], style(color
=77));
connect(putBooleanSignal.toBus, bus.booleanSignal) annotation (points=[-10
, -2; -10, -16], style(color=77));
connect(getBooleanSignal.fromBus, bus.booleanSignal) annotation (points=[10
, -60; 10, -18], style(color=77));
connect(part.multiSignal, bus.multiSignal) annotation (points=[-78, -50; -
connect(getIntegerSignal.fromBus, bus.integerSignal) annotation( points=[50,
-60; 50, -18], style(color=77));
connect(restBus.bus, bus) annotation( points=[70, 20; 70, -18], style(color=
77));
connect(putBooleanSignal.toBus, bus.booleanSignal) annotation( points=[-10,
-2; -10, -16], style(color=77));
connect(getBooleanSignal.fromBus, bus.booleanSignal) annotation( points=[10,
-60; 10, -18], style(color=77));
connect(part.multiSignal, bus.multiSignal) annotation( points=[-78, -50; -
70, -50; -70, -18]);
end BusUsage;

annotation (Documentation(info="<html>
annotation( Documentation(info="<html>
<p>
This package contains currently one example model to demonstrate the usage of the
signal bus concept provided by the Modelica.Blocks package.
Expand Down
Loading

0 comments on commit 6a90d1a

Please sign in to comment.