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 {
43  : period(0.1)
44  , callback_queue(0)
45  , oneshot(false)
46  , autostart(true)
47  {
48  }
49 
50  /*
51  * \brief Constructor
52  * \param
53  */
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 
65 
67 
77 
78  bool oneshot;
79  bool autostart;
80 };
81 
82 
83 }
84 
85 #endif
86 
WallTimerOptions(WallDuration _period, const WallTimerCallback &_callback, CallbackQueueInterface *_queue, bool oneshot=false, bool autostart=true)
Encapsulates all options available for starting a timer.
WallTimerCallback callback
The callback to call.
Abstract interface for a queue used to handle all callbacks within roscpp.
CallbackQueueInterface * callback_queue
Queue to add callbacks to. If NULL, the global callback queue will be used.
WallDuration period
The period to call the callback at.
boost::function< void(const WallTimerEvent &)> WallTimerCallback
Definition: forwards.h:162


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim
autogenerated on Sun Feb 3 2019 03:29:54