26#ifndef SIM_TO_DUT_INTERFACE_PERIODICTIMER_H
27#define SIM_TO_DUT_INTERFACE_PERIODICTIMER_H
29#include <boost/asio.hpp>
30#include <boost/asio/steady_timer.hpp>
31#include "../Events/SimEvent.h"
41 explicit PeriodicTimer(
const std::shared_ptr<boost::asio::io_service> &io,
int periodMs,
SimEvent event,
42 std::function<
void(
const SimEvent &)> callback);
49 void tick(
const boost::system::error_code &e);
51 boost::asio::steady_timer timer;
52 std::function<void(
const SimEvent &)> callback;
Timer to call given callback periodically with given event
Definition: PeriodicTimer.h:39
void stop()
Definition: PeriodicTimer.cpp:49
void start()
Definition: PeriodicTimer.cpp:42
Event object used to communicate between simulation and DuTs.
Definition: SimEvent.h:47
Definition: CANConnector.cpp:29