forked from RedhawkSDR/SigGen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSigGen_base.java
More file actions
290 lines (265 loc) · 8.13 KB
/
SigGen_base.java
File metadata and controls
290 lines (265 loc) · 8.13 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
/*
* This file is protected by Copyright. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This file is part of REDHAWK Basic Components SigGen.
*
* REDHAWK Basic Components SigGen is free software: you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* REDHAWK Basic Components SigGen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program. If not, see http://www.gnu.org/licenses/.
*/
package SigGen.java;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.omg.CosNaming.NamingContextPackage.CannotProceed;
import org.omg.CosNaming.NamingContextPackage.InvalidName;
import org.omg.CosNaming.NamingContextPackage.NotFound;
import org.omg.PortableServer.POAPackage.ServantNotActive;
import org.omg.PortableServer.POAPackage.WrongPolicy;
import CF.InvalidObjectReference;
import org.ossie.component.*;
import org.ossie.properties.*;
/**
* This is the component code. This file contains all the access points
* you need to use to be able to access all input and output ports,
* respond to incoming data, and perform general component housekeeping
*
* Source: SigGen.spd.xml
*
* @generated
*/
public abstract class SigGen_base extends ThreadedResource {
/**
* @generated
*/
public final static Logger logger = Logger.getLogger(SigGen_base.class.getName());
/**
* The property frequency
* rate at which the periodic output waveforms repeat. This value is ignored for aperiodic waveforms.
*
* @generated
*/
public final DoubleProperty frequency =
new DoubleProperty(
"frequency", //id
null, //name
1000.0, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property sample_rate
* sampling rate for output data.
*
* @generated
*/
public final DoubleProperty sample_rate =
new DoubleProperty(
"sample_rate", //id
null, //name
5000.0, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property magnitude
* amplitude of output data
*
* @generated
*/
public final DoubleProperty magnitude =
new DoubleProperty(
"magnitude", //id
null, //name
100.0, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property shape
* determine output data type
*
* @generated
*/
public final StringProperty shape =
new StringProperty(
"shape", //id
null, //name
"sine", //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property xfer_len
* number of samples of output data per output packet
*
* @generated
*/
public final LongProperty xfer_len =
new LongProperty(
"xfer_len", //id
null, //name
1000, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property throttle
* Throttles the output data rate to approximately sample_rate
*
* @generated
*/
public final BooleanProperty throttle =
new BooleanProperty(
"throttle", //id
null, //name
true, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property stream_id
* bulkio sri streamID for this data source.
*
* @generated
*/
public final StringProperty stream_id =
new StringProperty(
"stream_id", //id
null, //name
"SigGen Stream", //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property chan_rf
* Sets the CHAN_RF SRI keyword. Set to -1 if not desired.
*
* @generated
*/
public final DoubleProperty chan_rf =
new DoubleProperty(
"chan_rf", //id
null, //name
-1.0, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property col_rf
* Sets the COL_RF SRI keyword. Set to -1 if not desired.
*
* @generated
*/
public final DoubleProperty col_rf =
new DoubleProperty(
"col_rf", //id
null, //name
-1.0, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
/**
* The property sri_blocking
* If the meaning of this property isn't clear, a description should be added.
*
* @generated
*/
public final BooleanProperty sri_blocking =
new BooleanProperty(
"sri_blocking", //id
null, //name
false, //default value
Mode.READWRITE, //mode
Action.EXTERNAL, //action
new Kind[] {Kind.CONFIGURE} //kind
);
// Uses/outputs
/**
* @generated
*/
public bulkio.OutFloatPort port_dataFloat_out;
/**
* @generated
*/
public bulkio.OutShortPort port_dataShort_out;
/**
* @generated
*/
public SigGen_base()
{
super();
// Properties
addProperty(frequency);
addProperty(sample_rate);
addProperty(magnitude);
addProperty(shape);
addProperty(xfer_len);
addProperty(throttle);
addProperty(stream_id);
addProperty(chan_rf);
addProperty(col_rf);
addProperty(sri_blocking);
// Uses/outputs
this.port_dataFloat_out = new bulkio.OutFloatPort("dataFloat_out");
this.addPort("dataFloat_out", this.port_dataFloat_out);
this.port_dataShort_out = new bulkio.OutShortPort("dataShort_out");
this.addPort("dataShort_out", this.port_dataShort_out);
}
public void start() throws CF.ResourcePackage.StartError
{
super.start();
}
public void stop() throws CF.ResourcePackage.StopError
{
super.stop();
}
/**
* The main function of your component. If no args are provided, then the
* CORBA object is not bound to an SCA Domain or NamingService and can
* be run as a standard Java application.
*
* @param args
* @generated
*/
public static void main(String[] args)
{
final Properties orbProps = new Properties();
SigGen.configureOrb(orbProps);
try {
ThreadedResource.start_component(SigGen.class, args, orbProps);
} catch (InvalidObjectReference e) {
e.printStackTrace();
} catch (NotFound e) {
e.printStackTrace();
} catch (CannotProceed e) {
e.printStackTrace();
} catch (InvalidName e) {
e.printStackTrace();
} catch (ServantNotActive e) {
e.printStackTrace();
} catch (WrongPolicy e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}