roboligo
Loading...
Searching...
No Matches
Commander.hpp
Go to the documentation of this file.
1// Copyright 2026 Juan S. Cely G.
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// https://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#ifndef ROBOLIGO_COMMON_CONNECTOR__COMMANDER_HPP_
16#define ROBOLIGO_COMMON_CONNECTOR__COMMANDER_HPP_
17
19
20namespace roboligo
21{
29 class Commander : public Linker
30 {
31 public:
37 Commander(std::string new_name, std::string new_value);
38
42 virtual ~Commander() = default;
43
48 void set_stamp(bool stamped);
49
54 bool is_stamped(void);
55
61 void init(std::string new_name, std::string new_value);
62
63 protected:
69 void initialize(std::string new_name, std::string new_topic);
70
71 bool use_stamp_{true};
72 };
73
74} // namespace roboligo
75#endif // ROBOLIGO_COMMON_CONNECTOR__COMMANDER_HPP_
virtual ~Commander()=default
Virtual destructor.
void set_stamp(bool stamped)
Enable or disable timestamp stamping for messages.
Definition Commander.cpp:39
void initialize(std::string new_name, std::string new_topic)
Protected initialization method.
Definition Commander.cpp:25
bool use_stamp_
Flag indicating whether to include timestamps in published messages.
Definition Commander.hpp:71
void init(std::string new_name, std::string new_value)
Initialize the commander with name and value.
Definition Commander.cpp:32
bool is_stamped(void)
Check if timestamp stamping is enabled.
Definition Commander.cpp:45
Commander(std::string new_name, std::string new_value)
Constructor for Commander.
Definition Commander.cpp:19
Linker()
Default constructor.
Definition Linker.hpp:51
Definition ClassificationBase.hpp:28