Project

General

Profile

Bug #3207 ยป ExecFileRedirect.xml

Christopher Brooks, 04/23/2008 12:23 PM

 
1
<?xml version="1.0" standalone="no"?>
2
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
3
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
4
<entity name="ExecFileRedirect" class="ptolemy.actor.TypedCompositeActor">
5
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="7.1.devel">
6
    </property>
7
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={74, 116, 919, 517}, maximized=false}">
8
    </property>
9
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[704, 400]">
10
    </property>
11
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
12
    </property>
13
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{352.0, 200.0}">
14
    </property>
15
    <property name="annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
16
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Test file redirection&#10;&#10;The Exec2 actor has prependPlatformDependentShellCommand&#10;set so that the file ExecFileRedirect.txt is created&#10;&#10;We create a random number, echo it to a file, read&#10;the file and compare it with the original random number.">
17
        </property>
18
        <property name="_location" class="ptolemy.kernel.util.Location" value="[280.0, 10.0]">
19
        </property>
20
    </property>
21
    <property name="annotation2" class="ptolemy.vergil.kernel.attributes.TextAttribute">
22
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
23
        </property>
24
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Remove the .txt file">
25
        </property>
26
        <property name="_location" class="ptolemy.kernel.util.Location" value="[35.0, 115.0]">
27
        </property>
28
    </property>
29
    <property name="annotation3" class="ptolemy.vergil.kernel.attributes.TextAttribute">
30
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
31
        </property>
32
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Echo text into the file">
33
        </property>
34
        <property name="_location" class="ptolemy.kernel.util.Location" value="[255.0, 210.0]">
35
        </property>
36
    </property>
37
    <property name="annotation4" class="ptolemy.vergil.kernel.attributes.TextAttribute">
38
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
39
        </property>
40
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Read the txt file">
41
        </property>
42
        <property name="_location" class="ptolemy.kernel.util.Location" value="[425.0, 320.0]">
43
        </property>
44
    </property>
45
    <property name="SDF Director" class="ptolemy.domains.sdf.kernel.SDFDirector">
46
        <property name="iterations" class="ptolemy.data.expr.Parameter" value="1">
47
        </property>
48
        <property name="synchronizeToRealTime" class="ptolemy.data.expr.Parameter" value="false">
49
        </property>
50
        <property name="_location" class="ptolemy.kernel.util.Location" value="{80.0, 40.0}">
51
        </property>
52
    </property>
53
    <property name="annotation5" class="ptolemy.vergil.kernel.attributes.TextAttribute">
54
        <property name="textSize" class="ptolemy.data.expr.Parameter" value="12">
55
        </property>
56
        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="This should be zero">
57
        </property>
58
        <property name="_location" class="ptolemy.kernel.util.Location" value="[585.0, 315.0]">
59
        </property>
60
    </property>
61
    <entity name="Exec" class="ptolemy.actor.lib.Exec">
62
        <property name="command" class="ptolemy.actor.parameters.PortParameter" value="rm -f ExecFileRedirect.txt">
63
        </property>
64
        <property name="prependPlatformDependentShellCommand" class="ptolemy.data.expr.Parameter" value="false">
65
        </property>
66
        <property name="_location" class="ptolemy.kernel.util.Location" value="[75.0, 165.0]">
67
        </property>
68
    </entity>
69
    <entity name="Test" class="ptolemy.actor.lib.Test">
70
        <property name="correctValues" class="ptolemy.data.expr.Parameter" value="{&quot;&quot;}">
71
        </property>
72
        <property name="_location" class="ptolemy.kernel.util.Location" value="[230.0, 185.0]">
73
        </property>
74
    </entity>
75
    <entity name="Test2" class="ptolemy.actor.lib.Test">
76
        <property name="correctValues" class="ptolemy.data.expr.Parameter" value="{&quot;&quot;}">
77
        </property>
78
        <property name="trainingMode" class="ptolemy.moml.SharedParameter" value="false">
79
        </property>
80
        <property name="_location" class="ptolemy.kernel.util.Location" value="[235.0, 115.0]">
81
        </property>
82
    </entity>
83
    <entity name="Exec2" class="ptolemy.actor.lib.Exec">
84
        <property name="command" class="ptolemy.actor.parameters.PortParameter" value="echo &quot;Hello, world.&quot; &gt; ExecFileRedirect.txt">
85
        </property>
86
        <property name="prependPlatformDependentShellCommand" class="ptolemy.data.expr.Parameter" value="true">
87
        </property>
88
        <property name="_location" class="ptolemy.kernel.util.Location" value="[308.0, 260.5]">
89
        </property>
90
    </entity>
91
    <entity name="Test3" class="ptolemy.actor.lib.Test">
92
        <property name="correctValues" class="ptolemy.data.expr.Parameter" value="{&quot;&quot;}">
93
        </property>
94
        <property name="_location" class="ptolemy.kernel.util.Location" value="[450.0, 240.0]">
95
        </property>
96
    </entity>
97
    <entity name="Test4" class="ptolemy.actor.lib.Test">
98
        <property name="correctValues" class="ptolemy.data.expr.Parameter" value="{&quot;&quot;}">
99
        </property>
100
        <property name="_location" class="ptolemy.kernel.util.Location" value="[450.0, 185.0]">
101
        </property>
102
    </entity>
103
    <entity name="Test5" class="ptolemy.actor.lib.Test">
104
        <property name="correctValues" class="ptolemy.data.expr.Parameter" value="{0.0}">
105
        </property>
106
        <property name="trainingMode" class="ptolemy.moml.SharedParameter" value="false">
107
        </property>
108
        <property name="_location" class="ptolemy.kernel.util.Location" value="[655.0, 370.0]">
109
        </property>
110
    </entity>
111
    <entity name="Gaussian" class="ptolemy.actor.lib.Gaussian">
112
        <property name="seed" class="ptolemy.moml.SharedParameter" value="1L">
113
        </property>
114
        <doc>Create a sequence of gaussian random variables</doc>
115
        <property name="_location" class="ptolemy.kernel.util.Location" value="[75.0, 280.0]">
116
        </property>
117
    </entity>
118
    <entity name="Expression" class="ptolemy.actor.lib.Expression">
119
        <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="&quot;echo &quot; +  input  + &quot;&gt; ExecFileRedirect.txt&quot;">
120
        </property>
121
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
122
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
123
            </property>
124
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
125
            </property>
126
            <property name="displayHeight" class="ptolemy.data.expr.Parameter" value="10">
127
            </property>
128
        </property>
129
        <property name="_location" class="ptolemy.kernel.util.Location" value="[160.0, 360.0]">
130
        </property>
131
        <port name="input" class="ptolemy.actor.TypedIOPort">
132
            <property name="input"/>
133
        </port>
134
    </entity>
135
    <entity name="ExpressionReader" class="ptolemy.actor.lib.io.ExpressionReader">
136
        <property name="fileOrURL" class="ptolemy.data.expr.FileParameter" value="ExecFileRedirect.txt">
137
        </property>
138
        <doc>Read one expression per line from a text file and output the result of evaluating the expression</doc>
139
        <property name="_location" class="ptolemy.kernel.util.Location" value="[465.0, 295.0]">
140
        </property>
141
    </entity>
142
    <entity name="Sleep" class="ptolemy.actor.lib.Sleep">
143
        <property name="sleepTime" class="ptolemy.actor.parameters.PortParameter" value="1000L">
144
        </property>
145
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
146
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="sleepTime">
147
            </property>
148
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
149
            </property>
150
        </property>
151
        <property name="_location" class="ptolemy.kernel.util.Location" value="[65.0, 225.0]">
152
        </property>
153
    </entity>
154
    <entity name="Sleep2" class="ptolemy.actor.lib.Sleep">
155
        <property name="sleepTime" class="ptolemy.actor.parameters.PortParameter" value="1000L">
156
        </property>
157
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
158
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="sleepTime">
159
            </property>
160
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
161
            </property>
162
        </property>
163
        <property name="_location" class="ptolemy.kernel.util.Location" value="[395.0, 295.0]">
164
        </property>
165
    </entity>
166
    <entity name="AddSubtract" class="ptolemy.actor.lib.AddSubtract">
167
        <property name="_location" class="ptolemy.kernel.util.Location" value="[555.0, 370.0]">
168
        </property>
169
    </entity>
170
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
171
    </relation>
172
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
173
    </relation>
174
    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
175
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
176
        </property>
177
    </relation>
178
    <relation name="relation6" class="ptolemy.actor.TypedIORelation">
179
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
180
        </property>
181
    </relation>
182
    <relation name="relation7" class="ptolemy.actor.TypedIORelation">
183
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
184
        </property>
185
        <vertex name="vertex1" value="[20.0, 380.0]">
186
        </vertex>
187
    </relation>
188
    <relation name="relation10" class="ptolemy.actor.TypedIORelation">
189
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
190
        </property>
191
    </relation>
192
    <relation name="relation8" class="ptolemy.actor.TypedIORelation">
193
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
194
        </property>
195
    </relation>
196
    <relation name="relation9" class="ptolemy.actor.TypedIORelation">
197
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
198
        </property>
199
    </relation>
200
    <relation name="relation12" class="ptolemy.actor.TypedIORelation">
201
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
202
        </property>
203
    </relation>
204
    <relation name="relation11" class="ptolemy.actor.TypedIORelation">
205
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
206
        </property>
207
    </relation>
208
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
209
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
210
        </property>
211
    </relation>
212
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
213
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
214
        </property>
215
    </relation>
216
    <link port="Exec.output" relation="relation3"/>
217
    <link port="Exec.error" relation="relation"/>
218
    <link port="Exec.exitCode" relation="relation9"/>
219
    <link port="Test.input" relation="relation"/>
220
    <link port="Test2.input" relation="relation3"/>
221
    <link port="Exec2.output" relation="relation6"/>
222
    <link port="Exec2.command" relation="relation10"/>
223
    <link port="Exec2.error" relation="relation5"/>
224
    <link port="Exec2.exitCode" relation="relation11"/>
225
    <link port="Test3.input" relation="relation5"/>
226
    <link port="Test4.input" relation="relation6"/>
227
    <link port="Test5.input" relation="relation4"/>
228
    <link port="Gaussian.output" relation="relation7"/>
229
    <link port="Gaussian.trigger" relation="relation8"/>
230
    <link port="Expression.output" relation="relation10"/>
231
    <link port="Expression.input" relation="relation7"/>
232
    <link port="ExpressionReader.output" relation="relation2"/>
233
    <link port="ExpressionReader.trigger" relation="relation12"/>
234
    <link port="Sleep.input" relation="relation9"/>
235
    <link port="Sleep.output" relation="relation8"/>
236
    <link port="Sleep2.input" relation="relation11"/>
237
    <link port="Sleep2.output" relation="relation12"/>
238
    <link port="AddSubtract.plus" relation="relation2"/>
239
    <link port="AddSubtract.minus" relation="relation7"/>
240
    <link port="AddSubtract.output" relation="relation4"/>
241
</entity>
    (1-1/1)