EchoMap
2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Toggle main menu visibility
Loading...
Searching...
No Matches
ModifySensorPositionNotification.cpp
Go to the documentation of this file.
1
9
10
#include "
ModifySensorPositionNotification.hpp
"
11
12
#include "
../errors/IgnoredWarning.hpp
"
13
#include "../objects/Project.hpp"
14
15
namespace
echomap
16
{
17
18
ModifySensorPositionNotification::ModifySensorPositionNotification
(
19
const
id_type
project_id
,
20
const
id_type
sensor_id
,
21
const
Position
&
position
22
) :
23
project_id
(
project_id
),
24
sensor_id
(
sensor_id
),
25
position
(
position
)
26
{
27
}
28
29
void
ModifySensorPositionNotification::verify_project
(
30
const
Project
* context
31
)
const
32
{
33
if
(context ==
nullptr
)
34
throw
IgnoredWarning
(
"Dropping ModifySensorPositionNotification due to empty project."
);
35
36
if
(context->get_id() !=
project_id
)
37
throw
IgnoredWarning
(
38
std::format
(
39
"Dropping ModifySensorPositionNotification due to invalid project: requested {}, but have {}."
,
40
project_id
,
41
context->get_id()
42
)
43
);
44
}
45
46
}
// namespace echomap
IgnoredWarning.hpp
IgnoredWarning specification.
ModifySensorPositionNotification.hpp
ModifySensorPositionNotification specification.
echomap::IgnoredWarning
Exception class to indicate a non-fatal warning indicating an exceptional case of dropping some notif...
Definition
IgnoredWarning.hpp:22
echomap::Project
Definition
Project.hpp:26
std::format
T format(T... args)
echomap
The main EchoMap outermost namespace for all non-exported symbols.
Definition
ActionController.hpp:20
echomap::ModifySensorPositionNotification::sensor_id
id_type sensor_id
The ID of the moved Sensor.
Definition
ModifySensorPositionNotification.hpp:52
echomap::ModifySensorPositionNotification::ModifySensorPositionNotification
ModifySensorPositionNotification(id_type project_id, id_type sensor_id, const Position &position)
Create a new ModifySensorPositionNotification to indicate that a Sensor has moved.
Definition
ModifySensorPositionNotification.cpp:18
echomap::ModifySensorPositionNotification::project_id
id_type project_id
The ID of the Project which owns the updated Sensor.
Definition
ModifySensorPositionNotification.hpp:51
echomap::ModifySensorPositionNotification::position
Position position
The new Position of the referenced Sensor.
Definition
ModifySensorPositionNotification.hpp:53
echomap::ModifySensorPositionNotification::verify_project
void verify_project(const Project *context) const
Verify that the given Project matches the intended target.
Definition
ModifySensorPositionNotification.cpp:29
echomap::Position
A generic 3D position structure.
Definition
Position.hpp:20
src
notifications
ModifySensorPositionNotification.cpp
Generated by
1.17.0