SMACC2
Loading...
Searching...
No Matches
cl_ros2_timer.hpp
Go to the documentation of this file.
1// Copyright 2025 Robosoft Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <chrono>
18#include <optional>
19#include <smacc2/smacc.hpp>
20
23
25{
26template <typename TSource, typename TOrthogonal>
27struct EvTimer : sc::event<EvTimer<TSource, TOrthogonal>>
28{
29};
30
32{
33public:
34 ClRos2Timer(rclcpp::Duration duration, bool oneshot = false);
35
36 virtual ~ClRos2Timer();
37
38 // Component-based initialization
39 template <typename TOrthogonal, typename TClient>
41 {
42 // Create the core timer component
45
46 // Create the timer listener component that requires CpRos2Timer
48 }
49
50private:
51 rclcpp::Duration duration_;
53};
54} // namespace cl_ros2_timer
ClRos2Timer(rclcpp::Duration duration, bool oneshot=false)
SmaccComponentType * createComponent(TArgs... targs)