Buffer Interprocess Sharing: User Manual

From RidgeRun Developer Wiki


  Index  







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:

Producer prod(channel, numbufs, bufsize);
Buffer buf;

prod.pull(buf);
process(buf); 
prod.push(buf);

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

enum rr::Backends

Available implementations of IBufferPoolController.

These are used as parameters in building producer and consumer objects in order to indicate which IBufferPoolController backend these should use

Enumerator
kShm 

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.

kNvSci 

The NvSci backend indicates to producers and consumers that the Buffer Pool Controller will use the NvSci API to manage the process communication.

Creating an instance: Producer

std::shared_ptr< IProducer > rr::IProducer::Build ( const Backends  backend,
const std::string &  channel,
const uint32_t  buffers,
const size_t  size,
const bool  in_order = true,
const std::shared_ptr< ILogger >  logger = nullptr 
)
static

This method is the Factory method by which new Producer implementations must be constructed.

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.

Parameters
backend: Implementation to use for the underlying IBufferPoolController
channel: Name of shared memory space
buffers: Number of buffers in the shared memory space
size: Size of each individual buffer
in_order: Specifies whether to follow in order or out of order execution Default = true
logger: Shared pointer to logger used for internal logging
Returns
: Shared pointer to concrete Producer implementation

Creating an instance: Consumer

std::shared_ptr< IConsumer > rr::IConsumer::Build ( const Backends  backend,
const std::string &  channel,
const uint32_t  buffers,
const size_t  size,
const bool  in_order = true,
const std::shared_ptr< ILogger >  logger = nullptr 
)
static

This method is the Factory method by which new Consumer implementations must be constructed.

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.

Parameters
backend: Implementation to use for the underlying IBufferPoolController
channel: Name of shared memory space
buffers: Number of buffers in the shared memory space
size: Size of each individual buffer
in_order: Specifies whether to follow in order or out of order execution Default = true
logger: Shared pointer to logger used for internal logging
Returns
: Shared pointer to concrete Consumer implementation

Python


  Index