1.1.5. Mix

using eprosima::is::core::Mix = MiddlewareInterfaceExtension
class eprosima::is::core::MiddlewareInterfaceExtension

Abbreviated as “Mix”, allows to generate mix files which contain the required dynamic libraries for a certain Integration Service instance to be loaded.

Also, when talking about a specific SystemHandle, mix files are used to list the necessary dynamic libraries, containing information about conversion from the specific middleware data type definition (such as ROS 2 msg) to xtypes, and viceversa.

Libraries within the mix file are listed using the following structure:

  • For Linux systems: "dl" : "../../<relative_path_to_dl>"

  • On Windows platforms: "dll" : "../../<relative/path_to_dll>"

These extensions are automatically generated by is_mix_generator CMake function and they contain information about specific types, such as their conversion methods to/from xtypes.

Public Functions

MiddlewareInterfaceExtension(YAML::Node &&mix_content, const std::string &absolute_file_directory_path)

Constructor.

Parameters
  • [in] mix_content: Movable reference representing the content of the mix file.

  • [in] absolute_file_directory_path: Absolute path where the mix file is stored. This path will be later on used as a starting point to navigate to the relative paths defined by the mix file, so that dynamic libraries can be loaded.

MiddlewareInterfaceExtension(const MiddlewareInterfaceExtension &other) = delete

MiddlewareInterfaceExtension shall not be copy constructible.

MiddlewareInterfaceExtension(MiddlewareInterfaceExtension &&other)

Move constructor.

Parameters

~MiddlewareInterfaceExtension()

Destructor.

bool load()

Performs the load operation of the dynamic libraries defined in the mix file.

Return

true if the dynamic libraries were loaded successfully, false otherwise.

Public Static Functions

MiddlewareInterfaceExtension from_file(const std::string &filename)

Creates a MiddlewareInterfaceExtension representation from a mix file path.

Return

A properly initialized MiddlewareInterfaceExtension object.

Parameters
  • [in] filename: Path to the mix file.

MiddlewareInterfaceExtension from_string(const std::string &mix_text, const std::string &absolute_file_directory_path)

Creates a MiddlewareInterfaceExtension representation from a text YAML representation and an absolute file directory path.

Return

A properly initialized MiddlewareInterfaceExtension object.

Parameters
  • [in] mix_text: Content of the mix file, in text format.

  • [in] absolute_file_directory_path: Path from where to start looking for dynamic libraries defined in the mix content.

MiddlewareInterfaceExtension from_node(YAML::Node &&node, const std::string &absolute_file_directory_path)

Creates a MiddlewareInterfaceExtension representation from a YAML node representation and an absolute file directory path.

Return

A properly initialized MiddlewareInterfaceExtension object.

Parameters
  • [in] node: Content of the mix file, in YAML format.

  • [in] absolute_file_directory_path: Path from where to start looking for the dynamic libraries defined in the mix content.