SMACC
Loading...
Searching...
No Matches
smacc_updatable.h
Go to the documentation of this file.
1/*****************************************************************************************************************
2 * ReelRobotix Inc. - Software License Agreement Copyright (c) 2018
3 * Authors: Pablo Inigo Blasco, Brett Aldrich
4 *
5 ******************************************************************************************************************/
6
7#pragma once
8#include <chrono>
9#include <boost/optional.hpp>
10#include <ros/duration.h>
11#include <ros/time.h>
12
13namespace smacc
14{
16{
17public:
19 ISmaccUpdatable(ros::Duration duration);
20
21 void executeUpdate();
22 void setUpdatePeriod(ros::Duration duration);
23
24protected:
25 virtual void update() = 0;
26
27private:
28 boost::optional<ros::Duration> periodDuration_;
29 ros::Time lastUpdate_;
30};
31} // namespace smacc
virtual void update()=0
void setUpdatePeriod(ros::Duration duration)
boost::optional< ros::Duration > periodDuration_