</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><h4id="4.4.2-sub-projects-and-nesting"><aname="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><h5id="(1)-create-a-sub-project"><aname="(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><imgsrc="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><h5id="(2)-attach-a-wrapper-file"><aname="(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><h5id="(2)-attach-a-wrapper-file"><aname="(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><h5id="(3)-attach-default-module-load-script"><aname="(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>