Skip to content
Snippets Groups Projects
Commit f3cd80fb authored by Fabian Reister's avatar Fabian Reister
Browse files

moving hard coded names to events.h (will be used elsewhere as well...)

parent fe49a3ea
No related branches found
No related tags found
1 merge request!22emitting UserAbortEvent instead of GoalReached on stop()
...@@ -10,6 +10,18 @@ ...@@ -10,6 +10,18 @@
namespace armarx::navigation::core 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 struct Event
{ {
armarx::core::time::DateTime timestamp; armarx::core::time::DateTime timestamp;
......
...@@ -64,55 +64,57 @@ namespace armarx::navigation::memory::client::events ...@@ -64,55 +64,57 @@ namespace armarx::navigation::memory::client::events
bool bool
Writer::store(const core::GoalReachedEvent& event, const std::string& clientID) 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 bool
Writer::store(const core::WaypointReachedEvent& event, const std::string& clientID) Writer::store(const core::WaypointReachedEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::WaypointReachedEvent>( return storeImpl<core::arondto::WaypointReachedEvent>(
event, "WaypointReachedEvent", clientID); event, core::event_names::WaypointReached, clientID);
} }
bool bool
Writer::store(const core::InternalErrorEvent& event, const std::string& clientID) 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 bool
Writer::store(const core::GlobalPlanningFailedEvent& event, const std::string& clientID) Writer::store(const core::GlobalPlanningFailedEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::GlobalPlanningFailedEvent>( return storeImpl<core::arondto::GlobalPlanningFailedEvent>(
event, "GlobalPlanningFailedEvent", clientID); event, core::event_names::GlobalPlanningFailed, clientID);
} }
bool bool
Writer::store(const core::MovementStartedEvent& event, const std::string& clientID) Writer::store(const core::MovementStartedEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::MovementStartedEvent>( return storeImpl<core::arondto::MovementStartedEvent>(
event, "MovementStartedEvent", clientID); event, core::event_names::MovementStarted, clientID);
} }
bool bool
Writer::store(const core::UserAbortTriggeredEvent& event, const std::string& clientID) Writer::store(const core::UserAbortTriggeredEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::UserAbortTriggeredEvent>( return storeImpl<core::arondto::UserAbortTriggeredEvent>(
event, "UserAbortTriggered", clientID); event, core::event_names::UserAbortTriggered, clientID);
} }
bool bool
Writer::store(const core::SafetyThrottlingTriggeredEvent& event, const std::string& clientID) Writer::store(const core::SafetyThrottlingTriggeredEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::SafetyThrottlingTriggeredEvent>( return storeImpl<core::arondto::SafetyThrottlingTriggeredEvent>(
event, "SafetyThrottlingTriggeredEvent", clientID); event, core::event_names::SafetyThrottlingTriggered, clientID);
} }
bool bool
Writer::store(const core::SafetyStopTriggeredEvent& event, const std::string& clientID) Writer::store(const core::SafetyStopTriggeredEvent& event, const std::string& clientID)
{ {
return storeImpl<core::arondto::SafetyStopTriggeredEvent>( return storeImpl<core::arondto::SafetyStopTriggeredEvent>(
event, "SafetyStopTriggeredEvent", clientID); event, core::event_names::SafetyStopTriggered, clientID);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment