include
ros
wall_timer_options.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2009, Willow Garage, Inc.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are met:
6
* * Redistributions of source code must retain the above copyright notice,
7
* this list of conditions and the following disclaimer.
8
* * Redistributions in binary form must reproduce the above copyright
9
* notice, this list of conditions and the following disclaimer in the
10
* documentation and/or other materials provided with the distribution.
11
* * Neither the names of Stanford University or Willow Garage, Inc. nor the names of its
12
* contributors may be used to endorse or promote products derived from
13
* this software without specific prior written permission.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
* POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef ROSCPP_WALL_TIMER_OPTIONS_H
29
#define ROSCPP_WALL_TIMER_OPTIONS_H
30
31
#include "common.h"
32
#include "
ros/forwards.h
"
33
34
namespace
ros
35
{
36
40
struct
ROSCPP_DECL
WallTimerOptions
41
{
42
WallTimerOptions
()
43
: period(0.1)
44
, callback_queue(0)
45
, oneshot(false)
46
, autostart(true)
47
{
48
}
49
50
/*
51
* \brief Constructor
52
* \param
53
*/
54
WallTimerOptions
(
WallDuration
_period,
const
WallTimerCallback
& _callback,
CallbackQueueInterface
* _queue,
55
bool
oneshot =
false
,
bool
autostart =
true
)
56
: period(_period)
57
, callback(_callback)
58
, callback_queue(_queue)
59
, oneshot(oneshot)
60
, autostart(autostart)
61
{}
62
63
WallDuration
period
;
64
WallTimerCallback
callback
;
65
66
CallbackQueueInterface
*
callback_queue
;
67
76
VoidConstPtr
tracked_object
;
77
78
bool
oneshot
;
79
bool
autostart
;
80
};
81
82
83
}
84
85
#endif
86
boost::shared_ptr< void const >
forwards.h
ros::WallTimerOptions::period
WallDuration period
The period to call the callback at.
Definition:
wall_timer_options.h:63
ros
ros::WallTimerOptions::callback
WallTimerCallback callback
The callback to call.
Definition:
wall_timer_options.h:64
ros::WallTimerCallback
boost::function< void(const WallTimerEvent &)> WallTimerCallback
Definition:
forwards.h:167
ros::WallTimerOptions::tracked_object
VoidConstPtr tracked_object
Definition:
wall_timer_options.h:76
ros::WallTimerOptions
Encapsulates all options available for starting a timer.
Definition:
wall_timer_options.h:40
ros::WallTimerOptions::WallTimerOptions
WallTimerOptions(WallDuration _period, const WallTimerCallback &_callback, CallbackQueueInterface *_queue, bool oneshot=false, bool autostart=true)
Definition:
wall_timer_options.h:54
ros::WallTimerOptions::autostart
bool autostart
Definition:
wall_timer_options.h:79
ros::WallTimerOptions::callback_queue
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
Definition:
wall_timer_options.h:66
ros::WallTimerOptions::oneshot
bool oneshot
Definition:
wall_timer_options.h:78
ros::WallDuration
ros::WallTimerOptions::WallTimerOptions
WallTimerOptions()
Definition:
wall_timer_options.h:42
ros::CallbackQueueInterface
Abstract interface for a queue used to handle all callbacks within roscpp.
Definition:
callback_queue_interface.h:82
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36