roboligo
Toggle main menu visibility
Loading...
Searching...
No Matches
roboligo_common
include
roboligo_common
connector
Sensor.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__SENSOR_HPP_
16
#define ROBOLIGO_COMMON_CONNECTOR__SENSOR_HPP_
17
18
#include "
roboligo_common/types/Interface.hpp
"
19
#include "
roboligo_common/types/Linker.hpp
"
20
21
namespace
roboligo
22
{
30
class
Sensor
:
public
Linker
31
{
32
public
:
38
Sensor
(std::string new_name, std::string new_topic);
39
43
virtual
~Sensor
() =
default
;
44
50
void
init
(std::string new_name, std::string new_topic);
51
52
protected
:
53
59
void
initialize
(std::string new_name, std::string new_topic);
60
61
interfaces::modes
mode_
{
interfaces::modes::SUBSCRIBER
};
62
63
};
64
65
}
// namespace roboligo
66
#endif
// ROBOLIGO_COMMON_CONNECTOR__SENSOR_HPP_
Interface.hpp
Linker.hpp
roboligo::Linker::Linker
Linker()
Default constructor.
Definition
Linker.hpp:51
roboligo::Sensor::mode_
interfaces::modes mode_
The connection mode set to SUBSCRIBER for receiving sensor data.
Definition
Sensor.hpp:61
roboligo::Sensor::initialize
void initialize(std::string new_name, std::string new_topic)
Protected initialization method.
Definition
Sensor.cpp:25
roboligo::Sensor::~Sensor
virtual ~Sensor()=default
Virtual destructor.
roboligo::Sensor::Sensor
Sensor(std::string new_name, std::string new_topic)
Constructor for Sensor.
Definition
Sensor.cpp:19
roboligo::Sensor::init
void init(std::string new_name, std::string new_topic)
Initializes the sensor with a name and topic.
Definition
Sensor.cpp:33
roboligo::interfaces::modes
modes
Enumeration for interface operational modes.
Definition
Interface.hpp:51
roboligo::interfaces::modes::SUBSCRIBER
@ SUBSCRIBER
Definition
Interface.hpp:53
roboligo
Definition
ClassificationBase.hpp:28
Generated by
1.17.0