roboligo
Toggle main menu visibility
Loading...
Searching...
No Matches
roboligo_common
include
roboligo_common
connector
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
18
#include "
roboligo_common/types/Linker.hpp
"
19
20
namespace
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_
Linker.hpp
roboligo::Commander::~Commander
virtual ~Commander()=default
Virtual destructor.
roboligo::Commander::set_stamp
void set_stamp(bool stamped)
Enable or disable timestamp stamping for messages.
Definition
Commander.cpp:39
roboligo::Commander::initialize
void initialize(std::string new_name, std::string new_topic)
Protected initialization method.
Definition
Commander.cpp:25
roboligo::Commander::use_stamp_
bool use_stamp_
Flag indicating whether to include timestamps in published messages.
Definition
Commander.hpp:71
roboligo::Commander::init
void init(std::string new_name, std::string new_value)
Initialize the commander with name and value.
Definition
Commander.cpp:32
roboligo::Commander::is_stamped
bool is_stamped(void)
Check if timestamp stamping is enabled.
Definition
Commander.cpp:45
roboligo::Commander::Commander
Commander(std::string new_name, std::string new_value)
Constructor for Commander.
Definition
Commander.cpp:19
roboligo::Linker::Linker
Linker()
Default constructor.
Definition
Linker.hpp:51
roboligo
Definition
ClassificationBase.hpp:28
Generated by
1.17.0