helios.layouts.ipc_tools.ShmManagerMultiArrays

class helios.layouts.ipc_tools.ShmManagerMultiArrays[source]

Bases: object

This Obj. allows to deal with multiple arrays stored using SharedMemory

Methods

add_array

This creates a shared memory resource to store the data.

cleanup

cleanup_mem

load_array

This will load the shared memory resource associate with buffer_name into the current ShmManagerMultiArrays The shared memory obj will be accessible through

add_array(attr_name, data, dimension, dtype)[source]

This creates a shared memory resource to store the data.

The shared memory obj will be accessible through

>>> self.attr_name
Parameters
  • attr_name (str) – used to associate a new attribute ‘attr_name’ with the current (self) ShmManagerMultiArrays.

  • data (ndarray) –

  • dimension (int) –

  • dtype (str) –

load_array(attr_name, buffer_name, dimension, dtype, num_elements=None)[source]

This will load the shared memory resource associate with buffer_name into the current ShmManagerMultiArrays The shared memory obj will be accessible through

>>> self.attr_name
Parameters
  • attr_name (str) – this name will be used to associate a new attribute ‘attr_name’ with the current (self) ShmManagerMultiArrays.

  • buffer_name (str) –

  • dimension (int) –

  • dtype (str) –

  • num_elements (int, optional) – In MacOs a shared memory resource can be created with a different number of elements then the original data