src
fd_watcher.h
Go to the documentation of this file.
1
// Watches a set of file descriptors for changes
2
// Author: Max Schwarz <max.schwarz@uni-bonn.de>
3
4
#ifndef FD_WATCHER_H
5
#define FD_WATCHER_H
6
7
#include <
ros/time.h
>
8
9
#include <map>
10
11
#include <boost/function.hpp>
12
13
namespace
rosmon
14
{
15
16
class
FDWatcher
17
{
18
public
:
19
typedef
boost::shared_ptr<FDWatcher>
Ptr
;
20
21
FDWatcher
();
22
23
void
registerFD
(
int
fd,
const
boost::function<
void
(
int
)>& cb);
24
void
removeFD
(
int
fd);
25
26
void
wait
(
const
ros::WallDuration
& duration);
27
private
:
28
std::map<int, boost::function<void(
int
)>>
m_fds
;
29
};
30
31
}
32
33
#endif
rosmon
Definition:
diagnostics_publisher.cpp:34
rosmon::FDWatcher::FDWatcher
FDWatcher()
Definition:
fd_watcher.cpp:23
rosmon::FDWatcher::wait
void wait(const ros::WallDuration &duration)
Definition:
fd_watcher.cpp:37
boost::shared_ptr< FDWatcher >
rosmon::FDWatcher::m_fds
std::map< int, boost::function< void(int)> > m_fds
Definition:
fd_watcher.h:28
time.h
rosmon::FDWatcher::registerFD
void registerFD(int fd, const boost::function< void(int)> &cb)
Definition:
fd_watcher.cpp:27
rosmon::FDWatcher::removeFD
void removeFD(int fd)
Definition:
fd_watcher.cpp:32
rosmon::FDWatcher
Definition:
fd_watcher.h:16
rosmon::FDWatcher::Ptr
boost::shared_ptr< FDWatcher > Ptr
Definition:
fd_watcher.h:19
ros::WallDuration
rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Feb 21 2024 04:01:14