Skip to content

Commit

Permalink
Drake Lcm comment/documentation cleanups (RobotLocomotion#12521)
Browse files Browse the repository at this point in the history
* Drake Lcm comment/documentation cleanups

* The constructor comment describes an interface that was deprecated
  and removed months ago; remove it as the ctor behaviour is trivial.
* The inconsistent regex support (RobotLocomotion#12523) was not noted; note it now.
  • Loading branch information
ggould-tri authored Jan 3, 2020
1 parent 4b2aa37 commit ebdfb8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions lcm/drake_lcm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class DrakeSubscription final : public DrakeSubscriptionInterface {
result->user_callback_ = std::move(handler);
result->weak_self_reference_ = result;
result->strong_self_reference_ = result;
// TODO(#12523) This should escape `channel` against regex parsing.
result->native_subscription_ = native_instance->subscribeFunction(
channel, &DrakeSubscription::NativeCallback, result.get());
result->native_subscription_->setQueueCapacity(1);
Expand Down
6 changes: 6 additions & 0 deletions lcm/drake_lcm_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ class DrakeLcmInterface {
* Subscribes to an LCM channel without automatic message decoding. The
* handler will be invoked when a message arrives on channel @p channel.
*
* NOTE: Unlike upstream LCM, DrakeLcm does not support regexes for the
* `channel` argument.
* TODO(#12523) Some implementations may provide this capability, but users
* should not rely on this functionality which will be removed in the
* future.
*
* @param channel The channel to subscribe to.
* Must not be the empty string.
*
Expand Down
5 changes: 0 additions & 5 deletions lcm/drake_mock_lcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ class DrakeMockLcm : public DrakeLcmInterface {
public:
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(DrakeMockLcm);

/**
* A constructor that creates a DrakeMockLcm with loopback disabled, i.e., a
* call to Publish() will not result in subscriber callback functions being
* executed. To enable loopback behavior, call EnableLoopBack().
*/
DrakeMockLcm();

void Publish(const std::string&, const void*, int,
Expand Down

0 comments on commit ebdfb8d

Please sign in to comment.