Drake
Drake C++ Documentation
drake_lcm_interface.h File Reference
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <fmt/format.h>
#include "drake/common/drake_copyable.h"
#include "drake/common/drake_throw.h"
#include "drake/lcm/lcm_messages.h"
Include dependency graph for drake_lcm_interface.h:
This graph shows which files directly or indirectly include this file:

Classes

class  DrakeLcmInterface
 A pure virtual interface that enables LCM to be mocked. More...
 
class  DrakeSubscriptionInterface
 A helper class returned by DrakeLcmInterface::Subscribe() that allows for (possibly automatic) unsubscription and/or queue capacity control. More...
 
class  Subscriber< Message >
 Subscribes to and stores a copy of the most recent message on a given channel, for some Message type. More...
 

Namespaces

 drake
 
 drake::lcm
 

Functions

template<typename Message >
void Publish (DrakeLcmInterface *lcm, const std::string &channel, const Message &message, std::optional< double > time_sec={})
 Publishes an LCM message on channel channel. More...
 
template<typename Message >
std::shared_ptr< DrakeSubscriptionInterface > Subscribe (DrakeLcmInterface *lcm, const std::string &channel, std::function< void(const Message &)> handler, std::function< void()> on_error={})
 Subscribes to an LCM channel named channel and decodes messages of type Message. More...
 
int LcmHandleSubscriptionsUntil (DrakeLcmInterface *lcm, const std::function< bool(void)> &finished, int timeout_millis=100)
 Convenience function that repeatedly calls lcm->HandleSubscriptions() with a timeout value of timeout_millis, until finished() returns true. More...