|
|
@@ -0,0 +1,975 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<!DOCTYPE html>
|
|
|
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
|
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+
|
|
|
+ <title>CBD.CBD module — CBD Simulation Development Kit documentation</title>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
|
|
+ <!-- <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> -->
|
|
|
+ <link rel="stylesheet" href="_static/style.css" type="text/css" />
|
|
|
+ <link rel="index" title="Index" href="genindex.html" />
|
|
|
+ <link rel="search" title="Search" href="search.html" />
|
|
|
+ <link rel="next" title="CBD.CBD2LaTeX module" href="CBD.CBD2LaTeX.html" />
|
|
|
+ <link rel="prev" title="CBD.realtime.threadingTkInter module" href="CBD.realtime.threadingTkInter.html" />
|
|
|
+
|
|
|
+
|
|
|
+ <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
|
|
|
+ <script src="_static/js/googleanalytics.min.js"></script>
|
|
|
+
|
|
|
+ <script src="_static/js/modernizr.min.js"></script>
|
|
|
+
|
|
|
+ <!-- Preload the theme fonts -->
|
|
|
+
|
|
|
+<link rel="preload" href="_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+
|
|
|
+<!-- Preload the katex fonts -->
|
|
|
+
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+<link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
|
+</head>
|
|
|
+
|
|
|
+<div class="container-fluid header-holder tutorials-header" id="header-holder">
|
|
|
+ <div class="container">
|
|
|
+ <div class="header-container">
|
|
|
+ <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
|
|
|
+
|
|
|
+ <div class="main-menu">
|
|
|
+ <ul>
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <div class="ecosystem-dropdown">
|
|
|
+ <a id="dropdownMenuButtonEcosystem" data-toggle="ecosystem-dropdown">
|
|
|
+ Ecosystem
|
|
|
+ </a>
|
|
|
+ <div class="ecosystem-dropdown-menu">
|
|
|
+ <a class="nav-dropdown-item" href="https://alchemy.host">
|
|
|
+ <span class=dropdown-title>Alchemy</span>
|
|
|
+ <p>Experiments logging & visualization</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">
|
|
|
+ <span class=dropdown-title>Catalyst</span>
|
|
|
+ <p>Accelerated deep learning R&D</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">
|
|
|
+ <span class=dropdown-title>Reaction</span>
|
|
|
+ <p>Convenient deep learning models serving</p>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <div class="projects-dropdown">
|
|
|
+ <a id="dropdownMenuButtonProjects" data-toggle="projects-dropdown">
|
|
|
+ Projects
|
|
|
+ </a>
|
|
|
+ <div class="projects-dropdown-menu">
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">
|
|
|
+ <span class=dropdown-title>Codestyle</span>
|
|
|
+ <p>Joint R&D codestyle</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">
|
|
|
+ <span class=dropdown-title>Catalyst.Neuro</span>
|
|
|
+ <p>Catalyst.Team and TReNDS collaborative project</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">
|
|
|
+ <span class=dropdown-title>Classification</span>
|
|
|
+ <p>Image classification pipeline with transfer learning</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">
|
|
|
+ <span class=dropdown-title>Detection</span>
|
|
|
+ <p>Object detection pipeline</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">
|
|
|
+ <span class=dropdown-title>Segmentation</span>
|
|
|
+ <p>Image semantic segmentation pipeline</p>
|
|
|
+ </a>
|
|
|
+ <a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">
|
|
|
+ <span class=dropdown-title>Catalyst.GAN</span>
|
|
|
+ <p>GAN pipelines</p>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <a href="https://github.com/catalyst-team/dl-course">Deep learning course</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+<body class="catalyst-body">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="table-of-contents-link-wrapper">
|
|
|
+ <span>Table of Contents</span>
|
|
|
+ <a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <nav data-toggle="wy-nav-shift" class="catalyst-left-menu" id="catalyst-left-menu">
|
|
|
+ <div class="catalyst-side-scroll">
|
|
|
+ <div class="catalyst-menu catalyst-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
+ <div class="catalyst-left-menu-search">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div role="search">
|
|
|
+ <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
|
|
+ <input type="text" name="q" placeholder="Search Docs" />
|
|
|
+ <input type="hidden" name="check_keywords" value="yes" />
|
|
|
+ <input type="hidden" name="area" value="default" />
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <ul class="current">
|
|
|
+<li class="toctree-l1 current"><a class="reference internal" href="CBD.html">CBD package</a></li>
|
|
|
+</ul>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </nav>
|
|
|
+
|
|
|
+ <div class="catalyst-container">
|
|
|
+ <div class="catalyst-page-level-bar" id="catalyst-page-level-bar">
|
|
|
+ <div class="catalyst-breadcrumbs-wrapper">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
+
|
|
|
+ <ul class="catalyst-breadcrumbs">
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <a href="index.html">
|
|
|
+
|
|
|
+ Docs
|
|
|
+
|
|
|
+ </a> >
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+ <li><a href="CBD.html">CBD package</a> ></li>
|
|
|
+
|
|
|
+ <li>CBD.CBD module</li>
|
|
|
+
|
|
|
+
|
|
|
+ <li class="catalyst-breadcrumbs-aside">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+
|
|
|
+
|
|
|
+</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="catalyst-shortcuts-wrapper" id="catalyst-shortcuts-wrapper">
|
|
|
+ Shortcuts
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <section data-toggle="wy-nav-shift" id="catalyst-content-wrap" class="catalyst-content-wrap">
|
|
|
+ <div class="catalyst-content-left">
|
|
|
+
|
|
|
+ <div class="rst-content">
|
|
|
+
|
|
|
+ <div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
|
+ <article itemprop="articleBody" id="catalyst-article" class="catalyst-article">
|
|
|
+
|
|
|
+ <div class="section" id="module-CBD.CBD">
|
|
|
+<span id="cbd-cbd-module"></span><h1>CBD.CBD module<a class="headerlink" href="#module-CBD.CBD" title="Permalink to this headline">¶</a></h1>
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.InputLink">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">InputLink</code><span class="sig-paren">(</span><em>block</em>, <em>output_port</em><span class="sig-paren">)</span><a class="headerlink" href="#CBD.CBD.InputLink" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></p>
|
|
|
+<dl class="attribute">
|
|
|
+<dt id="CBD.CBD.InputLink.block">
|
|
|
+<code class="descname">block</code><a class="headerlink" href="#CBD.CBD.InputLink.block" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Alias for field number 0</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="attribute">
|
|
|
+<dt id="CBD.CBD.InputLink.output_port">
|
|
|
+<code class="descname">output_port</code><a class="headerlink" href="#CBD.CBD.InputLink.output_port" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Alias for field number 1</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.Signal">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">Signal</code><span class="sig-paren">(</span><em>time</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#CBD.CBD.Signal" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></p>
|
|
|
+<dl class="attribute">
|
|
|
+<dt id="CBD.CBD.Signal.time">
|
|
|
+<code class="descname">time</code><a class="headerlink" href="#CBD.CBD.Signal.time" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Alias for field number 0</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="attribute">
|
|
|
+<dt id="CBD.CBD.Signal.value">
|
|
|
+<code class="descname">value</code><a class="headerlink" href="#CBD.CBD.Signal.value" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Alias for field number 1</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.BaseBlock">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">BaseBlock</code><span class="sig-paren">(</span><em>name</em>, <em>input_ports</em>, <em>output_ports</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
|
|
+<p>A base class for all types of basic blocks</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getBlockName">
|
|
|
+<code class="descname">getBlockName</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getBlockName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getBlockName" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the name of the block.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.setBlockName">
|
|
|
+<code class="descname">setBlockName</code><span class="sig-paren">(</span><em>block_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.setBlockName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.setBlockName" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Sets the name of the block.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>block_name</strong> (<em>str</em>) – The name.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.setParent">
|
|
|
+<code class="descname">setParent</code><span class="sig-paren">(</span><em>parent</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.setParent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.setParent" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Sets the block’s parent.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>parent</strong> (<a class="reference internal" href="#CBD.CBD.CBD" title="CBD.CBD.CBD"><em>CBD</em></a>) – The parent of the block.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getBlockType">
|
|
|
+<code class="descname">getBlockType</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getBlockType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getBlockType" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the type of the block. This is the name of the class.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getLinksIn">
|
|
|
+<code class="descname">getLinksIn</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getLinksIn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getLinksIn" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the inputs of this block.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getOutputNameOfInput">
|
|
|
+<code class="descname">getOutputNameOfInput</code><span class="sig-paren">(</span><em>inputBlock</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getOutputNameOfInput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getOutputNameOfInput" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the name of the output port in the <code class="code docutils literal notranslate"><span class="pre">inputBlock</span></code> that is linked to this block.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>inputBlock</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The block of which the output port must be obtained.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getInputName">
|
|
|
+<code class="descname">getInputName</code><span class="sig-paren">(</span><em>inputBlock</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getInputName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getInputName" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the names of the inputs that are linked to the <code class="code docutils literal notranslate"><span class="pre">inputBlock</span></code>.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>inputBlock</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The block that is linked.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getClock">
|
|
|
+<code class="descname">getClock</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getClock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getClock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the simulation clock. Only works if the block is part of a <a class="reference internal" href="CBD.html#module-CBD" title="CBD"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD</span></code></a> model.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.appendToSignal">
|
|
|
+<code class="descname">appendToSignal</code><span class="sig-paren">(</span><em>value</em>, <em>name_output=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.appendToSignal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.appendToSignal" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Appends the value to the set of obtained signals and links it to the current simulation
|
|
|
+time.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
|
+<li><strong>value</strong> (<em>Any</em>) – The value to append.</li>
|
|
|
+<li><strong>name_output</strong> (<em>str</em>) – The name of the output port. If not set, or <code class="code docutils literal notranslate"><span class="pre">None</span></code>,
|
|
|
+the value of <code class="code docutils literal notranslate"><span class="pre">OUT1</span></code> will be used.</li>
|
|
|
+</ul>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getSignal">
|
|
|
+<code class="descname">getSignal</code><span class="sig-paren">(</span><em>name_output=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getSignal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getSignal" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Obtains the set of signals this block has sent over an output port.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name_output</strong> (<em>str</em>) – The name of the output port. If not set, or <code class="code docutils literal notranslate"><span class="pre">None</span></code>,
|
|
|
+the value of <code class="code docutils literal notranslate"><span class="pre">OUT1</span></code> will be used.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getDependencies">
|
|
|
+<code class="descname">getDependencies</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getDependencies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getDependencies" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Helper function to help the creation of the dependency graph.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The current simulation’s iteration, for which
|
|
|
+the dependency graph must be constructed.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getBlockConnectedToInput">
|
|
|
+<code class="descname">getBlockConnectedToInput</code><span class="sig-paren">(</span><em>input_port</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getBlockConnectedToInput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getBlockConnectedToInput" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Get the block that is connected to a specific input.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>input_port</strong> (<em>str</em>) – The name of the input port.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getInputSignal">
|
|
|
+<code class="descname">getInputSignal</code><span class="sig-paren">(</span><em>curIteration</em>, <em>input_port=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getInputSignal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getInputSignal" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Returns the signal sent out by the input block.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
|
+<li><strong>curIteration</strong> (<em>int</em>) – The iteration at which the signal is obtained.
|
|
|
+When <code class="code docutils literal notranslate"><span class="pre">None</span></code> or <code class="code docutils literal notranslate"><span class="pre">-1</span></code>, the last value
|
|
|
+will be used.</li>
|
|
|
+<li><strong>input_port</strong> (<em>str</em>) – The name of the input port. If omitted, or when
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">None</span></code>, the value of <code class="code docutils literal notranslate"><span class="pre">IN1</span></code> will be used.</li>
|
|
|
+</ul>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.getPath">
|
|
|
+<code class="descname">getPath</code><span class="sig-paren">(</span><em>sep='.'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.getPath"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.getPath" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the path of the current block.
|
|
|
+This includes the paths from its parents. When the block has no parents
|
|
|
+i.e. when it’s the top-level block, the block’s name is returned.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sep</strong> (<em>str</em>) – The separator to use. Defaults to <code class="code docutils literal notranslate"><span class="pre">.</span></code></td>
|
|
|
+</tr>
|
|
|
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The full path as a string.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+<p class="rubric">Examples</p>
|
|
|
+<p>A block called <code class="code docutils literal notranslate"><span class="pre">grandchild</span></code>, which is located in the <code class="code docutils literal notranslate"><span class="pre">child</span></code> CBD,
|
|
|
+that in its turn is located in this CBD has a path of <code class="code docutils literal notranslate"><span class="pre">child.grandchild</span></code>.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.BaseBlock.linkInput">
|
|
|
+<code class="descname">linkInput</code><span class="sig-paren">(</span><em>in_block</em>, <em>name_input=None</em>, <em>name_output='OUT1'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#BaseBlock.linkInput"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.BaseBlock.linkInput" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Links the output of the <code class="code docutils literal notranslate"><span class="pre">from_block</span></code> to the input of the <code class="code docutils literal notranslate"><span class="pre">to_block</span></code>.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
|
+<li><strong>in_block</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The block that must be linked.</li>
|
|
|
+<li><strong>name_input</strong> (<em>str</em>) – The name of the input port. When <code class="code docutils literal notranslate"><span class="pre">None</span></code> or omitted,
|
|
|
+the next input port is used. E.g. if the last port was
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">IN1</span></code>, the input is assumed to be <code class="code docutils literal notranslate"><span class="pre">IN2</span></code>.</li>
|
|
|
+<li><strong>name_output</strong> (<em>str</em>) – The name of the output port. Defaults to <code class="code docutils literal notranslate"><span class="pre">OUT1</span></code>.</li>
|
|
|
+</ul>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.InputPortBlock">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">InputPortBlock</code><span class="sig-paren">(</span><em>block_name</em>, <em>parent</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#InputPortBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.InputPortBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
|
|
|
+<p>The input port of a CBD</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.InputPortBlock.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#InputPortBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.InputPortBlock.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.OutputPortBlock">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">OutputPortBlock</code><span class="sig-paren">(</span><em>block_name</em>, <em>parent</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#OutputPortBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.OutputPortBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
|
|
|
+<p>The output port of a CBD</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.OutputPortBlock.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#OutputPortBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.OutputPortBlock.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.WireBlock">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">WireBlock</code><span class="sig-paren">(</span><em>block_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#WireBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.WireBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
|
|
|
+<p>When a CBD gets flattened, the port blocks will be replaced by a wire block</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.WireBlock.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#WireBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.WireBlock.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.SequenceBlock">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">SequenceBlock</code><span class="sig-paren">(</span><em>block_name</em>, <em>sequence</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#SequenceBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.SequenceBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
|
|
|
+<p>A simple Sequence block: block initializes signal input with given sequence
|
|
|
+Use only for the tests please</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.SequenceBlock.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#SequenceBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.SequenceBlock.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="class">
|
|
|
+<dt id="CBD.CBD.CBD">
|
|
|
+<em class="property">class </em><code class="descclassname">CBD.CBD.</code><code class="descname">CBD</code><span class="sig-paren">(</span><em>block_name</em>, <em>input_ports=None</em>, <em>output_ports=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Bases: <a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
|
|
|
+<p>The CBD class, contains an entire Causal Block Diagram
|
|
|
+Call the run function to simulate the model.</p>
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.getTopCBD">
|
|
|
+<code class="descname">getTopCBD</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.getTopCBD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.getTopCBD" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Finds the highest-level <a class="reference internal" href="CBD.html#module-CBD" title="CBD"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD</span></code></a> instance.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.flatten">
|
|
|
+<code class="descname">flatten</code><span class="sig-paren">(</span><em>parent=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.flatten"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.flatten" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Flatten the CBD parent and call flatten recursively for CBD’s in this CBD</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.getBlocks">
|
|
|
+<code class="descname">getBlocks</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.getBlocks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.getBlocks" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the list of blocks.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.getBlockByName">
|
|
|
+<code class="descname">getBlockByName</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.getBlockByName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.getBlockByName" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets a block by its name.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> (<em>str</em>) – The block’s name</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.getClock">
|
|
|
+<code class="descname">getClock</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.getClock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.getClock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Gets the current simulation clock.
|
|
|
+This will always be the block of the highest-level <a class="reference internal" href="CBD.html#module-CBD" title="CBD"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD</span></code></a>.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.setClock">
|
|
|
+<code class="descname">setClock</code><span class="sig-paren">(</span><em>clock</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.setClock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.setClock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Sets the clock of the highest-level <a class="reference internal" href="CBD.html#module-CBD" title="CBD"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD</span></code></a>.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>clock</strong> (<a class="reference internal" href="CBD.simulator.html#CBD.simulator.Clock" title="CBD.simulator.Clock"><em>Clock</em></a>) – The clock to set.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.addBlock">
|
|
|
+<code class="descname">addBlock</code><span class="sig-paren">(</span><em>block</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.addBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.addBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Add a block to the CBD model</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.removeBlock">
|
|
|
+<code class="descname">removeBlock</code><span class="sig-paren">(</span><em>block</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.removeBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.removeBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Removes a block from the <a class="reference internal" href="CBD.html#module-CBD" title="CBD"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD</span></code></a>.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>block</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The block to remove.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.addConnection">
|
|
|
+<code class="descname">addConnection</code><span class="sig-paren">(</span><em>from_block</em>, <em>to_block</em>, <em>input_port_name=None</em>, <em>output_port_name=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.addConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.addConnection" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Adds a connection between <code class="code docutils literal notranslate"><span class="pre">from_block</span></code> with <code class="code docutils literal notranslate"><span class="pre">input_port_name</span></code> to
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">to_block</span></code> with <code class="code docutils literal notranslate"><span class="pre">outport_port_name</span></code>.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
|
+<li><strong>from_block</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The block to start the connection from.</li>
|
|
|
+<li><strong>to_block</strong> (<a class="reference internal" href="#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><em>BaseBlock</em></a>) – The target block of the connection.</li>
|
|
|
+<li><strong>input_port_name</strong> (<em>str</em>) – The name of the input port. When <code class="code docutils literal notranslate"><span class="pre">None</span></code> or unset,
|
|
|
+the next port is used. E.g. when called after <code class="code docutils literal notranslate"><span class="pre">IN1</span></code>
|
|
|
+is already set, <code class="code docutils literal notranslate"><span class="pre">IN2</span></code> will be used.</li>
|
|
|
+<li><strong>output_port_name</strong> (<em>str</em>) – The name of the output port. When not set or <code class="code docutils literal notranslate"><span class="pre">None</span></code>,
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">OUT1</span></code> will be used.</li>
|
|
|
+</ul>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+<div class="admonition seealso">
|
|
|
+<p class="first admonition-title">See also</p>
|
|
|
+<p class="last"><a class="reference internal" href="#CBD.CBD.BaseBlock.linkInput" title="CBD.CBD.BaseBlock.linkInput"><code class="xref py py-func docutils literal notranslate"><span class="pre">BaseBlock.linkInput()</span></code></a></p>
|
|
|
+</div>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.findBlock">
|
|
|
+<code class="descname">findBlock</code><span class="sig-paren">(</span><em>path</em>, <em>sep='.'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.findBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.findBlock" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Obtain a block in a submodel of this CBD.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
|
+<li><strong>path</strong> (<em>str</em>) – The path of the block to find. Empty string for the current block,
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">child.grandchild</span></code> for the block called code:<cite>grandchild</cite>,
|
|
|
+which is located in the <code class="code docutils literal notranslate"><span class="pre">child</span></code> CBD that is located in this CBD.</li>
|
|
|
+<li><strong>sep</strong> (<em>str</em>) – The path separator to use. Defaults to <code class="code docutils literal notranslate"><span class="pre">.</span></code></li>
|
|
|
+</ul>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><p>The block that corresponds to the given path.</p>
|
|
|
+<div class="admonition note">
|
|
|
+<p class="first admonition-title">Note</p>
|
|
|
+<p class="last">The block that will be returned has a different path than the path provided
|
|
|
+in this function call. This is because this function assumes you already have
|
|
|
+a path to the CBD you call it on. For instance, if this CBD contains a child
|
|
|
+called <code class="code docutils literal notranslate"><span class="pre">child</span></code>, which has a <code class="code docutils literal notranslate"><span class="pre">grandchild</span></code> block in its turn, calling
|
|
|
+findBlock on the <code class="xref py py-class docutils literal notranslate"><span class="pre">child</span></code> to locate the <code class="code docutils literal notranslate"><span class="pre">grandchild</span></code> only needs
|
|
|
+<code class="code docutils literal notranslate"><span class="pre">grandchild</span></code> to be passed as a path. If the function is called on the
|
|
|
+current CBD block instead, <code class="code docutils literal notranslate"><span class="pre">child.grandchild</span></code> is required to obtain the
|
|
|
+same block.</p>
|
|
|
+</div>
|
|
|
+</p>
|
|
|
+</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.dump">
|
|
|
+<code class="descname">dump</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.dump"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.dump" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Dumps the model information to the console.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.dumpSignals">
|
|
|
+<code class="descname">dumpSignals</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.dumpSignals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.dumpSignals" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Dumps the signal inromation to the console.</p>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.getSignal">
|
|
|
+<code class="descname">getSignal</code><span class="sig-paren">(</span><em>name_output=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.getSignal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.getSignal" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Obtains the set of signals this block has sent over an output port.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name_output</strong> (<em>str</em>) – The name of the output port. If not set, or <code class="code docutils literal notranslate"><span class="pre">None</span></code>,
|
|
|
+the value of <code class="code docutils literal notranslate"><span class="pre">OUT1</span></code> will be used.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+<dl class="method">
|
|
|
+<dt id="CBD.CBD.CBD.compute">
|
|
|
+<code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/CBD.html#CBD.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.CBD.CBD.compute" title="Permalink to this definition">¶</a></dt>
|
|
|
+<dd><p>Computes this block’s operation, based on its inputs and store it as an output
|
|
|
+signal.</p>
|
|
|
+<table class="docutils field-list" frame="void" rules="none">
|
|
|
+<col class="field-name" />
|
|
|
+<col class="field-body" />
|
|
|
+<tbody valign="top">
|
|
|
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</dd></dl>
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+ </article>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <footer>
|
|
|
+
|
|
|
+ <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
+
|
|
|
+ <a href="CBD.CBD2LaTeX.html" class="btn btn-neutral float-right" title="CBD.CBD2LaTeX module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
|
|
|
+
|
|
|
+
|
|
|
+ <a href="CBD.realtime.threadingTkInter.html" class="btn btn-neutral" title="CBD.realtime.threadingTkInter module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <hr>
|
|
|
+
|
|
|
+ <div role="contentinfo">
|
|
|
+ <p>
|
|
|
+ © Copyright 2020, Randy Paredis.
|
|
|
+
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+</footer>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="catalyst-content-right" id="catalyst-content-right">
|
|
|
+ <div class="catalyst-right-menu" id="catalyst-right-menu">
|
|
|
+ <div class="catalyst-side-scroll" id="catalyst-side-scroll-right">
|
|
|
+ <ul>
|
|
|
+<li><a class="reference internal" href="#">CBD.CBD module</a></li>
|
|
|
+</ul>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/jquery.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/underscore.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/doctools.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/language_data.js"></script>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <script type="text/javascript" src="_static/js/vendor/popper.min.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/js/vendor/bootstrap.min.js"></script>
|
|
|
+ <script type="text/javascript" src="_static/js/theme.js"></script>
|
|
|
+
|
|
|
+ <script type="text/javascript">
|
|
|
+ jQuery(function () {
|
|
|
+ SphinxRtdTheme.Navigation.enable(true);
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <!-- Begin Footer -->
|
|
|
+
|
|
|
+ <footer class="site-footer" id="site-footer">
|
|
|
+ <div class="container footer-container">
|
|
|
+ <div class="footer-logo-wrapper">
|
|
|
+ <a href="https://catalyst-team.com/" class="footer-logo"></a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="footer-links-wrapper">
|
|
|
+ <div class="footer-links-col">
|
|
|
+ <ul>
|
|
|
+ <li class="list-title"><a href="https://github.com/catalyst-team">Ecosystem</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://alchemy.host">Alchemy</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">Catalyst</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">Reaction</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="footer-links-col">
|
|
|
+ <ul>
|
|
|
+ <li class="list-title"><a href="https://github.com/catalyst-team">Projects</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">Codestyle</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">Catalyst.Neuro</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">Classification</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">Detection</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">Segmentation</a></li>
|
|
|
+ <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">Catalyst.GAN</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="footer-links-col">
|
|
|
+ <ul>
|
|
|
+ <li class="list-title"><a href="https://catalyst-team.com/">Support</a></li>
|
|
|
+ <li><a href="https://github.com/catalyst-team/catalyst/issues" target="_blank">Github Issues</a></li>
|
|
|
+ <li><a href="https://github.com/catalyst-team/catalyst/blob/master/CONTRIBUTING.md" target="_blank">Contributing</a></li>
|
|
|
+ <li><a href="https://www.patreon.com/catalyst_team" target="_blank">Patreon</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="footer-links-col follow-us-col">
|
|
|
+ <div class="footer-social-icons">
|
|
|
+ <a href="https://t.me/catalyst_team" target="_blank" class="telegram"></a>
|
|
|
+ <a href="https://twitter.com/catalyst_core" target="_blank" class="twitter"></a>
|
|
|
+ <a href="https://join.slack.com/t/catalyst-team-core/shared_invite/zt-d9miirnn-z86oKDzFMKlMG4fgFdZafw" target="_blank" class="ods"></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </footer>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- End Footer -->
|
|
|
+
|
|
|
+ <!-- Begin Mobile Menu -->
|
|
|
+
|
|
|
+ <div class="mobile-main-menu">
|
|
|
+ <div class="container-fluid">
|
|
|
+ <div class="container">
|
|
|
+ <div class="mobile-main-menu-header-container">
|
|
|
+ <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
|
|
|
+ <a class="main-menu-close-button" href="#" data-behavior="close-mobile-menu"></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mobile-main-menu-links-container">
|
|
|
+ <div class="main-menu">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <a href="">Get Started</a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li>
|
|
|
+ <a href="https://github.com/catalyst-team/catalyst">Github</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- End Mobile Menu -->
|
|
|
+
|
|
|
+ <script type="text/javascript" src="_static/js/vendor/anchor.min.js"></script>
|
|
|
+
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+ mobileMenu.bind();
|
|
|
+ mobileTOC.bind();
|
|
|
+ catalystAnchors.bind();
|
|
|
+ sideMenus.bind();
|
|
|
+ scrollToAnchor.bind();
|
|
|
+ highlightNavigation.bind();
|
|
|
+ mainMenuDropdown.bind();
|
|
|
+
|
|
|
+ // Add class to links that have code blocks, since we cannot create links in code blocks
|
|
|
+ $("article.catalyst-article a span.pre").each(function(e) {
|
|
|
+ $(this).closest("a").addClass("has-code");
|
|
|
+ });
|
|
|
+ })
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|