EchoMap 2026-07-25 6d3977c
An experimental cross-platform digital signal processing application for sound-source localisation.
Loading...
Searching...
No Matches
echomap::ModifySensorPositionNotification Struct Reference

A notification indicating that the position of a Sensor should be changed. More...

#include <ModifySensorPositionNotification.hpp>

Public Member Functions

 ModifySensorPositionNotification (id_type project_id, id_type sensor_id, const Position &position)
 Create a new ModifySensorPositionNotification to indicate that a Sensor has moved.
void verify_project (const Project *context) const
 Verify that the given Project matches the intended target.

Public Attributes

id_type project_id
 The ID of the Project which owns the updated Sensor.
id_type sensor_id
 The ID of the moved Sensor.
Position position
 The new Position of the referenced Sensor.

Detailed Description

A notification indicating that the position of a Sensor should be changed.

Produced by the SensorGeometryPanel when the user requests to move the position of a Sensor from the front-end.

Definition at line 28 of file ModifySensorPositionNotification.hpp.

Constructor & Destructor Documentation

◆ ModifySensorPositionNotification()

echomap::ModifySensorPositionNotification::ModifySensorPositionNotification ( id_type project_id,
id_type sensor_id,
const Position & position )
explicit

Create a new ModifySensorPositionNotification to indicate that a Sensor has moved.

Parameters
project_idThe ID of the Project which owns the updated Sensor.
sensor_idThe ID of the moved Sensor.
positionThe new Position of the referenced Sensor.

Definition at line 18 of file ModifySensorPositionNotification.cpp.

22 :
26{
27}
id_type project_id
The ID of the Project which owns the updated Sensor.
Position position
The new Position of the referenced Sensor.

Member Function Documentation

◆ verify_project()

void echomap::ModifySensorPositionNotification::verify_project ( const Project * context) const

Verify that the given Project matches the intended target.

Parameters
contextThe context to which the notification will apply.
Exceptions
IgnoredWarningThe notification does not apply to the given context and should be ignored.

Definition at line 29 of file ModifySensorPositionNotification.cpp.

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(
39 "Dropping ModifySensorPositionNotification due to invalid project: requested {}, but have {}.",
41 context->get_id()
42 )
43 );
44}
T format(T... args)

Member Data Documentation

◆ position

Position echomap::ModifySensorPositionNotification::position

The new Position of the referenced Sensor.

Definition at line 53 of file ModifySensorPositionNotification.hpp.

◆ project_id

id_type echomap::ModifySensorPositionNotification::project_id

The ID of the Project which owns the updated Sensor.

Definition at line 51 of file ModifySensorPositionNotification.hpp.

◆ sensor_id

id_type echomap::ModifySensorPositionNotification::sensor_id

The ID of the moved Sensor.

Definition at line 52 of file ModifySensorPositionNotification.hpp.


The documentation for this struct was generated from the following files: