1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml">
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 <title>nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication — NEPI 3.2 documentation</title>
11 <link rel="stylesheet" href="../../../../../../_static/sphinxdoc.css" type="text/css" />
12 <link rel="stylesheet" href="../../../../../../_static/pygments.css" type="text/css" />
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: '../../../../../../',
18 COLLAPSE_INDEX: false,
23 <script type="text/javascript" src="../../../../../../_static/jquery.js"></script>
24 <script type="text/javascript" src="../../../../../../_static/underscore.js"></script>
25 <script type="text/javascript" src="../../../../../../_static/doctools.js"></script>
26 <link rel="top" title="NEPI 3.2 documentation" href="../../../../../../index.html" />
27 <link rel="up" title="Module code" href="../../../../../index.html" />
33 <li class="right" style="margin-right: 10px">
34 <a href="../../../../../../genindex.html" title="General Index"
35 accesskey="I">index</a></li>
37 <a href="../../../../../../py-modindex.html" title="Python Module Index"
39 <li><a href="../../../../../../index.html">NEPI 3.2 documentation</a> »</li>
40 <li><a href="../../../../../index.html" accesskey="U">Module code</a> »</li>
43 <div class="sphinxsidebar">
44 <div class="sphinxsidebarwrapper">
45 <div id="searchbox" style="display: none">
47 <form class="search" action="../../../../../../search.html" method="get">
48 <input type="text" name="q" />
49 <input type="submit" value="Go" />
50 <input type="hidden" name="check_keywords" value="yes" />
51 <input type="hidden" name="area" value="default" />
53 <p class="searchtip" style="font-size: 90%">
54 Enter search terms or a module, class or function name.
57 <script type="text/javascript">$('#searchbox').show(0);</script>
61 <div class="document">
62 <div class="documentwrapper">
63 <div class="bodywrapper">
66 <h1>Source code for nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication</h1><div class="highlight"><pre>
67 <span class="c">#</span>
68 <span class="c"># NEPI, a framework to manage network experiments</span>
69 <span class="c"># Copyright (C) 2014 INRIA</span>
70 <span class="c">#</span>
71 <span class="c"># This program is free software: you can redistribute it and/or modify</span>
72 <span class="c"># it under the terms of the GNU General Public License version 2 as</span>
73 <span class="c"># published by the Free Software Foundation;</span>
74 <span class="c">#</span>
75 <span class="c"># This program is distributed in the hope that it will be useful,</span>
76 <span class="c"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
77 <span class="c"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
78 <span class="c"># GNU General Public License for more details.</span>
79 <span class="c">#</span>
80 <span class="c"># You should have received a copy of the GNU General Public License</span>
81 <span class="c"># along with this program. If not, see <http://www.gnu.org/licenses/>.</span>
82 <span class="c">#</span>
83 <span class="c"># Author: Alina Quereilhac <alina.quereilhac@inria.fr></span>
85 <span class="kn">from</span> <span class="nn">nepi.execution.attribute</span> <span class="kn">import</span> <span class="n">Attribute</span><span class="p">,</span> <span class="n">Flags</span><span class="p">,</span> <span class="n">Types</span>
86 <span class="kn">from</span> <span class="nn">nepi.execution.resource</span> <span class="kn">import</span> <span class="n">clsinit_copy</span><span class="p">,</span> <span class="n">ResourceState</span>
87 <span class="kn">from</span> <span class="nn">nepi.resources.linux.ns3.ccn.ns3ccndceapplication</span> <span class="kn">import</span> <span class="n">LinuxNS3CCNDceApplication</span>
89 <span class="nd">@clsinit_copy</span>
90 <div class="viewcode-block" id="LinuxNS3DceCCNPeek"><a class="viewcode-back" href="../../../../../../_layout/nepi.resources.linux.ns3.ccn.html#nepi.resources.linux.ns3.ccn.ns3ccnpeekdceapplication.LinuxNS3DceCCNPeek">[docs]</a><span class="k">class</span> <span class="nc">LinuxNS3DceCCNPeek</span><span class="p">(</span><span class="n">LinuxNS3CCNDceApplication</span><span class="p">):</span>
91 <span class="n">_rtype</span> <span class="o">=</span> <span class="s">"linux::ns3::dce::CCNPeek"</span>
93 <span class="nd">@classmethod</span>
94 <span class="k">def</span> <span class="nf">_register_attributes</span><span class="p">(</span><span class="n">cls</span><span class="p">):</span>
95 <span class="n">content_name</span> <span class="o">=</span> <span class="n">Attribute</span><span class="p">(</span><span class="s">"contentName"</span><span class="p">,</span>
96 <span class="s">"Content name for the requested content object. "</span><span class="p">,</span>
97 <span class="n">flags</span> <span class="o">=</span> <span class="n">Flags</span><span class="o">.</span><span class="n">Design</span><span class="p">)</span>
99 <span class="n">cls</span><span class="o">.</span><span class="n">_register_attribute</span><span class="p">(</span><span class="n">content_name</span><span class="p">)</span>
101 <span class="k">def</span> <span class="nf">_instantiate_object</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
102 <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">"binary"</span><span class="p">):</span>
103 <span class="bp">self</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"binary"</span><span class="p">,</span> <span class="s">"ccnpeek"</span><span class="p">)</span>
105 <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">"contentName"</span><span class="p">):</span>
106 <span class="bp">self</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"arguments"</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">"contentName"</span><span class="p">))</span>
108 <span class="bp">self</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s">"stdinFile"</span><span class="p">,</span> <span class="s">""</span><span class="p">)</span>
110 <span class="nb">super</span><span class="p">(</span><span class="n">LinuxNS3DceCCNPeek</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">_instantiate_object</span><span class="p">()</span>
116 <div class="clearer"></div>
118 <div class="related">
121 <li class="right" style="margin-right: 10px">
122 <a href="../../../../../../genindex.html" title="General Index"
125 <a href="../../../../../../py-modindex.html" title="Python Module Index"
127 <li><a href="../../../../../../index.html">NEPI 3.2 documentation</a> »</li>
128 <li><a href="../../../../../index.html" >Module code</a> »</li>
132 © Copyright 2014, Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino.
133 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.