sensor_api
source
LibMultiSense
details
factory.cc
Go to the documentation of this file.
1
37
#include "
details/legacy/channel.hh
"
38
39
namespace
multisense
40
{
41
42
std::unique_ptr<Channel>
Channel::create
(
const
Config
&config,
43
const
ChannelImplementation
&impl)
44
{
45
switch
(impl)
46
{
47
case
ChannelImplementation::LEGACY
:
48
{
49
try
50
{
51
return
std::unique_ptr<legacy::LegacyChannel>(
new
legacy::LegacyChannel
(config));
52
}
53
catch
(
const
std::exception &e)
54
{
55
CRL_DEBUG
(
"Unable to create legacy channel %s\n"
, e.what());
56
return
nullptr
;
57
}
58
}
59
default
:
60
{
61
return
nullptr
;
62
}
63
}
64
}
65
66
}
CRL_DEBUG
#define CRL_DEBUG(fmt,...)
Definition:
Exception.hh:71
multisense::Channel::ChannelImplementation
ChannelImplementation
Identifiers for the different Channel implementations. Used for selecting a implementation at runtime...
Definition:
LibMultiSense/include/MultiSense/MultiSenseChannel.hh:52
channel.hh
multisense::Channel::Config
Definition:
LibMultiSense/include/MultiSense/MultiSenseChannel.hh:85
multisense::legacy::LegacyChannel
Definition:
LibMultiSense/include/details/legacy/channel.hh:122
multisense::Channel::create
static std::unique_ptr< Channel > create(const Config &config, const ChannelImplementation &impl=ChannelImplementation::LEGACY)
Factory create function which allows for switching between different channel implementations.
Definition:
factory.cc:42
multisense
Definition:
factory.cc:39
multisense::Channel::ChannelImplementation::LEGACY
@ LEGACY
Use the Legacy MultiSense wire protocol implemented as part of LibMultiSense.
multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:08