SMACC2
Loading...
Searching...
No Matches
cl_gcalcli.hpp
Go to the documentation of this file.
1// Copyright 2024 RobosoftAI 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
19
23#include <cl_gcalcli/events.hpp>
24#include <cl_gcalcli/types.hpp>
25
26namespace cl_gcalcli
27{
28
54{
55public:
56 ClGcalcli();
57 explicit ClGcalcli(const GcalcliConfig & config);
58 virtual ~ClGcalcli() = default;
59
63 void configure(const GcalcliConfig & config);
64
68 const GcalcliConfig & getConfig() const { return config_; }
69
73 template <typename TOrthogonal, typename TClient>
75 {
76 // Create the subprocess executor (from smacc2 core)
77 this->createComponent<
79
80 // Create gcalcli-specific components
82 connection->configure(config_);
83
86
87 RCLCPP_INFO(getLogger(), "[ClGcalcli] Components created");
88 }
89
90 // Convenience accessors for components
92
94
99
100private:
102};
103
104} // namespace cl_gcalcli
SMACC2 Client for Google Calendar integration via gcalcli.
CpGcalcliConnection * getConnection()
CpCalendarEventListener * getEventListener()
void configure(const GcalcliConfig &config)
Set configuration before initialization.
virtual ~ClGcalcli()=default
CpCalendarPoller * getPoller()
GcalcliConfig config_
const GcalcliConfig & getConfig() const
Get current configuration.
void onComponentInitialization()
Template method for component initialization with orthogonal context.
Component that listens for calendar events and triggers notifications.
Component that polls Google Calendar and parses event data.
Component that manages gcalcli connection health.
rclcpp::Logger getLogger()
SmaccComponentType * createComponent(TArgs... targs)
Generic subprocess execution component for running CLI tools.
Configuration for gcalcli client.
Definition types.hpp:102