|
|
Line 1: |
Line 1: |
| <noinclude>
| |
| {{BIPS/Head|previous=|next=}}
| |
| </noinclude>
| |
|
| |
|
| <seo title="BIPS - User Manual | RidgeRun" titlemode="replace" metakeywords="GStreamer, NVIDIA, Jetson, TX1, TX2, Jetson AGX Xavier, Xavier, AI, Deep Learning, Machine Learning, Jetson TX1, Jetson TX2, Jetson Xavier, NVIDIA Jetson Xavier, NVIDIA Jetson Orin, Jetson Orin, Orin, NVIDIA Orin, NVIDIA Jetson AGX Orin, Jetson AGX Orin, Assembly Line, Assembly Line Activity, activity recognition, machine learning activity recognition, Exploratory Data Analysis, EDA" description="This RidgeRun wiki page provides more information on the user manual for RidgeRun's Buffer Interprocess Sharing (BIPS)."></seo>
| |
|
| |
| == Introduction ==
| |
|
| |
| BIPS aims to be a simple library friendly for users. The philosophy is such that it follows RAII, and users can communicate by pulling and pushing buffers. For instance:
| |
|
| |
| <pre>
| |
| Producer prod(channel, numbufs, bufsize);
| |
| Buffer buf;
| |
|
| |
| prod.pull(buf);
| |
| process(buf);
| |
| prod.push(buf);
| |
| </pre>
| |
|
| |
| Same on the consumer side.
| |
|
| |
| == Reference ==
| |
|
| |
| You can find the developer manual in the source code delivered when purchasing the product. Moreover, you can ask for the documentation if you are evaluating the product as well.
| |
|
| |
| === C++ ===
| |
|
| |
| ==== Backends ====
| |
|
| |
| <html>
| |
|
| |
| <div class="memproto">
| |
| <table class="mlabels">
| |
| <tbody><tr>
| |
| <td class="mlabels-left">
| |
| <table class="memname">
| |
| <tbody><tr>
| |
| <td class="memname">enum rr::Backends</td>
| |
| </tr>
| |
| </tbody></table>
| |
| </td>
| |
| <td class="mlabels-right">
| |
| <span class="mlabels"></span> </td>
| |
| </tr>
| |
| </tbody></table>
| |
| </div><div class="memdoc">
| |
|
| |
| <p>Available implementations of IBufferPoolController. </p>
| |
| <p>These are used as parameters in building producer and consumer objects in order to indicate which IBufferPoolController backend these should use </p>
| |
| <table class="fieldtable">
| |
| <tbody><tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a9a195b1fe61957966b62edcaca6db31aac16f898975ce1481a5d24df2276dfbab"></a>kShm </td><td class="fielddoc"><p>The Shm backend indicates to producers and consumers that the Buffer Pool Controller will use the POSIX Shared Memory API to manage the shared memory space. </p>
| |
| </td></tr>
| |
| <tr><td class="fieldname"><a id="a9a195b1fe61957966b62edcaca6db31aaf2cb9870767f0c4cfcc13834d70b72bb"></a>kNvSci </td><td class="fielddoc"><p>The NvSci backend indicates to producers and consumers that the Buffer Pool Controller will use the NvSci API to manage the process communication. </p>
| |
| </td></tr>
| |
| </tbody></table>
| |
|
| |
| </div>
| |
|
| |
| </html>
| |
|
| |
| ==== Creating an instance: Producer ====
| |
|
| |
| <HTML>
| |
| <div>
| |
| <table class="mlabels">
| |
| <tbody><tr>
| |
| <td class="mlabels-left">
| |
| <table class="memname">
| |
| <tbody><tr>
| |
| <td class="memname">std::shared_ptr< IProducer > rr::IProducer::Build </td>
| |
| <td>(</td>
| |
| <td class="paramtype">const Backends </td>
| |
| <td class="paramname"><em>backend</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const std::string & </td>
| |
| <td class="paramname"><em>channel</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const uint32_t </td>
| |
| <td class="paramname"><em>buffers</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const size_t </td>
| |
| <td class="paramname"><em>size</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const bool </td>
| |
| <td class="paramname"><em>in_order</em> = <code>true</code>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const std::shared_ptr< ILogger > </td>
| |
| <td class="paramname"><em>logger</em> = <code>nullptr</code> </td>
| |
| </tr>
| |
| <tr>
| |
| <td></td>
| |
| <td>)</td>
| |
| <td></td><td></td>
| |
| </tr>
| |
| </tbody></table>
| |
| </td>
| |
| <td class="mlabels-right">
| |
| <span class="mlabels"><span class="mlabel">static</span></span> </td>
| |
| </tr>
| |
| </tbody></table>
| |
| </div>
| |
|
| |
| <div>
| |
| <p>This method is the Factory method by which new Producer implementations must be constructed. </p>
| |
| <p>The Producer uses a concrete IBufferPoolController implementation to manage the underlying shared memory space. This method receives a backend parameter to specify which controller to use.</p>
| |
| <dl class="params"><dt>Parameters</dt><dd>
| |
| <table class="params">
| |
| <tbody><tr><td class="paramname">backend</td><td>: Implementation to use for the underlying IBufferPoolController </td></tr>
| |
| <tr><td class="paramname">channel</td><td>: Name of shared memory space </td></tr>
| |
| <tr><td class="paramname">buffers</td><td>: Number of buffers in the shared memory space </td></tr>
| |
| <tr><td class="paramname">size</td><td>: Size of each individual buffer </td></tr>
| |
| <tr><td class="paramname">in_order</td><td>: Specifies whether to follow in order or out of order execution Default = true </td></tr>
| |
| <tr><td class="paramname">logger</td><td>: Shared pointer to logger used for internal logging </td></tr>
| |
| </tbody></table>
| |
| </dd>
| |
| </dl>
| |
| <dl class="section return"><dt>Returns</dt><dd>: Shared pointer to concrete Producer implementation </dd></dl>
| |
|
| |
| </div>
| |
| </html>
| |
|
| |
| ==== Creating an instance: Consumer ====
| |
|
| |
| <html>
| |
|
| |
| <div class="memproto">
| |
| <table class="mlabels">
| |
| <tbody><tr>
| |
| <td class="mlabels-left">
| |
| <table class="memname">
| |
| <tbody><tr>
| |
| <td class="memname">std::shared_ptr< IConsumer > rr::IConsumer::Build </td>
| |
| <td>(</td>
| |
| <td class="paramtype">const Backends </td>
| |
| <td class="paramname"><em>backend</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const std::string & </td>
| |
| <td class="paramname"><em>channel</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const uint32_t </td>
| |
| <td class="paramname"><em>buffers</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const size_t </td>
| |
| <td class="paramname"><em>size</em>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const bool </td>
| |
| <td class="paramname"><em>in_order</em> = <code>true</code>, </td>
| |
| </tr>
| |
| <tr>
| |
| <td class="paramkey"></td>
| |
| <td></td>
| |
| <td class="paramtype">const std::shared_ptr< ILogger > </td>
| |
| <td class="paramname"><em>logger</em> = <code>nullptr</code> </td>
| |
| </tr>
| |
| <tr>
| |
| <td></td>
| |
| <td>)</td>
| |
| <td></td><td></td>
| |
| </tr>
| |
| </tbody></table>
| |
| </td>
| |
| <td class="mlabels-right">
| |
| <span class="mlabels"><span class="mlabel">static</span></span> </td>
| |
| </tr>
| |
| </tbody></table>
| |
| </div><div class="memdoc">
| |
|
| |
| <p>This method is the Factory method by which new Consumer implementations must be constructed. </p>
| |
| <p>The Consumer uses a concrete IBufferPoolController implementation to manage the underlying shared memory space. This method receives a backend parameter to specify which controller to use.</p>
| |
| <dl class="params"><dt>Parameters</dt><dd>
| |
| <table class="params">
| |
| <tbody><tr><td class="paramname">backend</td><td>: Implementation to use for the underlying IBufferPoolController </td></tr>
| |
| <tr><td class="paramname">channel</td><td>: Name of shared memory space </td></tr>
| |
| <tr><td class="paramname">buffers</td><td>: Number of buffers in the shared memory space </td></tr>
| |
| <tr><td class="paramname">size</td><td>: Size of each individual buffer </td></tr>
| |
| <tr><td class="paramname">in_order</td><td>: Specifies whether to follow in order or out of order execution Default = true </td></tr>
| |
| <tr><td class="paramname">logger</td><td>: Shared pointer to logger used for internal logging </td></tr>
| |
| </tbody></table>
| |
| </dd>
| |
| </dl>
| |
| <dl class="section return"><dt>Returns</dt><dd>: Shared pointer to concrete Consumer implementation </dd></dl>
| |
|
| |
| </div>
| |
| </html>
| |
|
| |
| === Python ===
| |
|
| |
| <noinclude>
| |
| {{BIPS/Foot||}}
| |
| </noinclude>
| |