forked from RedhawkSDR/Documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainch8.html
More file actions
674 lines (648 loc) · 32.1 KB
/
mainch8.html
File metadata and controls
674 lines (648 loc) · 32.1 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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>8 Nodes</title>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8"">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html,2,next,javascript,charset="utf-8" -->
<meta name="src" content="main.tex">
<meta name="date" content="2013-03-12 19:46:00">
<link rel="stylesheet" type="text/css" href="main.css">
<script type="text/javascript" src="scripts/shCore.js"></script>
<script type="text/javascript" src="scripts/shBrushCpp.js"></script>
<script type="text/javascript" src="scripts/shBrushJava.js"></script>
<script type="text/javascript" src="scripts/shBrushPython.js"></script>
<script type="text/javascript" src="scripts/shBrushBash.js"></script>
<script type="text/javascript" src="scripts/shBrushXml.js"></script>
<link href="styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</head><body
>
<script>
function f() {
document.getElementById('main_content_wrap').focus();
}
if (window.addEventListener) {
window.addEventListener("load", f, false);
} else if (window.attachEvent) {
window.attachEvent("onload", f);
}
</script>
<div class="header">
<ul class="navbar">
<li><a class="logo-small" href="index.html"><img src="images/RedHawk_Logo_ALT_B_121px.png"/></a></li> <li><a href="index.html">Home</a></li>
<li><a href="gettingstarted/main.html">Getting Started</a></li>
<li><a class="active" href="main.html">Documentation</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="support.html">Support</a></li>
</ul>
<div class="pattern right"></div>
<a id="forkme_banner" href="https://github.com/redhawksdr">View on GitHub</a>
</div>
<!-- Custom MAIN CONTENT -->
<div id="main_content_wrap" tabindex="0" class="outer">
<section id="main_content" class="inner">
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
href="mainch9.html" >next</a>] [<a
href="mainch7.html" >prev</a>] [<a
href="mainch7.html#tailmainch7.html" >prev-tail</a>] [<a
href="#tailmainch8.html">tail</a>] [<a
href="main.html#mainch8.html" >up</a>] </p></div>
<h2 class="chapterHead"><span class="titlemark">Chapter 8</span><br /><a
id="x10-1130008"></a>Nodes</h2>
<h3 class="sectionHead"><span class="titlemark">8.1 </span> <a
id="x10-1140008.1"></a>Introduction</h3>
<!--l. 4--><p class="noindent" >In the Runtime Environment Chapter, the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> is introduced along with its primary
role: to deploy and manage <a
href="mainli2.html#glo:device">Device</a> proxies in whatever host the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> has been
launched. The term <a
href="mainli2.html#glo:node">Node</a> is used to refer to the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> and its associated <a
href="mainli2.html#glo:device">Devices</a> and
<a
href="mainli2.html#glo:service">Services</a>.
<!--l. 8--><p class="noindent" >The concept of a <a
href="mainli2.html#glo:device">Device</a> and its relationship with the deployment of a set of <a
href="mainli2.html#glo:component">Components</a> in an
<a
href="mainli2.html#glo:application">Application</a> is one of the more complicated concepts in REDHAWK. A <a
href="mainli2.html#glo:device">Device</a> is a program that
the <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> interacts with to determine whether or not a <a
href="mainli2.html#glo:component">Component</a> can run on the host
where that <a
href="mainli2.html#glo:device">Device</a> is located. If it is determined that the <a
href="mainli2.html#glo:device">Device</a> can host that <a
href="mainli2.html#glo:component">Component</a>, the
<a
href="mainli2.html#glo:device">Device</a> provides the <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> with the <a
href="mainap3.html#api">API</a> necessary to load the <a
href="mainli2.html#glo:component">Component</a>
binaries over the network and execute them. In short, the <a
href="mainli2.html#glo:device">Device</a> provides the remote host
discovery mechanism to the <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> and the mechanism needed to load and
execute whatever <a
href="mainli2.html#glo:component">Component</a> files are needed to run the <a
href="mainli2.html#glo:component">Component</a> on the <a
href="mainli2.html#glo:device">Device</a>
host.
<!--l. 13--><p class="noindent" >This chapter provides a description of how to interact with <a
href="mainli2.html#glo:device">Devices</a> and <a
href="mainli2.html#glo:node">Nodes</a> using the
REDHAWK <a
href="mainap3.html#ide">IDE</a>.
<!--l. 2--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">8.2 </span> <a
id="x10-1150008.2"></a>Running a Node</h3>
<!--l. 4--><p class="noindent" >As part of the REDHAWK install, a <a
href="mainli2.html#glo:domain">Domain</a> and <a
href="mainli2.html#glo:node">Node</a> should be setup by default. To launch the
<a
href="mainli2.html#glo:domain">Domain</a> and <a
href="mainli2.html#glo:node">Node</a> see <a
href="mainch10.html#x12-15300010.1.1">Section 10.1.1</a>.
<!--l. 8--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.2.1 </span> <a
id="x10-1160008.2.1"></a>Exploring the Running Node</h4>
<!--l. 11--><p class="noindent" >
<ol class="enumerate1" >
<li
class="enumerate" id="x10-116002x1">On the <span
class="cmbx-12">SCA Explorer</span>, expand the <span
class="cmbx-12">REDHAWK</span><span
class="cmbx-12">_DEV </span>entry in the <span
class="cmbx-12">SCA Explorer</span>
view.
</li>
<li
class="enumerate" id="x10-116004x2">Three entries should be visible: <a
href="mainli2.html#glo:devicemanager"><span
class="cmbx-12">Device Managers</span></a>, <a
href="mainli2.html#glo:filemanager"><span
class="cmbx-12">File Manager</span></a>, and <span
class="cmbx-12">Waveforms</span>.
Expand <a
href="mainli2.html#glo:devicemanager"><span
class="cmbx-12">Device Managers</span></a>.
</li>
<li
class="enumerate" id="x10-116006x3">Expand <span
class="cmbx-12">DevMgr</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">localhost</span><span
class="cmmib-10x-x-120">></span><span
class="cmbx-12">.localdomain</span>.
</li>
<li
class="enumerate" id="x10-116008x4">Select <span
class="cmbx-12">GPP</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">localhost</span><span
class="cmmib-10x-x-120">></span><span
class="cmbx-12">_localdomain</span>.
</li>
<li
class="enumerate" id="x10-116010x5">Select the <a
href="mainli2.html#glo:property"><span
class="cmbx-12">Properties</span></a> view tab next to the <span
class="cmbx-12">Console </span>view tab.
</li>
<li
class="enumerate" id="x10-116012x6">The <a
href="mainli2.html#glo:property"><span
class="cmbx-12">Properties</span></a> view should list all the <a
href="mainli2.html#glo:property">Properties</a> for this <a
href="mainli2.html#glo:device">Device</a>, such as the
operation system name, amount of available memory, and other important information,
as seen in <a
href="#x10-116013r1">Figure 8.1</a>.</li></ol>
<!--l. 21--><p class="noindent" ><hr class="figure"><div class="figure"
><table class="figure"><tr class="figure"><td class="figure"
>
<a
id="x10-116013r1"></a>
<!--l. 23--><p class="noindent" ><img
src="images/NodesAndDevices/GPPProps.jpg" alt="PIC"
>
<br /> <table class="caption"
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure 8.1: </td><td
class="content">Inspecting <a
href="mainli2.html#glo:property">Properties</a> on a <a
href="mainap3.html#gpp">GPP</a> associated with a <a
href="mainli2.html#glo:devicemanager">Device Manager</a></td></tr></table><!--tex4ht:label?: x10-116013r1 -->
<!--l. 26--><p class="noindent" ></td></tr></table></div><hr class="endfigure">
<h4 class="subsectionHead"><span class="titlemark">8.2.2 </span> <a
id="x10-1170008.2.2"></a>Creating a Component that Consumes Resources</h4>
<!--l. 31--><p class="noindent" >
<ol class="enumerate1" >
<li
class="enumerate" id="x10-117002x1">Create a Python <a
href="mainli2.html#glo:component">Component</a> called <span
class="cmti-12">sample</span>.
</li>
<li
class="enumerate" id="x10-117004x2">On the project view, select the <span
class="cmbx-12">Implementations </span>tab.
</li>
<li
class="enumerate" id="x10-117006x3">On the bottom-right of this view should be visible a <span
class="cmbx-12">Dependencies </span>section. Click
<span
class="cmbx-12">Add... </span>on the <span
class="cmbx-12">Dependency </span>subsection of the <span
class="cmbx-12">Dependencies </span>section.
</li>
<li
class="enumerate" id="x10-117008x4">In the <span
class="cmbx-12">Dependency Wizard</span>, select <span
class="cmbx-12">Kind=Property Reference </span>and
<span
class="cmbx-12">Type=allocation</span>.
</li>
<li
class="enumerate" id="x10-117010x5">The <span
class="cmtt-12">Refid </span>field is more complicated; the <a
href="mainli2.html#glo:component">Component</a> needs to be given some <a
href="mainli2.html#glo:property">Property</a>
that the <a
href="mainli2.html#glo:component">Component</a> consumes when it is running on a <a
href="mainli2.html#glo:device">Device</a>. An example of such
a <a
href="mainli2.html#glo:property">Property</a> is memory. For this example, memory is an attribute (<a
href="mainli2.html#glo:property">Property</a>) of the
<a
href="mainli2.html#glo:device">Device</a> that the <a
href="mainli2.html#glo:component">Component</a> consumes. To describe this, click the <span
class="cmbx-12">Browse </span>button on
the <span
class="cmbx-12">Refid </span>field and select <span
class="cmbx-12">GPP:memCapacity </span>(do not worry if there are multiple
instances of the same <a
href="mainli2.html#glo:property">Property</a> on the list, just pick one).
</li>
<li
class="enumerate" id="x10-117012x6">After selecting this <a
href="mainli2.html#glo:property">Property</a>, the globally unique <a
href="mainap3.html#id">ID</a> of the property populates the
<span
class="cmbx-12">Refid </span>field, which in this case is: <span
class="cmbx-12">DCE:8dcef419-b440-4bcf-b893-cab79b6024fb</span>
(this is the <span
class="cmtt-12">id </span>of the corresponding <a
href="mainli2.html#glo:property">Property</a> of the <a
href="mainap3.html#gpp">GPP</a>). To complete the dependency
definition, provide a value for the consumption of this <a
href="mainli2.html#glo:property">Property</a>: in this case, set
<span
class="cmbx-12">Value=</span><span
class="cmti-12">1000</span>.
</li>
<li
class="enumerate" id="x10-117014x7">Click <span
class="cmbx-12">Finish</span>.
</li>
<li
class="enumerate" id="x10-117016x8">Save the project, generate the code and drag the <a
href="mainli2.html#glo:component">Component</a> project to <span
class="cmbx-12">SCA Explorer</span>
<span
class="cmmi-12">> </span><span
class="cmbx-12">TargetSDR</span>.</li></ol>
<!--l. 47--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.2.3 </span> <a
id="x10-1180008.2.3"></a>Create a Waveform for the New Component</h4>
<!--l. 49--><p class="noindent" >
<ol class="enumerate1" >
<li
class="enumerate" id="x10-118002x1">Create a new <a
href="mainli2.html#glo:waveformapplication">Waveform</a> called <span
class="cmti-12">sample</span><span
class="cmti-12">_deploy</span>.
</li>
<li
class="enumerate" id="x10-118004x2">Drag the <a
href="mainli2.html#glo:component">Component</a> <span
class="cmti-12">sample </span>from the Palette onto the Diagram.
</li>
<li
class="enumerate" id="x10-118006x3">Save the project and drag the project <span
class="cmti-12">sample</span><span
class="cmti-12">_deploy </span>from the <span
class="cmbx-12">Project Explorer </span>to
<span
class="cmbx-12">SCA Explorer</span><span
class="cmmi-12">> </span><span
class="cmbx-12">TargetSDR</span>.</li></ol>
<!--l. 55--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.2.4 </span> <a
id="x10-1190008.2.4"></a>Observe the Effect of Launching the Component</h4>
<!--l. 58--><p class="noindent" >
<ol class="enumerate1" >
<li
class="enumerate" id="x10-119002x1">On the running <a
href="mainli2.html#glo:domain">Domain</a>, select <span
class="cmbx-12">GPP</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">localhost</span><span
class="cmmib-10x-x-120">></span><span
class="cmbx-12">_localdomain </span>and note the value
for <span
class="cmbx-12">memCapacity </span>on the <a
href="mainli2.html#glo:property"><span
class="cmbx-12">Properties</span></a> tab for the <a
href="mainap3.html#gpp">GPP</a> <a
href="mainli2.html#glo:device">Device</a> as seen in <a
href="#x10-116013r1">Figure 8.1</a>.
</li>
<li
class="enumerate" id="x10-119004x2">Launch the <a
href="mainli2.html#glo:application">Application</a> <span
class="cmti-12">sample</span><span
class="cmti-12">_deploy </span>on the running <a
href="mainli2.html#glo:domain">Domain</a> (right-click on
the <a
href="mainli2.html#glo:domain">Domain</a>, select <span
class="cmbx-12">Launch Waveform...</span><span
class="cmmi-12">> </span><span
class="cmbx-12">sample</span><span
class="cmbx-12">_deploy</span><span
class="cmmi-12">> </span><span
class="cmbx-12">Finish</span>). Note
<span
class="cmbx-12">memCapacity </span>for <span
class="cmbx-12">GPP</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">localhost</span><span
class="cmmib-10x-x-120">></span><span
class="cmbx-12">_localdomain </span>again; it should be 1000 less
than before the launch of the <a
href="mainli2.html#glo:application">Application</a>.
</li>
<li
class="enumerate" id="x10-119006x3">Release the <a
href="mainli2.html#glo:application">Application</a> (<span
class="cmbx-12">REDHAWK</span><span
class="cmbx-12">_DEV </span><span
class="cmmi-12">></span>
<span
class="cmbx-12">Waveforms </span><span
class="cmmi-12">> </span><span
class="cmbx-12">sample</span><span
class="cmbx-12">_deploy</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">#</span><span
class="cmmib-10x-x-120">> </span>right-click on Release). Note memCapacity
for <span
class="cmbx-12">GPP</span><span
class="cmbx-12">_</span><span
class="cmmib-10x-x-120"><</span><span
class="cmbx-12">localhost</span><span
class="cmmib-10x-x-120">></span><span
class="cmbx-12">_localdomain </span>again; it should be restored to the original
value.</li></ol>
<!--l. 64--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.2.5 </span> <a
id="x10-1200008.2.5"></a>Creating a New Node</h4>
<!--l. 66--><p class="noindent" >As shown in <a
href="#x10-1160008.2.1">Section 8.2.1</a>, a <a
href="mainli2.html#glo:node">Node</a> is a <a
href="mainli2.html#glo:devicemanager">Device Manager</a> instance with an associated set of
<a
href="mainli2.html#glo:device">Devices</a> and <a
href="mainli2.html#glo:service">Services</a>. A <a
href="mainli2.html#glo:node">Node</a> is completely defined by a Domain Manager Configuration
Descriptor (<a
href="mainap3.html#dmd">DMD</a>) <a
href="mainap3.html#xml">XML</a> file. A <a
href="mainli2.html#glo:devicemanager">Device Manager</a> uses the information in this <a
href="mainap3.html#xml">XML</a> file to deploy,
configure, and inter-connect <a
href="mainli2.html#glo:device">Devices</a> and <a
href="mainli2.html#glo:service">Services</a> (<a
href="mainli2.html#glo:service">Services</a> are described in <a
href="mainch7.html#x9-1020007">Chapter
7</a>).
<!--l. 70--><p class="noindent" >The <span
class="cmbx-12">SCA </span><a
href="mainli2.html#glo:node"><span
class="cmbx-12">Node</span></a> <span
class="cmbx-12">Project </span>in the REDHAWK <a
href="mainap3.html#ide">IDE</a> provides a mechanism for generating these
<a
href="mainap3.html#dmd">DMD</a> files. By invoking the <span
class="cmbx-12">SCA </span><a
href="mainli2.html#glo:node"><span
class="cmbx-12">Node</span></a> <span
class="cmbx-12">Project</span>, a wizard is started where the developer selects
different characteristics for the <a
href="mainli2.html#glo:node">Node</a> like the project name. In the wizard, the developer must
provide both a project name and a <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> name. The <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> name is the
name of the <a
href="mainli2.html#glo:domain">Domain</a> that the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> will automatically associate with upon startup. At
runtime, the <a
href="mainli2.html#glo:domainmanager">Domain Manager</a> name that the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> associates with can be
overridden.
<!--l. 76--><p class="noindent" >The <a
href="mainli2.html#glo:node">Node</a> project has multiple tabs. The most intuitive tab is the Diagram tab, which allows a
developer to drag <a
href="mainli2.html#glo:device">Devices</a> available in <span
class="cmtt-12">$SDRROOT </span>into the <a
href="mainli2.html#glo:node">Node</a>, as seen in <a
href="#x10-120001r2">Figure 8.2</a>. Once the set
of members for a particular <a
href="mainli2.html#glo:node">Node</a> is determined, save the project and drag it to <span
class="cmbx-12">Target SDR </span>to
install it.
<!--l. 80--><p class="noindent" ><hr class="figure"><div class="figure"
><table class="figure"><tr class="figure"><td class="figure"
>
<a
id="x10-120001r2"></a>
<!--l. 82--><p class="noindent" ><img
src="images/NodesAndDevices/NodeDesign.jpg" alt="PIC"
>
<br /> <table class="caption"
><tr style="vertical-align:baseline;" class="caption"><td class="id">Figure 8.2: </td><td
class="content"><a
href="mainli2.html#glo:node">Node</a> design diagram</td></tr></table><!--tex4ht:label?: x10-120001r2 -->
<!--l. 85--><p class="noindent" ></td></tr></table></div><hr class="endfigure">
<!--l. 87--><p class="noindent" >To launch this new <a
href="mainli2.html#glo:node">Node</a>:
<ol class="enumerate1" >
<li
class="enumerate" id="x10-120003x1">Right-click on the <a
href="mainli2.html#glo:node">Node</a> descriptor, <span
class="cmbx-12">Target SDR </span><span
class="cmmi-12">> </span><a
href="mainli2.html#glo:node"><span
class="cmbx-12">Nodes</span></a> <span
class="cmmi-12">> </span><span
class="cmbx-12">sample</span><span
class="cmbx-12">_node</span>.
</li>
<li
class="enumerate" id="x10-120005x2">Select <span
class="cmbx-12">Launch </span><a
href="mainli2.html#glo:devicemanager"><span
class="cmbx-12">Device Manager</span></a>. The running <a
href="mainli2.html#glo:node">Node</a> should now be visible under the
running <a
href="mainli2.html#glo:domain">Domain</a>’s <a
href="mainli2.html#glo:devicemanager"><span
class="cmbx-12">Device Managers</span></a> section.</li></ol>
<h3 class="sectionHead"><span class="titlemark">8.3 </span> <a
id="x10-1210008.3"></a>Component Deployment Algorithm</h3>
<!--l. 3--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3.1 </span> <a
id="x10-1220008.3.1"></a>Dependencies</h4>
<!--l. 4--><p class="noindent" >As described in <a
href="#x10-1170008.2.2">Section 8.2.2</a>, a <a
href="mainli2.html#glo:component">Component</a> can be described as consuming an arbitrary amount of
capacity from a <a
href="mainli2.html#glo:device">Device</a>; this relationship is called a <span
class="cmbx-12">dependency</span>. Dependencies are generalized, so
it is possible to create a dependency based on attributes (<a
href="mainli2.html#glo:property">Properties</a> of kind allocation) of <a
href="mainli2.html#glo:device">Devices</a>
irrespective of the specific nature of a <a
href="mainli2.html#glo:device">Device</a>.
<!--l. 7--><p class="noindent" >A dependency is defined by how much of a particular <a
href="mainli2.html#glo:device">Device</a> resource is required. For
example, a component dependency could be a requirement of 1.7 units of <a
href="mainli2.html#glo:device">Device</a> <a
href="mainli2.html#glo:property">Property</a>
<span
class="cmbx-12">some</span><span
class="cmbx-12">_id </span>Testing this description requires the runtime environment to only determine
whether a <a
href="mainli2.html#glo:device">Device</a> contains an allocation <a
href="mainli2.html#glo:property">Property</a> with the <a
href="mainap3.html#id">ID</a> <span
class="cmbx-12">some</span><span
class="cmbx-12">_id</span>; this concept can
be generalized to any physical constraint that a <a
href="mainli2.html#glo:device">Device</a> might have, requiring only a
convention between the <a
href="mainli2.html#glo:component">Component</a> developer and the <a
href="mainli2.html#glo:device">Device</a> developer regarding a
<a
href="mainli2.html#glo:device">Device</a>’s <a
href="mainli2.html#glo:property">Property</a> <a
href="mainap3.html#id">ID</a> and units, both of which are publicized in a <a
href="mainli2.html#glo:device">Device</a>’s <a
href="mainap3.html#prf">PRF</a> file
(<span
class="cmtt-12">prf.xml</span>).
<!--l. 10--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3.2 </span> <a
id="x10-1230008.3.2"></a>Allocation Properties</h4>
<!--l. 11--><p class="noindent" >Allocation <a
href="mainli2.html#glo:property">Properties</a> are <a
href="mainli2.html#glo:device">Device</a> <a
href="mainli2.html#glo:property">Properties</a> that are associated with an action and are used by the
runtime environment to determine whether or not a <a
href="mainli2.html#glo:device">Device</a> can support a particular <a
href="mainli2.html#glo:component">Component</a>
dependency. This action can either be <span
class="cmbx-12">external </span>or some logical operation (e.g., <span
class="cmbx-12">eq </span>(equals) or <span
class="cmbx-12">lt</span>
(less than)).
<!--l. 14--><p class="noindent" >
<h5 class="subsubsectionHead"><a
id="x10-1240008.3.2"></a>Non-External Properties</h5>
<!--l. 15--><p class="noindent" >Non-external <a
href="mainli2.html#glo:property">Properties</a> are evaluated by the runtime environment without querying the <a
href="mainli2.html#glo:device">Device</a>.
For example, a <a
href="mainli2.html#glo:component">Component</a> dependency on an allocation <a
href="mainli2.html#glo:property">Property</a> with operation <span
class="cmbx-12">eq </span>might be <span
class="cmti-12">blue</span>.
The runtime environment will then check the <a
href="mainli2.html#glo:device">Device</a>’s <a
href="mainap3.html#prf">PRF</a> file (<span
class="cmtt-12">prf.xml</span>) and the <a
href="mainli2.html#glo:devicemanager">Device
Manager</a>’s configuration file for the deployment of that <a
href="mainli2.html#glo:device">Device</a> (<span
class="cmtt-12">dcd.xml</span>) to determine whether
that <a
href="mainli2.html#glo:property">Property</a>’s value is equal to <span
class="cmti-12">blue</span>.
<!--l. 18--><p class="noindent" >
<h5 class="subsubsectionHead"><a
id="x10-1250008.3.2"></a>External Properties</h5>
<!--l. 19--><p class="noindent" >External <a
href="mainli2.html#glo:property">Properties</a>, on the other, hand are handled by the <a
href="mainli2.html#glo:device">Device</a>. For example, a <a
href="mainli2.html#glo:component">Component</a>
dependency on an allocation <a
href="mainli2.html#glo:property">Property</a> with operation <span
class="cmbx-12">external </span>might be <span
class="cmti-12">yellow</span>. The runtime
environment will then make a function call on that <a
href="mainli2.html#glo:device">Device</a> with two arguments: the allocation
<a
href="mainli2.html#glo:property">Property</a> <a
href="mainap3.html#id">ID</a> and the value <span
class="cmti-12">yellow</span>. The <a
href="mainli2.html#glo:device">Device</a> will then, at its own discretion, determine whether
to provide a positive response or a negative one. The algorithm used by the <a
href="mainli2.html#glo:device">Device</a> to determine
whether or not it has sufficient capacity to allocate against a value of <span
class="cmti-12">yellow </span>is left up to the
<a
href="mainli2.html#glo:device">Device</a> developer.
<!--l. 22--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3.3 </span> <a
id="x10-1260008.3.3"></a>The Deployment Process</h4>
<!--l. 24--><p class="noindent" >The runtime environment will scan all non-busy executable <a
href="mainli2.html#glo:device">Devices</a> registered in the <a
href="mainli2.html#glo:domain">Domain</a> to see
which <a
href="mainli2.html#glo:device">Device</a> will support all the listed <a
href="mainli2.html#glo:component">Component</a> dependencies. A <a
href="mainli2.html#glo:device">Device</a> is busy when its state
is returned as <span
class="cmbx-12">BUSY</span>, otherwise it is either <span
class="cmbx-12">IDLE </span>or <span
class="cmbx-12">ACTIVE</span>. When a <a
href="mainli2.html#glo:device">Device</a> is found that
satisfies all <a
href="mainli2.html#glo:component">Component</a> dependencies, it will mark that <a
href="mainli2.html#glo:device">Device</a> as assigned the deployment of that
<a
href="mainli2.html#glo:component">Component</a> and move on to whatever other <a
href="mainli2.html#glo:component">Components</a> make up the <a
href="mainli2.html#glo:waveformapplication">Waveform</a>. Once all
<a
href="mainli2.html#glo:component">Components</a> have been found an assigned <a
href="mainli2.html#glo:device">Device</a>, the <a
href="mainli2.html#glo:component">Components</a> are deployed to all those
<a
href="mainli2.html#glo:device">Devices</a>.
<!--l. 29--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3.4 </span> <a
id="x10-1270008.3.4"></a>Distribution of Files</h4>
<!--l. 31--><p class="noindent" >All <a
href="mainli2.html#glo:component">Component</a> binaries and descriptor files reside in <span
class="cmtt-12">$SDRROOT/dom </span>on whatever host is
running the <a
href="mainli2.html#glo:domainmanager">Domain Manager</a>. In every host that is running a <a
href="mainli2.html#glo:devicemanager">Device Manager</a>, a cache
directory is created in <span
class="cmtt-12">$SDRROOT/dev</span>, with a directory entry for each <a
href="mainli2.html#glo:device">Device</a> that the
<a
href="mainli2.html#glo:devicemanager">Device Manager</a> manages. When a <a
href="mainli2.html#glo:component">Component</a> runs on any given <a
href="mainli2.html#glo:device">Device</a>, the binary (or
module or Java ARchive (<a
href="mainap3.html#jar">JAR</a>) file) is copied from <span
class="cmtt-12">$SDRROOT/dom </span>to the <a
href="mainli2.html#glo:device">Device</a>’s cache
directory. Using this mechanism, the <a
href="mainli2.html#glo:device">Device</a> can start the <a
href="mainli2.html#glo:component">Component</a> process on a remote
host.
<!--l. 36--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3.5 </span> <a
id="x10-1280008.3.5"></a>Dependency Management</h4>
<!--l. 38--><p class="noindent" >A difficulty in deploying a <a
href="mainli2.html#glo:component">Component</a> is that, as a program, it might have dependencies like
C/C++ libraries, Python modules, or Java <a
href="mainap3.html#jar">JAR</a>s. REDHAWK allows for the creation of soft
package dependencies, where a library, module, or <a
href="mainap3.html#jar">JAR</a> can be associated with its own profile.
<a
href="mainli2.html#glo:component">Components</a> that have a runtime dependency with this library, module, or <a
href="mainap3.html#jar">JAR</a>, can declare this
library profile as a dependency. When the <a
href="mainli2.html#glo:component">Component</a> is loaded over the network, this dependency
will also be loaded, and before the <a
href="mainli2.html#glo:component">Component</a> is forked, the <a
href="mainli2.html#glo:component">Component</a>’s local running
environment is changed to include the library in <span
class="cmtt-12">$LD</span><span
class="cmtt-12">_LIBRARY</span><span
class="cmtt-12">_PATH</span>, module in <span
class="cmtt-12">$PYTHONPATH</span>, or
<a
href="mainap3.html#jar">JAR</a> in <span
class="cmtt-12">$CLASSPATH</span>. The allocation/dependency requirements associated with the <a
href="mainli2.html#glo:component">Component</a>
are also applied to the library; for example, if a <a
href="mainli2.html#glo:component">Component</a> is designed to run on an
x86_64 platform, the runtime environment checks that dependency runs on an x86_64
platform.
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
href="mainch9.html" >next</a>] [<a
href="mainch7.html" >prev</a>] [<a
href="mainch7.html#tailmainch7.html" >prev-tail</a>] [<a
href="mainch8.html" >front</a>] [<a
href="main.html#mainch8.html" >up</a>] </p></div>
<!--l. 1--><p class="noindent" ><a
id="tailmainch8.html"></a>
<div class=license>
<hr>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" /></a><br /><span xmlns:dct="http:// purl.org/dc/terms/" property="dct:title">REDHAWK Documentation</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</div>
</body></html>