diff --git a/source/armarx/navigation/core/events.h b/source/armarx/navigation/core/events.h index fd95336fdc4ccc8273e455d80fa56661d205e158..09ef7781be7fc2f55e481d199c851f89b3d2d4db 100644 --- a/source/armarx/navigation/core/events.h +++ b/source/armarx/navigation/core/events.h @@ -10,6 +10,18 @@ namespace armarx::navigation::core { + namespace event_names + { + inline const std::string GlobalPlanningFailed = "GlobalPlanningFailedEvent"; + inline const std::string MovementStarted = "MovementStartedEvent"; + inline const std::string GoalReached = "GoalReachedEvent"; + inline const std::string WaypointReached = "WaypointReachedEvent"; + inline const std::string SafetyThrottlingTriggered = "SafetyThrottlingTriggeredEvent"; + inline const std::string SafetyStopTriggered = "SafetyStopTriggeredEvent"; + inline const std::string UserAbortTriggered = "UserAbortTriggeredEvent"; + inline const std::string InternalError = "InternalErrorEventEvent"; + } // namespace event_names + struct Event { armarx::core::time::DateTime timestamp; diff --git a/source/armarx/navigation/memory/client/events/Writer.cpp b/source/armarx/navigation/memory/client/events/Writer.cpp index ab64f942dc99b9873c81b9a71665a17c437e3cb6..182209501e810a9c3e62709764501743674eaa45 100644 --- a/source/armarx/navigation/memory/client/events/Writer.cpp +++ b/source/armarx/navigation/memory/client/events/Writer.cpp @@ -64,55 +64,57 @@ namespace armarx::navigation::memory::client::events bool Writer::store(const core::GoalReachedEvent& event, const std::string& clientID) { - return storeImpl<core::arondto::GoalReachedEvent>(event, "GoalReachedEvent", clientID); + return storeImpl<core::arondto::GoalReachedEvent>( + event, core::event_names::GoalReached, clientID); } bool Writer::store(const core::WaypointReachedEvent& event, const std::string& clientID) { return storeImpl<core::arondto::WaypointReachedEvent>( - event, "WaypointReachedEvent", clientID); + event, core::event_names::WaypointReached, clientID); } bool Writer::store(const core::InternalErrorEvent& event, const std::string& clientID) { - return storeImpl<core::arondto::InternalErrorEvent>(event, "InternalErrorEvent", clientID); + return storeImpl<core::arondto::InternalErrorEvent>( + event, core::event_names::InternalError, clientID); } bool Writer::store(const core::GlobalPlanningFailedEvent& event, const std::string& clientID) { return storeImpl<core::arondto::GlobalPlanningFailedEvent>( - event, "GlobalPlanningFailedEvent", clientID); + event, core::event_names::GlobalPlanningFailed, clientID); } bool Writer::store(const core::MovementStartedEvent& event, const std::string& clientID) { return storeImpl<core::arondto::MovementStartedEvent>( - event, "MovementStartedEvent", clientID); + event, core::event_names::MovementStarted, clientID); } bool Writer::store(const core::UserAbortTriggeredEvent& event, const std::string& clientID) { return storeImpl<core::arondto::UserAbortTriggeredEvent>( - event, "UserAbortTriggered", clientID); + event, core::event_names::UserAbortTriggered, clientID); } bool Writer::store(const core::SafetyThrottlingTriggeredEvent& event, const std::string& clientID) { return storeImpl<core::arondto::SafetyThrottlingTriggeredEvent>( - event, "SafetyThrottlingTriggeredEvent", clientID); + event, core::event_names::SafetyThrottlingTriggered, clientID); } bool Writer::store(const core::SafetyStopTriggeredEvent& event, const std::string& clientID) { return storeImpl<core::arondto::SafetyStopTriggeredEvent>( - event, "SafetyStopTriggeredEvent", clientID); + event, core::event_names::SafetyStopTriggered, clientID); }