提交 48af53b0 编写于 作者: D dev

更新单词命名的笔误,“封装”的英文应该是"wrapper"而非 "warpper"。

上级 e145ffa3
......@@ -434,7 +434,7 @@ E:\> python PothosSDR\lib\uhd\utils\uhd_images_downloader.py -i E:\Pothos
</tbody>
</table><p>如果有真实的非虚拟机linux环境,还是建议在Linux下运行。</p><h3 id="1.7-编译后的结果"><a name="1.7-编译后的结果" href="#1.7-编译后的结果"></a>1.7 编译后的结果</h3><p>一旦编译完成,在输出文件夹下会产生 bin文件夹,含有所有的可执行文件。这个文件夹应该类似:</p><pre class="dos hljs"><code class="dos" data-origin="<pre><code class=&quot;dos&quot;>E:\build\bin&amp;gt; tree /F [回车]
E:.
│ subtask_warpper.exe
│ subtask_wrapper.exe
│ taskBusPlatform.exe
└─modules
filter_fir.exe
......@@ -453,11 +453,11 @@ E:.
transform_fft.exe
uhd_usrp_continous.exe
uhd_usrp_io.exe
warpper_scripts.exe
warpper_stdio.exe
wrapper_scripts.exe
wrapper_stdio.exe
</code></pre>"><span class="hljs-function">E:\<span class="hljs-title">build</span>\<span class="hljs-title">bin</span>&gt; <span class="hljs-title">tree</span> /<span class="hljs-title">F</span> [回车]
<span class="hljs-title">E</span>:.
<span class="hljs-title">subtask_warpper.exe</span>
<span class="hljs-title">subtask_wrapper.exe</span>
<span class="hljs-title">taskBusPlatform.exe</span>
└─<span class="hljs-title">modules</span>
<span class="hljs-title">filter_fir.exe</span>
......@@ -476,8 +476,8 @@ E:.
<span class="hljs-title">transform_fft.exe</span>
<span class="hljs-title">uhd_usrp_continous.exe</span>
<span class="hljs-title">uhd_usrp_io.exe</span>
<span class="hljs-title">warpper_scripts.exe</span>
<span class="hljs-title">warpper_stdio.exe</span>
<span class="hljs-title">wrapper_scripts.exe</span>
<span class="hljs-title">wrapper_stdio.exe</span>
</span></code></pre><h2 id="2-安装"><a name="2-安装" href="#2-安装"></a>2 安装</h2><p>taskBus由若干可执行文件(在windows下就是exe文件)共同完成任务。为脱离编译器环境运行,这些模块所需要的动态链接库都需要位于可发现的位置上。对Linux而言,由于使用的都是官方库,所以不存在安装问题。基本上双击 taskBusPlatform 就能启动。对Windows而言,需要格外注意依赖项。建议下载<a href="https://dependencywalker.com/"></a><a href="https://dependencywalker.com/">https://dependencywalker.com/</a>以便在出问题时查看依赖。</p><h3 id="2.1-执行qt发布"><a name="2.1-执行qt发布" href="#2.1-执行qt发布"></a>2.1 执行Qt发布</h3><p>打开Qt的命令行,在bin文件夹下,执行Qt发布工具。如果是静态链接,则无需本步骤。</p><pre class="dos hljs"><code class="dos" data-origin="<pre><code class=&quot;dos&quot;>E:\build\bin&amp;gt; windeployqt --compiler-runtime taskBusPlatform.exe
E:\build\bin&amp;gt; windeployqt --compiler-runtime --dir . modules/sink_sql.exe
E:\build\bin&amp;gt; windeployqt --compiler-runtime --dir . modules/sink_soundcard.exe
......@@ -499,7 +499,7 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
libgcc_s_seh-<span class="hljs-number">1</span>.dll =&gt; /mingw64/bin/libgcc_s_seh-<span class="hljs-number">1</span>.dll (<span class="hljs-number">0</span>x7ffd1e7f0000)
libwinpthread-<span class="hljs-number">1</span>.dll =&gt; /mingw64/bin/libwinpthread-<span class="hljs-number">1</span>.dll (<span class="hljs-number">0</span>x7ffd1e110000)
//...
</code></pre><h3 id="2.3-加载所有的模块"><a name="2.3-加载所有的模块" href="#2.3-加载所有的模块"></a>2.3 加载所有的模块</h3><p>打开 taskBusPlatform.exe, 点击“载入模块”,定位到modules文件夹,全选除了warpper_scripts.exe之外的文件,可以看到加载的结果。如果如下图所示,表示加载成功。<br><img src="handbook/1.LoadModules.jpg" alt="LoadModules"><br><img src="handbook/2.LoadModulesOk.jpg" alt="LoadModules"></p><h3 id="2.4-排查问题"><a name="2.4-排查问题" href="#2.4-排查问题"></a>2.4 排查问题</h3><p>如果发现缺少某个模块,请到命令行下,执行 模块名.exe —information,若能够输出json,则表示正常。否则,请对照出错提示,结合<a href="https://dependencywalker.com/">dependencywalker</a>或者ldd查看依赖。<br>比如,对fft模块,执行:</p><pre class="dos hljs"><code class="dos" data-origin="<pre><code class=&quot;dos&quot;>E:\build\bin&amp;gt; modules\transform_fft.exe --information [回车]
</code></pre><h3 id="2.3-加载所有的模块"><a name="2.3-加载所有的模块" href="#2.3-加载所有的模块"></a>2.3 加载所有的模块</h3><p>打开 taskBusPlatform.exe, 点击“载入模块”,定位到modules文件夹,全选除了wrapper_scripts.exe之外的文件,可以看到加载的结果。如果如下图所示,表示加载成功。<br><img src="handbook/1.LoadModules.jpg" alt="LoadModules"><br><img src="handbook/2.LoadModulesOk.jpg" alt="LoadModules"></p><h3 id="2.4-排查问题"><a name="2.4-排查问题" href="#2.4-排查问题"></a>2.4 排查问题</h3><p>如果发现缺少某个模块,请到命令行下,执行 模块名.exe —information,若能够输出json,则表示正常。否则,请对照出错提示,结合<a href="https://dependencywalker.com/">dependencywalker</a>或者ldd查看依赖。<br>比如,对fft模块,执行:</p><pre class="dos hljs"><code class="dos" data-origin="<pre><code class=&quot;dos&quot;>E:\build\bin&amp;gt; modules\transform_fft.exe --information [回车]
{
&quot;transform_fft&quot;:{
&quot;name&quot;:&quot;libfftw&quot;,
......@@ -519,38 +519,38 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
#...
}
}
</span></code></pre><p> 则表示没有问题。</p><h2 id="3-设计师界面"><a name="3-设计师界面" href="#3-设计师界面"></a>3 设计师界面</h2><p>taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连接各个模块的执行文件。而后,保存工程为.tbj(json)格式,并在设计师内运行。同时,tbj文件也可以通过命令行工具subtask_warpper.exe封装后,脱离界面运行。本节介绍设计师界面的基本情况。</p><h3 id="3.1-基本框架"><a name="3.1-基本框架" href="#3.1-基本框架"></a>3.1 基本框架</h3><p>当您下载或者编译了特定的发行版本后,会获得一个含有多个可执行文件、配置文件的文件夹。以发行版 taskbus_win64_20220419_Qt6 为例,这个文件夹的结构大致如下:</p><pre><code class="txt" data-origin="<pre><code class=&quot;txt&quot;>├─bin 设计师可执行文件(主程序)
</span></code></pre><p> 则表示没有问题。</p><h2 id="3-设计师界面"><a name="3-设计师界面" href="#3-设计师界面"></a>3 设计师界面</h2><p>taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连接各个模块的执行文件。而后,保存工程为.tbj(json)格式,并在设计师内运行。同时,tbj文件也可以通过命令行工具subtask_wrapper.exe封装后,脱离界面运行。本节介绍设计师界面的基本情况。</p><h3 id="3.1-基本框架"><a name="3.1-基本框架" href="#3.1-基本框架"></a>3.1 基本框架</h3><p>当您下载或者编译了特定的发行版本后,会获得一个含有多个可执行文件、配置文件的文件夹。以发行版 taskbus_win64_20220419_Qt6 为例,这个文件夹的结构大致如下:</p><pre><code class="txt" data-origin="<pre><code class=&quot;txt&quot;>├─bin 设计师可执行文件(主程序)
├─doc 文档文件夹
├─examples 工程范例文件夹
├─modules 模块文件夹
│ ├─plutosdr ADALM PlutoSDR模块
│ ├─usrp Ettus USRP UHD模块
│ └─warpper_scripts 用于脚本(python,node.js)的封装器模块
│ └─wrapper_scripts 用于脚本(python,node.js)的封装器模块
└─templates 模块模板
├─cpp 纯C++模板
├─csharp C#模板
├─FMDem C语言FM解调器(二次封装,需要warpper_stdio)
├─FMDem C语言FM解调器(二次封装,需要wrapper_stdio)
├─matlab Matlab语言
├─mfc MFC框架
├─nodejs node.js+warpper_scripts
├─python python 3脚本+warpper_scripts
└─python2 python 2脚本+warpper_scripts
├─nodejs node.js+wrapper_scripts
├─python python 3脚本+wrapper_scripts
└─python2 python 2脚本+wrapper_scripts
</code></pre>">├─bin 设计师可执行文件(主程序)
├─doc 文档文件夹
├─examples 工程范例文件夹
├─modules 模块文件夹
│ ├─plutosdr ADALM PlutoSDR模块
│ ├─usrp Ettus USRP UHD模块
│ └─warpper_scripts 用于脚本(python,node.js)的封装器模块
│ └─wrapper_scripts 用于脚本(python,node.js)的封装器模块
└─templates 模块模板
├─cpp 纯C++模板
├─csharp C#模板
├─FMDem C语言FM解调器(二次封装,需要warpper_stdio)
├─FMDem C语言FM解调器(二次封装,需要wrapper_stdio)
├─matlab Matlab语言
├─mfc MFC框架
├─nodejs node.js+warpper_scripts
├─python python 3脚本+warpper_scripts
└─python2 python 2脚本+warpper_scripts
├─nodejs node.js+wrapper_scripts
├─python python 3脚本+wrapper_scripts
└─python2 python 2脚本+wrapper_scripts
</code></pre><h4 id="3.1.1-自带模块一览表"><a name="3.1.1-自带模块一览表" href="#3.1.1-自带模块一览表"></a>3.1.1 自带模块一览表</h4><p>在模块modules文件夹里,是编译好的各个模块,以发行版 taskbus_win64_20220419_Qt6 为例,主要包括:</p><table>
<thead>
<tr>
......@@ -608,7 +608,7 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
<tr>
<td>sink_SQL.exe</td>
<td>SQL信宿</td>
<td>用于执行SQL,也可以用warpper_stdio+命令行数据库客户端代替</td>
<td>用于执行SQL,也可以用wrapper_stdio+命令行数据库客户端代替</td>
</tr>
<tr>
<td>source_file.exe</td>
......@@ -641,14 +641,14 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
<td>带时戳的USRP吞吐,可获取每份数据的时戳,并为每份发射数据准备预告的时戳</td>
</tr>
<tr>
<td>warpper_scripts.exe</td>
<td>wrapper_scripts.exe</td>
<td>脚本包装器</td>
<td>用于包装python,node.js等脚本制作的模块。相关例子见templates中python文件夹</td>
</tr>
<tr>
<td>warpper_stdio.exe</td>
<td>wrapper_stdio.exe</td>
<td>标准命令行包装器</td>
<td>用于包装简单的基本命令行程序,构成1输入(Stdin),两输出(stdout, stderr)模块。见examples里的usrp_fm_warpper.tbj</td>
<td>用于包装简单的基本命令行程序,构成1输入(Stdin),两输出(stdout, stderr)模块。见examples里的usrp_fm_wrapper.tbj</td>
</tr>
</tbody>
</table><h4 id="3.1.2-模块加载历史记录"><a name="3.1.2-模块加载历史记录" href="#3.1.2-模块加载历史记录"></a>3.1.2 模块加载历史记录</h4><p>一旦模块加载成功,会记录在default_mods.text中。其可能的内容如下:</p><pre><code class="text" data-origin="<pre><code class=&quot;text&quot;>../modules/sink_soundcard.exe
......@@ -670,7 +670,7 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
../modules/resample_pqfraction.exe
../templates/python/example_python.exe
../examples/voice_spec.exe
../modules/warpper_stdio.exe
../modules/wrapper_stdio.exe
../modules/sink_file.exe
</code></pre>">../modules/sink_soundcard.exe
../modules/source_file.exe
......@@ -691,7 +691,7 @@ E:\build\bin&amp;gt; windeployqt --compiler-runtime modules/sink_soundcard.exe
../modules/resample_pqfraction.exe
../templates/python/example_python.exe
../examples/voice_spec.exe
../modules/warpper_stdio.exe
../modules/wrapper_stdio.exe
../modules/sink_file.exe
</code></pre><p>对封装的子项目,在对应的子项目名.text里,也会设置加载的文件名。如:</p><p><a href="../examples/voice_spec.text">examples/voice_spec.text</a></p><h3 id="3.2-界面元素"><a name="3.2-界面元素" href="#3.2-界面元素"></a>3.2 界面元素</h3><p>双击bin/taskBusPlatform.exe 启动程序,主要界面元素如下:<br><img src="handbook/3.MainGUI.jpg" alt="mainGUI"></p><h4 id="3.2.1-主工具栏按钮"><a name="3.2.1-主工具栏按钮" href="#3.2.1-主工具栏按钮"></a>3.2.1 主工具栏按钮</h4><p>各个按钮的意义如下:</p><table>
<thead>
......
......@@ -124,7 +124,7 @@ pthread是一个windows下仿POSIX的线程库。pthread.h被libuhd所使用,
```dos
E:\build\bin> tree /F [回车]
E:.
│ subtask_warpper.exe
│ subtask_wrapper.exe
│ taskBusPlatform.exe
└─modules
filter_fir.exe
......@@ -143,8 +143,8 @@ E:.
transform_fft.exe
uhd_usrp_continous.exe
uhd_usrp_io.exe
warpper_scripts.exe
warpper_stdio.exe
wrapper_scripts.exe
wrapper_stdio.exe
```
## 2 安装
......@@ -188,7 +188,7 @@ $ ldd transform_fft.exe | grep "mingw64"
```
### 2.3 加载所有的模块
打开 taskBusPlatform.exe, 点击“载入模块”,定位到modules文件夹,全选除了warpper_scripts.exe之外的文件,可以看到加载的结果。如果如下图所示,表示加载成功。
打开 taskBusPlatform.exe, 点击“载入模块”,定位到modules文件夹,全选除了wrapper_scripts.exe之外的文件,可以看到加载的结果。如果如下图所示,表示加载成功。
![LoadModules](handbook/1.LoadModules.jpg)
![LoadModules](handbook/2.LoadModulesOk.jpg)
......@@ -210,7 +210,7 @@ E:\build\bin> modules\transform_fft.exe --information [回车]
则表示没有问题。
## 3 设计师界面
taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连接各个模块的执行文件。而后,保存工程为.tbj(json)格式,并在设计师内运行。同时,tbj文件也可以通过命令行工具subtask_warpper.exe封装后,脱离界面运行。本节介绍设计师界面的基本情况。
taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连接各个模块的执行文件。而后,保存工程为.tbj(json)格式,并在设计师内运行。同时,tbj文件也可以通过命令行工具subtask_wrapper.exe封装后,脱离界面运行。本节介绍设计师界面的基本情况。
###3.1 基本框架
当您下载或者编译了特定的发行版本后,会获得一个含有多个可执行文件、配置文件的文件夹。以发行版 taskbus_win64_20220419_Qt6 为例,这个文件夹的结构大致如下:
......@@ -221,16 +221,16 @@ taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连
├─modules 模块文件夹
│ ├─plutosdr ADALM PlutoSDR模块
│ ├─usrp Ettus USRP UHD模块
│ └─warpper_scripts 用于脚本(python,node.js)的封装器模块
│ └─wrapper_scripts 用于脚本(python,node.js)的封装器模块
└─templates 模块模板
├─cpp 纯C++模板
├─csharp C#模板
├─FMDem C语言FM解调器(二次封装,需要warpper_stdio)
├─FMDem C语言FM解调器(二次封装,需要wrapper_stdio)
├─matlab Matlab语言
├─mfc MFC框架
├─nodejs node.js+warpper_scripts
├─python python 3脚本+warpper_scripts
└─python2 python 2脚本+warpper_scripts
├─nodejs node.js+wrapper_scripts
├─python python 3脚本+wrapper_scripts
└─python2 python 2脚本+wrapper_scripts
```
####3.1.1 自带模块一览表
......@@ -248,15 +248,15 @@ taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连
|sink_plots.exe|画图信宿|包括简单的1D,2D,时频图|
|sink_plutosdr.exe|PlutoSDR信宿|发行版中在独立的文件夹,避免libiio和usrp的冲突|
|sink_soundcard.exe|声卡信宿|可播放声音|
|sink_SQL.exe|SQL信宿|用于执行SQL,也可以用warpper_stdio+命令行数据库客户端代替|
|sink_SQL.exe|SQL信宿|用于执行SQL,也可以用wrapper_stdio+命令行数据库客户端代替|
|source_file.exe|文件信源|可以按照灵活的方式批量读取文件|
|source_plutosdr.exe|PlutoSDR信源||
|source_soundcard.exe|声卡信源|可以进行录音并把波形带入平台|
|transform_fft.exe|FFT变换|使用libfftw|
|uhd_usrp_continous.exe|UHD连续吞吐|不带时戳的USRP吞吐|
|uhd_usrp_io.exe|UHD突发/连续吞吐|带时戳的USRP吞吐,可获取每份数据的时戳,并为每份发射数据准备预告的时戳|
|warpper_scripts.exe|脚本包装器|用于包装python,node.js等脚本制作的模块。相关例子见templates中python文件夹|
|warpper_stdio.exe|标准命令行包装器|用于包装简单的基本命令行程序,构成1输入(Stdin),两输出(stdout, stderr)模块。见examples里的usrp_fm_warpper.tbj|
|wrapper_scripts.exe|脚本包装器|用于包装python,node.js等脚本制作的模块。相关例子见templates中python文件夹|
|wrapper_stdio.exe|标准命令行包装器|用于包装简单的基本命令行程序,构成1输入(Stdin),两输出(stdout, stderr)模块。见examples里的usrp_fm_wrapper.tbj|
#### 3.1.2 模块加载历史记录
一旦模块加载成功,会记录在default_mods.text中。其可能的内容如下:
......@@ -280,7 +280,7 @@ taskBus 的工作原理是使用设计师 taskBusPlatform.exe 设计工程,连
../modules/resample_pqfraction.exe
../templates/python/example_python.exe
../examples/voice_spec.exe
../modules/warpper_stdio.exe
../modules/wrapper_stdio.exe
../modules/sink_file.exe
```
对封装的子项目,在对应的子项目名.text里,也会设置加载的文件名。如:
......
......@@ -1159,7 +1159,7 @@ modules/sink_SQL.exe
modules/source_soundcard.exe
modules/sink_plots.exe
</code></pre><p>Taskbusplatform will try to use relative path unless the character length of the absolute path is less than the relative path. Therefore, for a system that needs to be published, you can place all modules in the path where the Taskbusplatform executable file is located. Managed with subfolders such as folder modules or subs is a good way. Once you’ve done this, copy it to a new computer and run it without setting it up.</p><h4 id="4.4.2-sub-projects-and-nesting"><a name="4.4.2-sub-projects-and-nesting" href="#4.4.2-sub-projects-and-nesting"></a>4.4.2 Sub-Projects and nesting</h4><p>a taskBus project can be referenced by other projects. All suspended pins are assigned temporary IDs and exposed for external engineering links. Taking the FFT of the sound card as an example, we can combine the sound card and FFT into a “sound spectrum” module.</p><h5 id="(1)-create-a-sub-project"><a name="(1)-create-a-sub-project" href="#(1)-create-a-sub-project"></a>(1) Create a sub project</h5><p>Create a new subproject with the following structure:</p><p><img src="images/new_subprj.png" alt="new_subprj"></p><ul>
<li>This subproject consists of two modules, a sound card module and a FFT module.</li><li>The output pin of the FFT module is suspended as the external interface of the subproject.</li><li>If there are two suspended interfaces of the same name, the IDs assigned by the corresponding process are used to make the distinction.</li></ul><p>Save this subproject as a TBJ file, such as “VOICE_SPEC.TBJ”.</p><h5 id="(2)-attach-a-wrapper-file"><a name="(2)-attach-a-wrapper-file" href="#(2)-attach-a-wrapper-file"></a>(2) Attach a wrapper file</h5><p>Copy the wrapper “Subtask_warpper.exe” that comes with the platform to the same folder as “Voice_spec.tbj”, named “Voice_spec.exe”</p><ul>
<li>This subproject consists of two modules, a sound card module and a FFT module.</li><li>The output pin of the FFT module is suspended as the external interface of the subproject.</li><li>If there are two suspended interfaces of the same name, the IDs assigned by the corresponding process are used to make the distinction.</li></ul><p>Save this subproject as a TBJ file, such as “VOICE_SPEC.TBJ”.</p><h5 id="(2)-attach-a-wrapper-file"><a name="(2)-attach-a-wrapper-file" href="#(2)-attach-a-wrapper-file"></a>(2) Attach a wrapper file</h5><p>Copy the wrapper “Subtask_wrapper.exe” that comes with the platform to the same folder as “Voice_spec.tbj”, named “Voice_spec.exe”</p><ul>
<li>Voice_spec.exe will automatically read VOICE_SPEC.TBJ and tell the platform its own interface.</li><li>Under Linux, there is no exe extension.</li></ul><h5 id="(3)-attach-default-module-load-script"><a name="(3)-attach-default-module-load-script" href="#(3)-attach-default-module-load-script"></a>(3) Attach default module load script</h5><p>Since voice_spec needs to load the module itself, it is necessary to copy the Default_mods.text under the TaskBusPlatform.exe folder to the same folder as “voice_spec.tbj”, named “voice_spec.text”</p><ul>
<li><p>because the current running path of the platform is always the path of taskBusPlatform.exe, the relative path in the file Voice_spec.text remains the same as Default_mods.text. Users do not need additional editing.</p>
</li><li><p>However, you still need to review the file file Voice_spec.text to clear useless entries.</p>
......
......@@ -677,7 +677,7 @@ Save this subproject as a TBJ file, such as "VOICE_SPEC.TBJ".
##### (2) Attach a wrapper file
Copy the wrapper "Subtask_warpper.exe" that comes with the platform to the same folder as "Voice_spec.tbj", named "Voice_spec.exe"
Copy the wrapper "Subtask_wrapper.exe" that comes with the platform to the same folder as "Voice_spec.tbj", named "Voice_spec.exe"
- Voice_spec.exe will automatically read VOICE_SPEC.TBJ and tell the platform its own interface.
- Under Linux, there is no exe extension.
......
......@@ -1157,7 +1157,7 @@ modules/sink_SQL.exe
modules/source_soundcard.exe
modules/sink_plots.exe
</code></pre><p>taskBusPlatform 会尽量使用相对路径存储模块的位置,除非绝对路径的字符长度要小于相对路径。因此,对于一个需要发布的系统,可以把所有模块放在 taskBusPlatform 可执行文件所在的路径中,用文件夹 modules 或 subs 等子文件夹管理。如此操作后,拷贝到新的计算机上,无需设置即可运行啦。</p><h4 id="4.4.2-子工程与嵌套"><a name="4.4.2-子工程与嵌套" href="#4.4.2-子工程与嵌套"></a>4.4.2 子工程与嵌套</h4><p>taskBus允许工程作为整体,被其他工程引用。所有悬空的引脚都会被分配临时ID,并暴露出来供外部工程链接。 以声卡的FFT为例,我们可以把声卡、FFT合成为一个“声音频谱”模块。</p><h5 id="(1)-创建子工程"><a name="(1)-创建子工程" href="#(1)-创建子工程"></a>(1) 创建子工程</h5><p>新建一个子工程,其结构如下:</p><p><img src="images/new_subprj.png" alt="new_subprj"></p><ul>
<li>这个子项目包括两个模块,声卡模块与fft模块。</li><li>fft模块的输出管脚悬空,作为子项目的外部接口。</li><li>如果有两个相同名称的悬空接口,会使用对应进程分配的ID做区分。</li></ul><p>保存这个子项目为tbj文件,如“voice_spec.tbj”。</p><h5 id="(2)-附加包装器"><a name="(2)-附加包装器" href="#(2)-附加包装器"></a>(2) 附加包装器</h5><p>把平台自带的包装器“subtask_warpper.exe”拷贝到“voice_spec.tbj”相同的文件夹,命名为“voice_spec.exe”</p><ul>
<li>这个子项目包括两个模块,声卡模块与fft模块。</li><li>fft模块的输出管脚悬空,作为子项目的外部接口。</li><li>如果有两个相同名称的悬空接口,会使用对应进程分配的ID做区分。</li></ul><p>保存这个子项目为tbj文件,如“voice_spec.tbj”。</p><h5 id="(2)-附加包装器"><a name="(2)-附加包装器" href="#(2)-附加包装器"></a>(2) 附加包装器</h5><p>把平台自带的包装器“subtask_wrapper.exe”拷贝到“voice_spec.tbj”相同的文件夹,命名为“voice_spec.exe”</p><ul>
<li>voice_spec.exe 会自动读取 voice_spec.tbj,并告诉平台自己的接口。</li><li>在Linux下,没有exe扩展名。</li></ul><h5 id="(3)-附加默认模块加载脚本"><a name="(3)-附加默认模块加载脚本" href="#(3)-附加默认模块加载脚本"></a>(3) 附加默认模块加载脚本</h5><p>由于voice_spec需要自行加载模块,需要把 taskBusPlatform.exe 所在文件夹下的 default_mods.text 拷贝到“voice_spec.tbj”相同的文件夹,命名为“voice_spec.text”。</p><ul>
<li>由于平台的当前运行路径永远是 taskBusPlatform.exe 所在路径,因此,文件voice_spec.text中的相对路径仍旧与 default_mods.text 不变。用户不需要额外编辑。</li><li>但仍旧需要检视文件 文件voice_spec.text, 以便清除无用的条目。</li><li><strong>尤其需要注意,文件voice_spec.text中不能包含voice_spec模块的入口行。这样会导致递归加载,启动上百个子进程拖慢系统</strong></li></ul><p>完成2、3两个步骤后,文件夹看起来是这样的:</p><p><img src="images/subprj_folder.png" alt="subprj_folder"></p><p>文件voice_spec.text被修改为:</p><pre><code class="text" data-origin="<pre><code class=&quot;text&quot;>modules/source_soundcard.exe
modules/transform_fft.exe
......
......@@ -663,7 +663,7 @@ taskBus允许工程作为整体,被其他工程引用。所有悬空的引脚
#####(2) 附加包装器
把平台自带的包装器“subtask_warpper.exe”拷贝到“voice_spec.tbj”相同的文件夹,命名为“voice_spec.exe”
把平台自带的包装器“subtask_wrapper.exe”拷贝到“voice_spec.tbj”相同的文件夹,命名为“voice_spec.exe”
- voice_spec.exe 会自动读取 voice_spec.tbj,并告诉平台自己的接口。
- 在Linux下,没有exe扩展名。
......
这里的项目是基于STDIO的项目,运行时要用 warpper_stdio进行包装,立刻接入平台。
\ No newline at end of file
这里的项目是基于STDIO的项目,运行时要用 wrapper_stdio进行包装,立刻接入平台。
\ No newline at end of file
......@@ -7,7 +7,7 @@ add_subdirectory(network)
add_subdirectory(sinks)
add_subdirectory(sources)
add_subdirectory(transforms)
add_subdirectory(warppers)
add_subdirectory(wrappers)
add_subdirectory(pannel)
if (TB_UHD)
add_subdirectory(uhd)
......
......@@ -14,8 +14,8 @@ SUBDIRS += \
sinks/sink_plutosdr \
network/network_p2p \
sinks/sink_SQL \
warppers/warpper_scripts \
warppers/warpper_stdio \
wrappers/wrapper_scripts \
wrappers/wrapper_stdio \
uhd/uhd_usrp_continous \
uhd/uhd_usrp_io
......
cmake_minimum_required(VERSION 3.5)
add_subdirectory(warpper_scripts)
add_subdirectory(warpper_stdio)
add_subdirectory(wrapper_scripts)
add_subdirectory(wrapper_stdio)
......@@ -25,18 +25,18 @@ set(PRJ_FORMS
dlgwrpscript.ui
)
#############Target======================
add_executable(warpper_scripts
add_executable(wrapper_scripts
${PRJ_HEADERS}
${PRJ_SOURCES}
${PRJ_FORMS}
)
target_link_libraries(warpper_scripts PRIVATE
target_link_libraries(wrapper_scripts PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Network
)
set_target_properties(warpper_scripts PROPERTIES
set_target_properties(wrapper_scripts PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER taskBus.modules.network_p2p
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
......
......@@ -26,17 +26,17 @@ set(PRJ_FORMS
dlgwrpstdio.ui
)
#############Target======================
add_executable(warpper_stdio
add_executable(wrapper_stdio
${PRJ_HEADERS}
${PRJ_SOURCES}
${PRJ_FORMS}
)
target_link_libraries(warpper_stdio PRIVATE
target_link_libraries(wrapper_stdio PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
)
set_target_properties(warpper_stdio PROPERTIES
set_target_properties(wrapper_stdio PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER taskBus.modules.network_p2p
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
......
{
"warpper_stdio":{
"name":"warpper_stdio",
"wrapper_stdio":{
"name":"wrapper_stdio",
"parameters":{
"exe":{
"type":"string",
......
As a sub-project, please copy subtask_warpper.exe to voice_spec.exe here.
As a sub-project, please copy subtask_wrapper.exe to voice_spec.exe here.
请首先把编译得到的 subtask_warpper.exe 拷贝为本文件夹的 voice_spec.exe
\ No newline at end of file
请首先把编译得到的 subtask_wrapper.exe 拷贝为本文件夹的 voice_spec.exe
\ No newline at end of file
......@@ -2,9 +2,9 @@ TEMPLATE = subdirs
#main framework project
SUBDIRS += taskbusplatform\
subtask_warpper\
subtask_wrapper\
modules
subtask_warpper.file = taskbusplatform/subtask_warpper.pro
subtask_wrapper.file = taskbusplatform/subtask_wrapper.pro
......@@ -118,14 +118,14 @@ set_target_properties(taskBusPlatform PROPERTIES
# ========================TUI Exe========================
add_executable(subtask_warpper
add_executable(subtask_wrapper
tui/listen_thread.h
tui/subtask_warpper.cpp
tui/subtask_wrapper.cpp
tui/listen_thread.cpp
watchdog/consolewatchdog.h
watchdog/consolewatchdog.cpp
${PRJ_HEADERS_CORE}
${PRJ_SOURCES_CORE}
)
target_link_libraries(subtask_warpper Qt${QT_VERSION_MAJOR}::Core)
target_link_libraries(subtask_wrapper Qt${QT_VERSION_MAJOR}::Core)
......@@ -292,7 +292,7 @@ void taskProject::refresh_idxes()
m_hang_out2instance.clear();
m_hang_out2name.clear();
m_hang_out2fullname.clear();
if (m_bWarpper)
if (m_bWrapper)
{
unsigned int start_test_id= 1;
for (int i=0;i<sizeV;++i)
......@@ -348,7 +348,7 @@ void taskProject::refresh_idxes()
m_iface_inside2outside_out.clear();
m_iface_outside2inside_in.clear();
m_iface_outside2inside_out.clear();
if (m_bWarpper)
if (m_bWrapper)
{
QList<unsigned int> inside_ins_ins = m_hang_in2fullname.keys();
foreach (unsigned int in, inside_ins_ins)
......@@ -600,7 +600,7 @@ void taskProject::slot_new_package(QByteArrayList pkgs)
}
//专题是否被登记为外部专题
//Whether the topic was registered as an external topic
else if (m_hang_out2instance.contains(header->subject_id)==true && m_bWarpper==true)
else if (m_hang_out2instance.contains(header->subject_id)==true && m_bWrapper==true)
{
//是否为本专题合法生产者
//Whether it is a legitimate producer of this topic
......
......@@ -139,8 +139,8 @@ public:
int get_nice(int) const;
int set_nice(int,int);
bool isWarpperPrj() const {return m_bWarpper;}
void setWarpperPrj(bool b){m_bWarpper = b; refresh_idxes();}
bool isWrapperPrj() const {return m_bWrapper;}
void setWrapperPrj(bool b){m_bWrapper = b; refresh_idxes();}
signals:
void sig_message(QStringList namestr,QByteArrayList strMessages);
......@@ -202,10 +202,10 @@ private:
*/
private:
/*!
* \brief m_bWarpper 当前Project是不是作为整体嵌入其他Project中。
* \brief m_bWrapper 当前Project是不是作为整体嵌入其他Project中。
* Is project currently embedded in other project as a whole?
*/
bool m_bWarpper = false;
bool m_bWrapper = false;
/*!
* \brief m_bRunning 当前工程是否正在运行。
* Whether the current project is running.
......
......@@ -30,7 +30,7 @@ SOURCES += \
core/taskcell.cpp \
core/tasknode.cpp \
core/taskproject.cpp \
tui/subtask_warpper.cpp \
tui/subtask_wrapper.cpp \
tui/listen_thread.cpp \
core/process_prctl.cpp \
watchdog/tbwatchdog.cpp \
......
......@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
{
QByteArray ar = fo.readAll();
prj->fromJson(ar,&cell_all);
prj->setWarpperPrj(true);
prj->setWrapperPrj(true);
prj->refresh_idxes();
fo.close();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册