207
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
3 |
<title>CanFestival: /home/epimerde/documents/tc11/CanFestival-3/objdictgen/nodelist.py Source File</title>
|
|
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
5 |
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
6 |
</head><body>
|
|
7 |
<!-- Generated by Doxygen 1.5.1 -->
|
|
8 |
<div class="tabs">
|
|
9 |
<ul>
|
|
10 |
<li><a href="main.html"><span>Main Page</span></a></li>
|
|
11 |
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
12 |
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
13 |
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
14 |
</ul></div>
|
|
15 |
<div class="tabs">
|
|
16 |
<ul>
|
|
17 |
<li><a href="files.html"><span>File List</span></a></li>
|
|
18 |
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
19 |
</ul></div>
|
|
20 |
<h1>/home/epimerde/documents/tc11/CanFestival-3/objdictgen/nodelist.py</h1><a href="nodelist_8py.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a><a class="code" href="namespacenodelist.html">00001</a> <span class="comment">#!/usr/bin/env python</span>
|
|
21 |
<a name="l00002"></a>00002 <span class="comment"># -*- coding: utf-8 -*-</span>
|
|
22 |
<a name="l00003"></a>00003
|
|
23 |
<a name="l00004"></a>00004 <span class="comment">#This file is part of CanFestival, a library implementing CanOpen Stack. </span>
|
|
24 |
<a name="l00005"></a>00005 <span class="comment">#</span>
|
|
25 |
<a name="l00006"></a>00006 <span class="comment">#Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD</span>
|
|
26 |
<a name="l00007"></a>00007 <span class="comment">#</span>
|
|
27 |
<a name="l00008"></a>00008 <span class="comment">#See COPYING file for copyrights details.</span>
|
|
28 |
<a name="l00009"></a>00009 <span class="comment">#</span>
|
|
29 |
<a name="l00010"></a>00010 <span class="comment">#This library is free software; you can redistribute it and/or</span>
|
|
30 |
<a name="l00011"></a>00011 <span class="comment">#modify it under the terms of the GNU Lesser General Public</span>
|
|
31 |
<a name="l00012"></a>00012 <span class="comment">#License as published by the Free Software Foundation; either</span>
|
|
32 |
<a name="l00013"></a>00013 <span class="comment">#version 2.1 of the License, or (at your option) any later version.</span>
|
|
33 |
<a name="l00014"></a>00014 <span class="comment">#</span>
|
|
34 |
<a name="l00015"></a>00015 <span class="comment">#This library is distributed in the hope that it will be useful,</span>
|
|
35 |
<a name="l00016"></a>00016 <span class="comment">#but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
|
36 |
<a name="l00017"></a>00017 <span class="comment">#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
|
|
37 |
<a name="l00018"></a>00018 <span class="comment">#Lesser General Public License for more details.</span>
|
|
38 |
<a name="l00019"></a>00019 <span class="comment">#</span>
|
|
39 |
<a name="l00020"></a>00020 <span class="comment">#You should have received a copy of the GNU Lesser General Public</span>
|
|
40 |
<a name="l00021"></a>00021 <span class="comment">#License along with this library; if not, write to the Free Software</span>
|
|
41 |
<a name="l00022"></a>00022 <span class="comment">#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
|
42 |
<a name="l00023"></a>00023
|
|
43 |
<a name="l00024"></a>00024 <span class="keyword">from</span> gnosis.xml.pickle <span class="keyword">import</span> *
|
|
44 |
<a name="l00025"></a>00025 <span class="keyword">from</span> gnosis.xml.pickle.util <span class="keyword">import</span> setParanoia
|
|
45 |
<a name="l00026"></a>00026 setParanoia(0)
|
|
46 |
<a name="l00027"></a>00027
|
|
47 |
<a name="l00028"></a>00028 <span class="keyword">from</span> node <span class="keyword">import</span> *
|
|
48 |
<a name="l00029"></a>00029 <span class="keyword">import</span> eds_utils
|
|
49 |
<a name="l00030"></a>00030 <span class="keyword">import</span> os, shutil
|
|
50 |
<a name="l00031"></a>00031
|
|
51 |
<a name="l00032"></a>00032 <span class="comment">#-------------------------------------------------------------------------------</span>
|
|
52 |
<a name="l00033"></a>00033 <span class="comment"># Definition of NodeList Object</span>
|
|
53 |
<a name="l00034"></a>00034 <span class="comment">#-------------------------------------------------------------------------------</span>
|
|
54 |
<a name="l00035"></a>00035
|
|
55 |
<a name="l00036"></a>00036 <span class="stringliteral">"""</span>
|
|
56 |
<a name="l00037"></a>00037 <span class="stringliteral">Class recording a node list for a CANOpen network.</span>
|
|
57 |
<a name="l00038"></a>00038 <span class="stringliteral">"""</span>
|
|
58 |
<a name="l00039"></a>00039
|
|
59 |
<a name="l00040"></a><a class="code" href="classnodelist_1_1NodeList.html">00040</a> <span class="keyword">class </span><a class="code" href="classnodelist_1_1NodeList.html">NodeList</a>:
|
|
60 |
<a name="l00041"></a>00041
|
|
61 |
<a name="l00042"></a><a class="code" href="classnodelist_1_1NodeList.html#c6e80d9c4b17421a74aae47e39e22ffb">00042</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#c6e80d9c4b17421a74aae47e39e22ffb">__init__</a>(self, manager):
|
|
62 |
<a name="l00043"></a><a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">00043</a> self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root = <span class="stringliteral">""</span>
|
|
63 |
<a name="l00044"></a><a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">00044</a> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager = manager
|
|
64 |
<a name="l00045"></a><a class="code" href="classnodelist_1_1NodeList.html#267d8efe86849209ff37f59598efcceb">00045</a> self.<a class="code" href="classnodelist_1_1NodeList.html#267d8efe86849209ff37f59598efcceb">NetworkName</a>NetworkName = <span class="stringliteral">""</span>
|
|
65 |
<a name="l00046"></a><a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">00046</a> self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes = {}
|
|
66 |
<a name="l00047"></a><a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">00047</a> self.<a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">EDSNodes</a>EDSNodes = {}
|
|
67 |
<a name="l00048"></a><a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">00048</a> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected = <span class="keywordtype">None</span>
|
|
68 |
<a name="l00049"></a>00049
|
|
69 |
<a name="l00050"></a><a class="code" href="classnodelist_1_1NodeList.html#f251a2599ab39f05f72debe9194ef730">00050</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#f251a2599ab39f05f72debe9194ef730">GetNetworkName</a>(self):
|
|
70 |
<a name="l00051"></a>00051 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#267d8efe86849209ff37f59598efcceb">NetworkName</a>NetworkName
|
|
71 |
<a name="l00052"></a>00052
|
|
72 |
<a name="l00053"></a><a class="code" href="classnodelist_1_1NodeList.html#9d82bcfef0a88d2c9135cf5a8e2ff047">00053</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#9d82bcfef0a88d2c9135cf5a8e2ff047">SetNetworkName</a>(self, name):
|
|
73 |
<a name="l00054"></a>00054 self.<a class="code" href="classnodelist_1_1NodeList.html#267d8efe86849209ff37f59598efcceb">NetworkName</a>NetworkName = name
|
|
74 |
<a name="l00055"></a>00055
|
|
75 |
<a name="l00056"></a><a class="code" href="classnodelist_1_1NodeList.html#1b2aa331c3a0f257629450ffbb658714">00056</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#1b2aa331c3a0f257629450ffbb658714">GetManager</a>(self):
|
|
76 |
<a name="l00057"></a>00057 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager
|
|
77 |
<a name="l00058"></a>00058
|
|
78 |
<a name="l00059"></a><a class="code" href="classnodelist_1_1NodeList.html#5660c96280f53eb22d49ae3ef87857b5">00059</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#5660c96280f53eb22d49ae3ef87857b5">GetRoot</a>(self):
|
|
79 |
<a name="l00060"></a>00060 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root
|
|
80 |
<a name="l00061"></a>00061
|
|
81 |
<a name="l00062"></a><a class="code" href="classnodelist_1_1NodeList.html#88204b493bfb5af7a4106f79ce65e377">00062</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#88204b493bfb5af7a4106f79ce65e377">GetSlaveNumber</a>(self):
|
|
82 |
<a name="l00063"></a>00063 <span class="keywordflow">return</span> len(self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes)
|
|
83 |
<a name="l00064"></a>00064
|
|
84 |
<a name="l00065"></a><a class="code" href="classnodelist_1_1NodeList.html#ae2a228b04ac23eced9749346e06cf09">00065</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#ae2a228b04ac23eced9749346e06cf09">GetSlaveNames</a>(self):
|
|
85 |
<a name="l00066"></a>00066 nodes = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys()
|
|
86 |
<a name="l00067"></a>00067 nodes.sort()
|
|
87 |
<a name="l00068"></a>00068 <span class="keywordflow">return</span> [<span class="stringliteral">"0x%2.2X %s"</span>%(idx, self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[idx][<span class="stringliteral">"Name"</span>]) <span class="keywordflow">for</span> idx <span class="keywordflow">in</span> nodes]
|
|
88 |
<a name="l00069"></a>00069
|
|
89 |
<a name="l00070"></a><a class="code" href="classnodelist_1_1NodeList.html#e95b562c7c695ea8c2a3dee38b7c4ef2">00070</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#e95b562c7c695ea8c2a3dee38b7c4ef2">GetSlaveIDs</a>(self):
|
|
90 |
<a name="l00071"></a>00071 nodes = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys()
|
|
91 |
<a name="l00072"></a>00072 nodes.sort()
|
|
92 |
<a name="l00073"></a>00073 <span class="keywordflow">return</span> nodes
|
|
93 |
<a name="l00074"></a>00074
|
|
94 |
<a name="l00075"></a><a class="code" href="classnodelist_1_1NodeList.html#007fad3e7173fb04f35df65d93690c19">00075</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#007fad3e7173fb04f35df65d93690c19">SetCurrentSelected</a>(self, selected):
|
|
95 |
<a name="l00076"></a>00076 self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected = selected
|
|
96 |
<a name="l00077"></a>00077
|
|
97 |
<a name="l00078"></a><a class="code" href="classnodelist_1_1NodeList.html#31139aa84f679ccd6b60c0d2e291cead">00078</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#31139aa84f679ccd6b60c0d2e291cead">GetCurrentSelected</a>(self):
|
|
98 |
<a name="l00079"></a>00079 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected
|
|
99 |
<a name="l00080"></a>00080
|
|
100 |
<a name="l00081"></a><a class="code" href="classnodelist_1_1NodeList.html#e0c626e2b7b68c2497f77b822b6fa88f">00081</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#e0c626e2b7b68c2497f77b822b6fa88f">LoadProject</a>(self, root):
|
|
101 |
<a name="l00082"></a>00082 self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes = {}
|
|
102 |
<a name="l00083"></a>00083 self.<a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">EDSNodes</a>EDSNodes = {}
|
|
103 |
<a name="l00084"></a>00084
|
|
104 |
<a name="l00085"></a>00085 self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root = root
|
|
105 |
<a name="l00086"></a>00086 <span class="keywordflow">if</span> <span class="keywordflow">not</span> os.path.exists(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root):
|
|
106 |
<a name="l00087"></a>00087 <span class="keywordflow">return</span> <span class="stringliteral">"\"%s\" folder doesn't exist"</span>%self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root
|
|
107 |
<a name="l00088"></a>00088
|
|
108 |
<a name="l00089"></a><a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">00089</a> self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root, <span class="stringliteral">"eds"</span>)
|
|
109 |
<a name="l00090"></a>00090 <span class="keywordflow">if</span> <span class="keywordflow">not</span> os.path.exists(self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder):
|
|
110 |
<a name="l00091"></a>00091 <span class="keywordflow">return</span> <span class="stringliteral">"\"%s\" folder doesn't contain a \"eds\" folder"</span>%self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root
|
|
111 |
<a name="l00092"></a>00092
|
|
112 |
<a name="l00093"></a>00093 files = os.listdir(self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder)
|
|
113 |
<a name="l00094"></a>00094 <span class="keywordflow">for</span> file <span class="keywordflow">in</span> files:
|
|
114 |
<a name="l00095"></a>00095 result = self.<a class="code" href="classnodelist_1_1NodeList.html#88cdff50bbef6974b09880f5dd772a26">LoadEDS</a>LoadEDS(file)
|
|
115 |
<a name="l00096"></a>00096 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
116 |
<a name="l00097"></a>00097 <span class="keywordflow">return</span> result
|
|
117 |
<a name="l00098"></a>00098
|
|
118 |
<a name="l00099"></a>00099 result = self.<a class="code" href="classnodelist_1_1NodeList.html#ff252235b084983f34a6f1455e1ee2a2">LoadMasterNode</a>LoadMasterNode()
|
|
119 |
<a name="l00100"></a>00100 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
120 |
<a name="l00101"></a>00101 <span class="keywordflow">return</span> result
|
|
121 |
<a name="l00102"></a>00102
|
|
122 |
<a name="l00103"></a>00103 result = self.<a class="code" href="classnodelist_1_1NodeList.html#d0b1264363626cc954199e3fa572620a">LoadSlaveNodes</a>LoadSlaveNodes()
|
|
123 |
<a name="l00104"></a>00104 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
124 |
<a name="l00105"></a>00105 <span class="keywordflow">return</span> result
|
|
125 |
<a name="l00106"></a>00106
|
|
126 |
<a name="l00107"></a><a class="code" href="classnodelist_1_1NodeList.html#b90b33e930a1d08ad4bb81f912c30a68">00107</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#b90b33e930a1d08ad4bb81f912c30a68">SaveProject</a>(self):
|
|
127 |
<a name="l00108"></a>00108 result = self.<a class="code" href="classnodelist_1_1NodeList.html#d297a4f5ea828c7a56592ffa23ed9913">SaveMasterNode</a>SaveMasterNode()
|
|
128 |
<a name="l00109"></a>00109 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
129 |
<a name="l00110"></a>00110 <span class="keywordflow">return</span> result
|
|
130 |
<a name="l00111"></a>00111
|
|
131 |
<a name="l00112"></a>00112 result = self.<a class="code" href="classnodelist_1_1NodeList.html#b68284c7742c05364af484bbc0b162e6">SaveNodeList</a>SaveNodeList()
|
|
132 |
<a name="l00113"></a>00113 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
133 |
<a name="l00114"></a>00114 <span class="keywordflow">return</span> result
|
|
134 |
<a name="l00115"></a>00115
|
|
135 |
<a name="l00116"></a><a class="code" href="classnodelist_1_1NodeList.html#2bf9abf09b0dd06a8801b9e23f6387cb">00116</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#2bf9abf09b0dd06a8801b9e23f6387cb">ImportEDSFile</a>(self, edspath):
|
|
136 |
<a name="l00117"></a>00117 dir, file = os.path.split(edspath)
|
|
137 |
<a name="l00118"></a>00118 eds = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder, file)
|
|
138 |
<a name="l00119"></a>00119 <span class="keywordflow">if</span> os.path.isfile(eds):
|
|
139 |
<a name="l00120"></a>00120 <span class="keywordflow">return</span> <span class="stringliteral">"EDS file already imported"</span>
|
|
140 |
<a name="l00121"></a>00121 <span class="keywordflow">else</span>:
|
|
141 |
<a name="l00122"></a>00122 shutil.copy(edspath, self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder)
|
|
142 |
<a name="l00123"></a>00123 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#88cdff50bbef6974b09880f5dd772a26">LoadEDS</a>LoadEDS(file)
|
|
143 |
<a name="l00124"></a>00124
|
|
144 |
<a name="l00125"></a><a class="code" href="classnodelist_1_1NodeList.html#88cdff50bbef6974b09880f5dd772a26">00125</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#88cdff50bbef6974b09880f5dd772a26">LoadEDS</a>(self, eds):
|
|
145 |
<a name="l00126"></a>00126 edspath = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#85d003455c6b3c98bec4e8602acd3fe0">EDSFolder</a>EDSFolder, eds)
|
|
146 |
<a name="l00127"></a>00127 node = eds_utils.GenerateNode(edspath, self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.ScriptDirectory)
|
|
147 |
<a name="l00128"></a>00128 <span class="keywordflow">if</span> isinstance(node, Node):
|
|
148 |
<a name="l00129"></a>00129 self.<a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">EDSNodes</a>EDSNodes[eds] = node
|
|
149 |
<a name="l00130"></a>00130 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
150 |
<a name="l00131"></a>00131 <span class="keywordflow">else</span>:
|
|
151 |
<a name="l00132"></a>00132 <span class="keywordflow">return</span> node
|
|
152 |
<a name="l00133"></a>00133
|
|
153 |
<a name="l00134"></a><a class="code" href="classnodelist_1_1NodeList.html#4eec8b1c1d88c4806f470f8afcc53e10">00134</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#4eec8b1c1d88c4806f470f8afcc53e10">AddSlaveNode</a>(self, nodeName, nodeID, eds):
|
|
154 |
<a name="l00135"></a>00135 <span class="keywordflow">if</span> eds <span class="keywordflow">in</span> self.<a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">EDSNodes</a>EDSNodes.keys():
|
|
155 |
<a name="l00136"></a>00136 slave = {<span class="stringliteral">"Name"</span> : nodeName, <span class="stringliteral">"EDS"</span> : eds, <span class="stringliteral">"Node"</span> : self.<a class="code" href="classnodelist_1_1NodeList.html#eb7afd07a98f688686ccc351404978d3">EDSNodes</a>EDSNodes[eds]}
|
|
156 |
<a name="l00137"></a>00137 self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[nodeID] = slave
|
|
157 |
<a name="l00138"></a>00138 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
158 |
<a name="l00139"></a>00139 <span class="keywordflow">else</span>:
|
|
159 |
<a name="l00140"></a>00140 <span class="keywordflow">return</span> <span class="stringliteral">"\"%s\" EDS file is not available"</span>%eds
|
|
160 |
<a name="l00141"></a>00141
|
|
161 |
<a name="l00142"></a><a class="code" href="classnodelist_1_1NodeList.html#4a54d5c47f48af8060e1b7e0a8a52f6d">00142</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#4a54d5c47f48af8060e1b7e0a8a52f6d">RemoveSlaveNode</a>(self, index):
|
|
162 |
<a name="l00143"></a>00143 <span class="keywordflow">if</span> index <span class="keywordflow">in</span> self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys():
|
|
163 |
<a name="l00144"></a>00144 self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.pop(index)
|
|
164 |
<a name="l00145"></a>00145 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
165 |
<a name="l00146"></a>00146 <span class="keywordflow">else</span>:
|
|
166 |
<a name="l00147"></a>00147 <span class="keywordflow">return</span> <span class="stringliteral">"Node with \"0x%2.2X\" ID doesn't exist"</span>
|
|
167 |
<a name="l00148"></a>00148
|
|
168 |
<a name="l00149"></a><a class="code" href="classnodelist_1_1NodeList.html#ff252235b084983f34a6f1455e1ee2a2">00149</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#ff252235b084983f34a6f1455e1ee2a2">LoadMasterNode</a>(self):
|
|
169 |
<a name="l00150"></a>00150 masterpath = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root, <span class="stringliteral">"master.od"</span>)
|
|
170 |
<a name="l00151"></a>00151 <span class="keywordflow">if</span> os.path.isfile(masterpath):
|
|
171 |
<a name="l00152"></a>00152 self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.OpenFileInCurrent(masterpath)
|
|
172 |
<a name="l00153"></a>00153 <span class="keywordflow">else</span>:
|
|
173 |
<a name="l00154"></a>00154 self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.CreateNewNode(<span class="stringliteral">"MasterNode"</span>, 0x00, <span class="stringliteral">"master"</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"None"</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"heartbeat"</span>, [<span class="stringliteral">"DS302"</span>])
|
|
174 |
<a name="l00155"></a>00155 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
175 |
<a name="l00156"></a>00156
|
|
176 |
<a name="l00157"></a><a class="code" href="classnodelist_1_1NodeList.html#d297a4f5ea828c7a56592ffa23ed9913">00157</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#d297a4f5ea828c7a56592ffa23ed9913">SaveMasterNode</a>(self):
|
|
177 |
<a name="l00158"></a>00158 masterpath = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root, <span class="stringliteral">"master.od"</span>)
|
|
178 |
<a name="l00159"></a>00159 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.SaveCurrentInFile(masterpath):
|
|
179 |
<a name="l00160"></a>00160 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
180 |
<a name="l00161"></a>00161 <span class="keywordflow">else</span>:
|
|
181 |
<a name="l00162"></a>00162 <span class="keywordflow">return</span> <span class="stringliteral">"Fail to save Master Node"</span>
|
|
182 |
<a name="l00163"></a>00163
|
|
183 |
<a name="l00164"></a><a class="code" href="classnodelist_1_1NodeList.html#d0b1264363626cc954199e3fa572620a">00164</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#d0b1264363626cc954199e3fa572620a">LoadSlaveNodes</a>(self):
|
|
184 |
<a name="l00165"></a>00165 cpjpath = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root, <span class="stringliteral">"nodelist.cpj"</span>)
|
|
185 |
<a name="l00166"></a>00166 <span class="keywordflow">if</span> os.path.isfile(cpjpath):
|
|
186 |
<a name="l00167"></a>00167 <span class="keywordflow">try</span>:
|
|
187 |
<a name="l00168"></a>00168 networks = eds_utils.ParseCPJFile(cpjpath)
|
|
188 |
<a name="l00169"></a>00169 <span class="keywordflow">if</span> len(networks) > 0:
|
|
189 |
<a name="l00170"></a>00170 self.<a class="code" href="classnodelist_1_1NodeList.html#267d8efe86849209ff37f59598efcceb">NetworkName</a>NetworkName = networks[0][<span class="stringliteral">"Name"</span>]
|
|
190 |
<a name="l00171"></a>00171 <span class="keywordflow">for</span> nodeid, node <span class="keywordflow">in</span> networks[0][<span class="stringliteral">"Nodes"</span>].items():
|
|
191 |
<a name="l00172"></a>00172 <span class="keywordflow">if</span> node[<span class="stringliteral">"Present"</span>] == 1:
|
|
192 |
<a name="l00173"></a>00173 result = self.<a class="code" href="classnodelist_1_1NodeList.html#4eec8b1c1d88c4806f470f8afcc53e10">AddSlaveNode</a>AddSlaveNode(node[<span class="stringliteral">"Name"</span>], nodeid, node[<span class="stringliteral">"DCFName"</span>])
|
|
193 |
<a name="l00174"></a>00174 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
194 |
<a name="l00175"></a>00175 <span class="keywordflow">return</span> result
|
|
195 |
<a name="l00176"></a>00176 <span class="keywordflow">except</span> SyntaxError, message:
|
|
196 |
<a name="l00177"></a>00177 <span class="keywordflow">return</span> <span class="stringliteral">"Unable to load CPJ file\n%s"</span>%message
|
|
197 |
<a name="l00178"></a>00178 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
198 |
<a name="l00179"></a>00179
|
|
199 |
<a name="l00180"></a><a class="code" href="classnodelist_1_1NodeList.html#b68284c7742c05364af484bbc0b162e6">00180</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#b68284c7742c05364af484bbc0b162e6">SaveNodeList</a>(self):
|
|
200 |
<a name="l00181"></a>00181 cpjpath = os.path.join(self.<a class="code" href="classnodelist_1_1NodeList.html#b2f15765f2bd7a7bc5038102e491e87c">Root</a>Root, <span class="stringliteral">"nodelist.cpj"</span>)
|
|
201 |
<a name="l00182"></a>00182 content = eds_utils.GenerateCPJContent(self)
|
|
202 |
<a name="l00183"></a>00183 file = open(cpjpath, <span class="stringliteral">"w"</span>)
|
|
203 |
<a name="l00184"></a>00184 file.write(content)
|
|
204 |
<a name="l00185"></a>00185 file.close()
|
|
205 |
<a name="l00186"></a>00186
|
|
206 |
<a name="l00187"></a><a class="code" href="classnodelist_1_1NodeList.html#305f512d69651d134aaa585e4aed94b8">00187</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#305f512d69651d134aaa585e4aed94b8">GetSlaveNodeEntry</a>(self, nodeid, index, subindex = None):
|
|
207 |
<a name="l00188"></a>00188 <span class="keywordflow">if</span> nodeid <span class="keywordflow">in</span> self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys():
|
|
208 |
<a name="l00189"></a>00189 self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[nodeid][<span class="stringliteral">"Node"</span>].SetNodeID(nodeid)
|
|
209 |
<a name="l00190"></a>00190 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[nodeid][<span class="stringliteral">"Node"</span>].GetEntry(index, subindex)
|
|
210 |
<a name="l00191"></a>00191 <span class="keywordflow">else</span>:
|
|
211 |
<a name="l00192"></a>00192 <span class="keywordflow">return</span> <span class="stringliteral">"Node 0x%2.2X doesn't exist"</span>%nodeid
|
|
212 |
<a name="l00193"></a>00193
|
|
213 |
<a name="l00194"></a><a class="code" href="classnodelist_1_1NodeList.html#d3fd973b32423384bc36ddb0cb54c632">00194</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#d3fd973b32423384bc36ddb0cb54c632">GetMasterNodeEntry</a>(self, index, subindex = None):
|
|
214 |
<a name="l00195"></a>00195 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.GetCurrentEntry(index, subindex)
|
|
215 |
<a name="l00196"></a>00196
|
|
216 |
<a name="l00197"></a><a class="code" href="classnodelist_1_1NodeList.html#cc92822b3c2879ac7df9d0b2f39d4647">00197</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#cc92822b3c2879ac7df9d0b2f39d4647">SetMasterNodeEntry</a>(self, index, subindex = None, value = None):
|
|
217 |
<a name="l00198"></a>00198 self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.SetCurrentEntry(index, subindex, value)
|
|
218 |
<a name="l00199"></a>00199
|
|
219 |
<a name="l00200"></a><a class="code" href="classnodelist_1_1NodeList.html#f8812726aa6302532b6c13a2719b1258">00200</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#f8812726aa6302532b6c13a2719b1258">GetOrderNumber</a>(self, nodeid):
|
|
220 |
<a name="l00201"></a>00201 nodeindexes = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys()
|
|
221 |
<a name="l00202"></a>00202 nodeindexes.sort()
|
|
222 |
<a name="l00203"></a>00203 <span class="keywordflow">return</span> nodeindexes.index(nodeid) + 1
|
|
223 |
<a name="l00204"></a>00204
|
|
224 |
<a name="l00205"></a><a class="code" href="classnodelist_1_1NodeList.html#abd3493e147587b88b12e4a6ac7f54e0">00205</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#abd3493e147587b88b12e4a6ac7f54e0">GetNodeByOrder</a>(self, order):
|
|
225 |
<a name="l00206"></a>00206 <span class="keywordflow">if</span> order > 0:
|
|
226 |
<a name="l00207"></a>00207 nodeindexes = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes.keys()
|
|
227 |
<a name="l00208"></a>00208 nodeindexes.sort()
|
|
228 |
<a name="l00209"></a>00209 <span class="keywordflow">print</span> nodeindexes
|
|
229 |
<a name="l00210"></a>00210 <span class="keywordflow">if</span> order <= len(nodeindexes):
|
|
230 |
<a name="l00211"></a>00211 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[nodeindexes[order - 1]][<span class="stringliteral">"Node"</span>]
|
|
231 |
<a name="l00212"></a>00212 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
232 |
<a name="l00213"></a>00213
|
|
233 |
<a name="l00214"></a><a class="code" href="classnodelist_1_1NodeList.html#c44eb93f2e274ab9e3f47380d71d4aef">00214</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#c44eb93f2e274ab9e3f47380d71d4aef">IsCurrentEntry</a>(self, index):
|
|
234 |
<a name="l00215"></a>00215 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected != <span class="keywordtype">None</span>:
|
|
235 |
<a name="l00216"></a>00216 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected == 0:
|
|
236 |
<a name="l00217"></a>00217 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.IsCurrentEntry(index)
|
|
237 |
<a name="l00218"></a>00218 <span class="keywordflow">else</span>:
|
|
238 |
<a name="l00219"></a>00219 node = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected][<span class="stringliteral">"Node"</span>]
|
|
239 |
<a name="l00220"></a>00220 <span class="keywordflow">if</span> node:
|
|
240 |
<a name="l00221"></a>00221 <span class="keywordflow">return</span> node.IsEntry(index)
|
|
241 |
<a name="l00222"></a>00222 <span class="keywordflow">return</span> <span class="keyword">False</span>
|
|
242 |
<a name="l00223"></a>00223
|
|
243 |
<a name="l00224"></a><a class="code" href="classnodelist_1_1NodeList.html#04ede866c9b3431700c7ff4dd87fc67c">00224</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#04ede866c9b3431700c7ff4dd87fc67c">GetEntryInfos</a>(self, index):
|
|
244 |
<a name="l00225"></a>00225 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected != <span class="keywordtype">None</span>:
|
|
245 |
<a name="l00226"></a>00226 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected == 0:
|
|
246 |
<a name="l00227"></a>00227 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.GetEntryInfos(index)
|
|
247 |
<a name="l00228"></a>00228 <span class="keywordflow">else</span>:
|
|
248 |
<a name="l00229"></a>00229 node = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected][<span class="stringliteral">"Node"</span>]
|
|
249 |
<a name="l00230"></a>00230 <span class="keywordflow">if</span> node:
|
|
250 |
<a name="l00231"></a>00231 <span class="keywordflow">return</span> node.GetEntryInfos(index)
|
|
251 |
<a name="l00232"></a>00232 <span class="keywordflow">return</span> <span class="keywordtype">None</span>
|
|
252 |
<a name="l00233"></a>00233
|
|
253 |
<a name="l00234"></a><a class="code" href="classnodelist_1_1NodeList.html#e98e03e88809cf1dec3c4dc3c8921c99">00234</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#e98e03e88809cf1dec3c4dc3c8921c99">GetCurrentValidIndexes</a>(self, min, max):
|
|
254 |
<a name="l00235"></a>00235 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected != <span class="keywordtype">None</span>:
|
|
255 |
<a name="l00236"></a>00236 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected == 0:
|
|
256 |
<a name="l00237"></a>00237 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.GetCurrentValidIndexes(min, max)
|
|
257 |
<a name="l00238"></a>00238 <span class="keywordflow">else</span>:
|
|
258 |
<a name="l00239"></a>00239 node = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected][<span class="stringliteral">"Node"</span>]
|
|
259 |
<a name="l00240"></a>00240 <span class="keywordflow">if</span> node:
|
|
260 |
<a name="l00241"></a>00241 validindexes = []
|
|
261 |
<a name="l00242"></a>00242 <span class="keywordflow">for</span> index <span class="keywordflow">in</span> node.GetIndexes():
|
|
262 |
<a name="l00243"></a>00243 <span class="keywordflow">if</span> min <= index <= max:
|
|
263 |
<a name="l00244"></a>00244 validindexes.append((node.GetEntryName(index), index))
|
|
264 |
<a name="l00245"></a>00245 <span class="keywordflow">return</span> validindexes
|
|
265 |
<a name="l00246"></a>00246 <span class="keywordflow">else</span>:
|
|
266 |
<a name="l00247"></a>00247 <span class="keywordflow">print</span> <span class="stringliteral">"Can't find node"</span>
|
|
267 |
<a name="l00248"></a>00248 <span class="keywordflow">return</span> []
|
|
268 |
<a name="l00249"></a>00249
|
|
269 |
<a name="l00250"></a><a class="code" href="classnodelist_1_1NodeList.html#005f913bbbfe322fde2aaef4a1521843">00250</a> <span class="keyword">def </span><a class="code" href="classnodelist_1_1NodeList.html#005f913bbbfe322fde2aaef4a1521843">GetCurrentEntryValues</a>(self, index):
|
|
270 |
<a name="l00251"></a>00251 <span class="keywordflow">if</span> self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected != <span class="keywordtype">None</span>:
|
|
271 |
<a name="l00252"></a>00252 node = self.<a class="code" href="classnodelist_1_1NodeList.html#88dcdfc5e77e070b9f372591c5b3143a">SlaveNodes</a>SlaveNodes[self.<a class="code" href="classnodelist_1_1NodeList.html#c908dab8139683805e6d3816d84a4b9b">CurrentSelected</a>CurrentSelected][<span class="stringliteral">"Node"</span>]
|
|
272 |
<a name="l00253"></a>00253 <span class="keywordflow">if</span> node:
|
|
273 |
<a name="l00254"></a>00254 <span class="keywordflow">return</span> self.<a class="code" href="classnodelist_1_1NodeList.html#629a8a12f02ae1f7d02d0ef7bb0afcbf">Manager</a>Manager.GetNodeEntryValues(node, index)
|
|
274 |
<a name="l00255"></a>00255 <span class="keywordflow">else</span>:
|
|
275 |
<a name="l00256"></a>00256 <span class="keywordflow">print</span> <span class="stringliteral">"Can't find node"</span>
|
|
276 |
<a name="l00257"></a>00257 <span class="keywordflow">return</span> [], []
|
|
277 |
<a name="l00258"></a>00258
|
|
278 |
<a name="l00259"></a>00259 <span class="keywordflow">if</span> __name__ == <span class="stringliteral">"__main__"</span>:
|
|
279 |
<a name="l00260"></a>00260 <span class="keyword">from</span> nodemanager <span class="keyword">import</span> *
|
|
280 |
<a name="l00261"></a>00261 <span class="keyword">import</span> os, sys, shutil
|
|
281 |
<a name="l00262"></a>00262
|
|
282 |
<a name="l00263"></a>00263 manager = NodeManager(sys.path[0])
|
|
283 |
<a name="l00264"></a>00264
|
|
284 |
<a name="l00265"></a>00265 nodelist = NodeList(manager)
|
|
285 |
<a name="l00266"></a>00266
|
|
286 |
<a name="l00267"></a>00267 result = nodelist.LoadProject(<span class="stringliteral">"/home/laurent/test_nodelist"</span>)
|
|
287 |
<a name="l00268"></a>00268 <span class="keywordflow">if</span> result != <span class="keywordtype">None</span>:
|
|
288 |
<a name="l00269"></a>00269 <span class="keywordflow">print</span> result
|
|
289 |
<a name="l00270"></a>00270 <span class="keywordflow">else</span>:
|
|
290 |
<a name="l00271"></a>00271 <span class="keywordflow">print</span> <span class="stringliteral">"MasterNode :"</span>
|
|
291 |
<a name="l00272"></a>00272 manager.CurrentNode.Print()
|
|
292 |
<a name="l00273"></a>00273 <span class="keywordflow">print</span>
|
|
293 |
<a name="l00274"></a>00274 <span class="keywordflow">for</span> nodeid, node <span class="keywordflow">in</span> nodelist.SlaveNodes.items():
|
|
294 |
<a name="l00275"></a>00275 <span class="keywordflow">print</span> <span class="stringliteral">"SlaveNode name=%s id=0x%2.2X :"</span>%(node[<span class="stringliteral">"Name"</span>], nodeid)
|
|
295 |
<a name="l00276"></a>00276 node[<span class="stringliteral">"Node"</span>].Print()
|
|
296 |
<a name="l00277"></a>00277 <span class="keywordflow">print</span>
|
|
297 |
<a name="l00278"></a>00278
|
|
298 |
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:06 2007 for CanFestival by
|
|
299 |
<a href="http://www.doxygen.org/index.html">
|
|
300 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
|
|
301 |
</body>
|
|
302 |
</html>
|