1.1.5. Mix¶
-
using
eprosima::is::core::Mix= MiddlewareInterfaceExtension¶
-
class
eprosima::is::core::MiddlewareInterfaceExtension¶ Abbreviated as “Mix”, allows to generate
mixfiles which contain the required dynamic libraries for a certain Integration Service instance to be loaded.Also, when talking about a specific SystemHandle,
mixfiles 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
mixfile 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_generatorCMake function and they contain information about specific types, such as their conversion methods to/fromxtypes.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 themixfile.[in] absolute_file_directory_path: Absolute path where themixfile is stored. This path will be later on used as a starting point to navigate to the relative paths defined by themixfile, so that dynamic libraries can be loaded.
-
MiddlewareInterfaceExtension(const MiddlewareInterfaceExtension &other) = delete¶ MiddlewareInterfaceExtension shall not be copy constructible.
-
MiddlewareInterfaceExtension(MiddlewareInterfaceExtension &&other)¶ Move constructor.
- Parameters
[in] other: Movable reference to another MiddlewareInterfaceExtension instance.
-
~MiddlewareInterfaceExtension()¶ Destructor.
-
bool
load()¶ Performs the load operation of the dynamic libraries defined in the
mixfile.- Return
trueif the dynamic libraries were loaded successfully,falseotherwise.
Public Static Functions
-
MiddlewareInterfaceExtension
from_file(const std::string &filename)¶ Creates a MiddlewareInterfaceExtension representation from a
mixfile path.- Return
A properly initialized MiddlewareInterfaceExtension object.
- Parameters
[in] filename: Path to themixfile.
-
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 themixfile, in text format.[in] absolute_file_directory_path: Path from where to start looking for dynamic libraries defined in themixcontent.
-
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 themixfile, in YAML format.[in] absolute_file_directory_path: Path from where to start looking for the dynamic libraries defined in themixcontent.