C++ API Reference

Control

The control interface is the high level interface that controls an acquisition.

template<typename Control>
class control : public lima::detail::control_init_mpi

The main control API.

Template Parameters

Control – is the control part of the hardware plugin of the camera

Unnamed Group

inline std::string version() const

General Info.

Returns the version of the camera plugin

Acquisition

inline void prepare_acq(acq_params_t const &acq_params)

Prepare acquisition.

inline void start_acq()

Start acquisition.

inline void soft_trigger()

Software trigger if the camera supports it.

inline void stop_acq()

Stop acquisition.

inline void close_acq()

Called when all receivers acquisition has ended.

inline void reset_acq(reset_level_enum lvl)

Reset camera.

inline int nb_frames_acquired() const

Returns the number of frames already acquired (from SDK)

Public Types

using acquisition_uid_t = lima::uuid

Identifier of the acquition used to retrieve the associated pipeline.

using notification_t = channel::sender<acq_state_enum>

A promise used to notify a state change.

Public Functions

inline control(init_params_t init_params, bool attach_debugger = false)

Construct the control and broadcast the camera init parameters.

Allocators

Warning

doxygenclass: Cannot find class “lima::numa_allocator” in doxygen xml output for project “common” from directory: .doxygen/common/

Warning

doxygenclass: Cannot find class “lima::track_allocator” in doxygen xml output for project “common” from directory: .doxygen/common/

RPC

Warning

doxygenclass: Cannot find class “lima::rpc::client” in doxygen xml output for project “common” from directory: .doxygen/common/

Warning

doxygenclass: Cannot find class “lima::rpc::server” in doxygen xml output for project “common” from directory: .doxygen/common/

Channels

Warning

doxygenfunction: Cannot find function “lima::make_buffered_channel” in doxygen xml output for project “common” from directory: .doxygen/common/

Warning

doxygenfunction: Cannot find function “lima::make_unbuffered_channel” in doxygen xml output for project “common” from directory: .doxygen/common/

Warning

doxygenclass: Cannot find class “lima::sender” in doxygen xml output for project “common” from directory: .doxygen/common/

template<typename Receiver>
class receiver : public lima::detail::receiver_init_mpi

The main receiver API implementation.

Template Parameters

Receiver – is the receiver part of the hardware plugin of the camera

Public Functions

inline auto prepare_acq(acq_params_t const &acq_params)

Prepare acquisition (e.g.

allocate buffers)

Returns

The result of the detector preparation

inline void start_acq()

Start acquisition.

inline void stop_acq()

Stop acquisition.

inline int nb_frames_xferred() const

Returns the number of frames transfered.

inline void register_on_start(std::function<void()> cbk)

Register a callack for on acquisition start event.

inline void register_on_frame_ready(std::function<void(data_t)> cbk)

Register a callack for on frame ready event.

inline void register_on_end_acq(std::function<void(int)> cbk)

Register a callack for on end of acquisition event.

HDF5

class file : private boost::base_from_member<shared_file_hid_t>, public lima::io::h5::detail::attrs_base<file>, public lima::io::h5::detail::dset_base<file>

Represents an HDF5 file.

Subclassed by lima::io::nx::file

Public Functions

inline bool is_open() const

Returns true if the file is open (aka the hid is valid)

inline group create_group(path const &name, hid_t lcpl_id = H5P_DEFAULT, hid_t gcpl_id = H5P_DEFAULT, hid_t gapl_id = H5P_DEFAULT)

Creates and returns a new group in the file.

inline group require_group(path const &name)

Opens or creates a group in the file.

Public Static Functions

static inline file create(std::filesystem::path const &name, unsigned flags = H5F_ACC_TRUNC, hid_t fcpl_id = H5P_DEFAULT, hid_t fapl_id = H5P_DEFAULT)

Creates a H5 file, flags determines the action if file exists: H5F_ACC_TRUNC: tructate, H5F_ACC_EXCL: raise an exception.

static inline file open(std::filesystem::path const &name, unsigned flags = H5F_ACC_RDONLY, hid_t fapl_id = H5P_DEFAULT)

Opens an existing H5 file, flags determines the access mode: H5F_ACC_RDONLY / H5F_ACC_RDWR.

class group : private boost::base_from_member<shared_group_hid_t>, public lima::io::h5::detail::attrs_base<group>, public lima::io::h5::detail::dset_base<group>

Represents an HDF5 group.

Subclassed by lima::io::nx::group

Public Functions

inline bool is_open() const

Returns true if the group is open (aka the hid is valid)

Public Static Functions

template<typename Location>
static inline group create(Location const &loc, path const &name, hid_t lcpl_id = H5P_DEFAULT, hid_t gcpl_id = H5P_DEFAULT, hid_t gapl_id = H5P_DEFAULT)

Creates a new group and links it into the file.

template<typename Location>
static inline group open(Location const &loc, path const &name, hid_t gapl_id = H5P_DEFAULT)

Opens an existing group.

class dataset : private boost::base_from_member<shared_dataset_hid_t>, public lima::io::h5::detail::attrs_base<dataset>

Represents an HDF5 dataset.

Public Functions

inline bool is_open() const

Returns true if the dataset is open (aka the hid is valid)

inline dataspace space() const

Returns a copy of the dataspace of the dataset.

inline predef_datatype datatype() const

Returns the datatype of the dataset.

inline void write(const void *buffer, predef_datatype dtype, hid_t mem_dspace = H5S_ALL, hid_t file_dspace = H5S_ALL, hid_t dtpl_id = H5P_DEFAULT)

Writes data to the dataset.

inline void write_chunk(const void *buffer, uint32_t filter_mask, hsize_t offset[], size_t data_size, hid_t dtpl_id = H5P_DEFAULT)

Writes chunk to the dataset.

inline void read(void *buffer, predef_datatype dtype, hid_t mem_dspace = H5S_ALL, hid_t file_dspace = H5S_ALL, hid_t dtpl_id = H5P_DEFAULT)

Reads from the dataset.

inline herr_t extent(const hsize_t size[])

Changes the sizes of a dataset’s dimensions.

Creates a soft link to an object (allowed to dangle)