Project

General

Profile

SinewaveComposite.xml

Christopher Brooks, 08/23/2012 03:44 PM

 
1
<?xml version="1.0" standalone="no"?>
2
<!DOCTYPE class PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
3
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
4
<entity name="Sinewave" class="ptolemy.actor.TypedCompositeActor">
5
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="8.1.devel">
6
    </property>
7
    <doc>This composite actor generates a sine wave.</doc>
8
    <property name="samplingFrequency" class="ptolemy.data.expr.Parameter" value="8000.0">
9
        <doc>The sampling frequency, in the same units as the frequency.</doc>
10
    </property>
11
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 450]">
12
    </property>
13
    <property name="_vergilLocation" class="ptolemy.actor.gui.LocationAttribute" value="[104, 102]">
14
    </property>
15
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={140, 47, 813, 560}, maximized=false}">
16
    </property>
17
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0">
18
    </property>
19
    <property name="annotation" class="ptolemy.kernel.util.Attribute">
20
        <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
21
        </property>
22
        <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
23
            <configure><svg><text x="20" y="20" style="font-size:14; font-family:SansSerif; fill:blue">Generate a sine wave.</text></svg></configure>
24
        </property>
25
        <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
26
            <configure>
27
      <svg>
28
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-A-</text>
29
      </svg>
30
    </configure>
31
        </property>
32
        <property name="_controllerFactory" class="ptolemy.vergil.basic.NodeControllerFactory">
33
        </property>
34
        <property name="_editorFactory" class="ptolemy.vergil.toolbox.AnnotationEditorFactory">
35
        </property>
36
        <property name="_location" class="ptolemy.kernel.util.Location" value="[165.0, 45.0]">
37
        </property>
38
    </property>
39
    <property name="SDF Director" class="ptolemy.domains.sdf.kernel.SDFDirector">
40
        <property name="iterations" class="ptolemy.data.expr.Parameter" value="0">
41
        </property>
42
        <property name="vectorizationFactor" class="ptolemy.data.expr.Parameter" value="1">
43
        </property>
44
        <property name="allowDisconnectedGraphs" class="ptolemy.data.expr.Parameter" value="false">
45
        </property>
46
        <property name="allowRateChanges" class="ptolemy.data.expr.Parameter" value="false">
47
        </property>
48
        <property name="_location" class="ptolemy.kernel.util.Location" value="[90.0, 65.0]">
49
        </property>
50
    </property>
51
    <property name="Documentation" class="ptolemy.vergil.basic.DocAttribute">
52
        <property name="description" class="ptolemy.kernel.util.StringAttribute" value="An actor-oriented class definition that generates a sine wave.&#10;This class is defined as a composite actor.">
53
        </property>
54
        <property name="author" class="ptolemy.kernel.util.StringAttribute" value="Edward A. Lee">
55
        </property>
56
        <property name="samplingFrequency (parameter)" class="ptolemy.data.expr.StringParameter" value="The sampling frequency in cycles per second (Hertz), a double with default 8000.0.">
57
        </property>
58
        <property name="frequency (port-parameter)" class="ptolemy.data.expr.StringParameter" value="The sinusoid frequency in cycles per second (Hertz), a double with default 440.0.">
59
        </property>
60
        <property name="phase (port-parameter)" class="ptolemy.data.expr.StringParameter" value="The sinusoid phase in radians, a double with default 0.0.">
61
        </property>
62
        <property name="output (port)" class="ptolemy.kernel.util.StringAttribute" value="The output (a uniformly sampled sinusoidal signal).">
63
        </property>
64
    </property>
65
    <property name="DocViewerAttribute" class="ptolemy.kernel.util.SingletonAttribute">
66
        <property name="viewer" class="ptolemy.vergil.basic.DocViewerFactory">
67
        </property>
68
        <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
69
        </property>
70
        <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
71
            <configure>
72
      <svg>
73
        <rect x="-50" y="-20" width="100" height="20" style="fill:yellow"></rect>
74
        <text x="-40" y="-5" style="font-size:12; font-family:SansSerif; fill:black">Documentation</text>
75
      </svg>
76
    </configure>
77
        </property>
78
        <property name="_location" class="ptolemy.kernel.util.Location" value="[240.0, 100.0]">
79
        </property>
80
    </property>
81
    <property name="frequency" class="ptolemy.actor.parameters.PortParameter" value="440.0">
82
        <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
83
        </property>
84
        <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
85
        </property>
86
        <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
87
            <configure>
88
      <svg>
89
        <polyline points="-15,-15, -3,-5, -16,5" style="stroke:black"></polyline>
90
        <polygon points="-22,-1, -22,4, -10,-5, -22,-14, -22,-9, -30,-9, -30, -1" style="fill:lightGray"></polygon>
91
      </svg>
92
    </configure>
93
        </property>
94
        <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
95
            <configure>
96
      <svg>
97
        <text x="20" style="font-size:14; font-family:SansSerif; fill:black" y="20">-P-</text>
98
      </svg>
99
    </configure>
100
        </property>
101
        <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
102
        </property>
103
        <property name="_location" class="ptolemy.kernel.util.Location" value="[100.0, 120.0]">
104
        </property>
105
    </property>
106
    <property name="phase" class="ptolemy.actor.parameters.PortParameter" value="0.0">
107
        <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
108
        </property>
109
        <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
110
        </property>
111
        <property name="_iconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
112
            <configure>
113
      <svg>
114
        <polyline points="-15,-15, -3,-5, -16,5" style="stroke:black"></polyline>
115
        <polygon points="-22,-1, -22,4, -10,-5, -22,-14, -22,-9, -30,-9, -30, -1" style="fill:lightGray"></polygon>
116
      </svg>
117
    </configure>
118
        </property>
119
        <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
120
            <configure>
121
      <svg>
122
        <text x="20" style="font-size:14; font-family:SansSerif; fill:black" y="20">-P-</text>
123
      </svg>
124
    </configure>
125
        </property>
126
        <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
127
        </property>
128
        <property name="_location" class="ptolemy.kernel.util.Location" value="[100.0, 165.0]">
129
        </property>
130
    </property>
131
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{300.0, 225.0}">
132
    </property>
133
    <port name="frequency" class="ptolemy.actor.parameters.ParameterPort">
134
        <property name="input"/>
135
        <property name="_location" class="ptolemy.kernel.util.Location" value="{80.0, 115.0}">
136
        </property>
137
        <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
138
        </property>
139
    </port>
140
    <port name="phase" class="ptolemy.actor.parameters.ParameterPort">
141
        <property name="input"/>
142
        <property name="_location" class="ptolemy.kernel.util.Location" value="{80.0, 160.0}">
143
        </property>
144
        <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
145
        </property>
146
    </port>
147
    <port name="output" class="ptolemy.actor.TypedIOPort">
148
        <property name="output"/>
149
        <doc>Sinusoidal waveform output.</doc>
150
        <property name="_location" class="ptolemy.kernel.util.Location" value="[515.0, 290.0]">
151
        </property>
152
    </port>
153
    <entity name="Ramp" class="ptolemy.actor.lib.Ramp">
154
        <property name="firingCountLimit" class="ptolemy.data.expr.Parameter" value="0">
155
        </property>
156
        <property name="init" class="ptolemy.data.expr.Parameter" value="0">
157
        </property>
158
        <property name="step" class="ptolemy.actor.parameters.PortParameter" value="(frequency*2*PI/samplingFrequency)">
159
        </property>
160
        <property name="_location" class="ptolemy.kernel.util.Location" value="[120.0, 235.0]">
161
        </property>
162
    </entity>
163
    <entity name="TrigFunction" class="ptolemy.actor.lib.TrigFunction">
164
        <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
165
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="function">
166
            </property>
167
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="6">
168
            </property>
169
        </property>
170
        <property name="_location" class="ptolemy.kernel.util.Location" value="[395.0, 290.0]">
171
        </property>
172
    </entity>
173
    <entity name="Const" class="ptolemy.actor.lib.Const">
174
        <property name="value" class="ptolemy.data.expr.Parameter" value="phase">
175
        </property>
176
        <doc>Create a constant sequence</doc>
177
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
178
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
179
            </property>
180
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="40">
181
            </property>
182
        </property>
183
        <property name="_location" class="ptolemy.kernel.util.Location" value="[120.0, 315.0]">
184
        </property>
185
    </entity>
186
    <entity name="AddSubtract" class="ptolemy.actor.lib.AddSubtract">
187
        <property name="_location" class="ptolemy.kernel.util.Location" value="[235.0, 290.0]">
188
        </property>
189
    </entity>
190
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
191
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
192
        </property>
193
        <vertex name="vertex1" value="[465.0, 290.0]">
194
        </vertex>
195
    </relation>
196
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
197
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
198
        </property>
199
        <vertex name="vertex1" value="[315.0, 290.0]">
200
        </vertex>
201
    </relation>
202
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
203
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
204
        </property>
205
    </relation>
206
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
207
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
208
        </property>
209
    </relation>
210
    <link port="output" relation="relation3"/>
211
    <link port="Ramp.output" relation="relation"/>
212
    <link port="TrigFunction.input" relation="relation4"/>
213
    <link port="TrigFunction.output" relation="relation3"/>
214
    <link port="Const.output" relation="relation2"/>
215
    <link port="AddSubtract.plus" relation="relation"/>
216
    <link port="AddSubtract.plus" relation="relation2"/>
217
    <link port="AddSubtract.output" relation="relation4"/>
218
</entity>