forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrake_lcm_base.cc
56 lines (41 loc) · 1.43 KB
/
drake_lcm_base.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "drake/lcm/drake_lcm_base.h"
#include <stdexcept>
#include "drake/common/nice_type_name.h"
namespace drake {
namespace lcm {
namespace {
[[noreturn]] void ThrowNotImplemented(const DrakeLcmBase& self,
const char* func) {
throw std::runtime_error(
fmt::format("{}::{} is not implemented", NiceTypeName::Get(self), func));
}
} // namespace
DrakeLcmBase::DrakeLcmBase() = default;
DrakeLcmBase::~DrakeLcmBase() = default;
std::string DrakeLcmBase::get_lcm_url() const {
ThrowNotImplemented(*this, __func__);
}
void DrakeLcmBase::Publish(const std::string&, const void*, int,
std::optional<double>) {
ThrowNotImplemented(*this, __func__);
}
std::shared_ptr<DrakeSubscriptionInterface> DrakeLcmBase::Subscribe(
const std::string&, HandlerFunction) {
ThrowNotImplemented(*this, __func__);
}
std::shared_ptr<DrakeSubscriptionInterface> DrakeLcmBase::SubscribeMultichannel(
std::string_view, MultichannelHandlerFunction) {
ThrowNotImplemented(*this, __func__);
}
std::shared_ptr<DrakeSubscriptionInterface> DrakeLcmBase::SubscribeAllChannels(
MultichannelHandlerFunction) {
ThrowNotImplemented(*this, __func__);
}
int DrakeLcmBase::HandleSubscriptions(int) {
ThrowNotImplemented(*this, __func__);
}
void DrakeLcmBase::OnHandleSubscriptionsError(const std::string&) {
ThrowNotImplemented(*this, __func__);
}
} // namespace lcm
} // namespace drake