Writer.h
Go to the documentation of this file.
1 /**
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Fabian Reister ( fabian dot reister at kit dot edu )
17  * @date 2021
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
26 
30 
31 
33 {
34 
36  {
37  public:
39 
40  bool store(const core::GoalReachedEvent& event, const std::string& clientID);
41  bool store(const core::WaypointReachedEvent& event, const std::string& clientID);
42  bool store(const core::InternalErrorEvent& event, const std::string& clientID);
43  bool store(const core::UserAbortTriggeredEvent& event, const std::string& clientID);
44  bool store(const core::GlobalPlanningFailedEvent& event, const std::string& clientID);
45  bool store(const core::LocalPlanningFailedEvent& event, const std::string& clientID);
46  bool store(const core::MovementStartedEvent& event, const std::string& clientID);
47  bool store(const core::SafetyThrottlingTriggeredEvent& event, const std::string& clientID);
48  bool store(const core::SafetyStopTriggeredEvent& event, const std::string& clientID);
49 
50 
51  std::string propertyPrefix() const override;
52  Properties defaultProperties() const override;
53 
54  protected:
55  private:
56  std::mutex writeMutex;
57 
58  bool store(const armem::Commit& commit);
59  bool store(const armem::EntityUpdate& commit);
60 
61  template <typename AronEventT, typename EventT>
62  bool
63  storeImpl(const EventT& event, const std::string& eventName, const std::string& clientID);
64  };
65 } // namespace armarx::navigation::memory::client::events
armarx::armem::Commit
A bundle of updates to be sent to the memory.
Definition: Commit.h:89
armarx::navigation::core::InternalErrorEvent
Event describing the occurance of an internal unhandled error.
Definition: events.h:101
armarx::navigation::core::SafetyThrottlingTriggeredEvent
Event desciribing that a significant safety throttling factor was reached.
Definition: events.h:68
armarx::armem::client::util::SimpleWriterBase::Properties
Definition: SimpleWriterBase.h:49
armarx::navigation::memory::client::events::Writer::store
bool store(const core::GoalReachedEvent &event, const std::string &clientID)
Definition: Writer.cpp:65
constants.h
armarx::armem::client::util::SimpleWriterBase::SimpleWriterBase
SimpleWriterBase()
Definition: SimpleWriterBase.cpp:8
events.h
armarx::navigation::core::SafetyStopTriggeredEvent
Event describing that for security reasons, the robot was stopped completely.
Definition: events.h:84
armarx::armem::EntityUpdate
An update of an entity for a specific point in time.
Definition: Commit.h:27
armarx::navigation::core::UserAbortTriggeredEvent
Event describing that the user aborted the current execution.
Definition: events.h:93
armarx::armem::client::util::SimpleWriterBase
Definition: SimpleWriterBase.h:38
armarx::navigation::core::GlobalPlanningFailedEvent
Definition: events.h:31
armarx::navigation::core::GoalReachedEvent
Event describing that the targeted goal was successfully reached.
Definition: events.h:49
armarx::navigation::memory::client::events::Writer::defaultProperties
Properties defaultProperties() const override
Definition: Writer.cpp:24
Commit.h
armarx::navigation::memory::client::events::Writer::propertyPrefix
std::string propertyPrefix() const override
Definition: Writer.cpp:18
armarx::navigation::core::WaypointReachedEvent
Event describing that a user-defined waypoint was successfully reached.
Definition: events.h:57
armarx::navigation::memory::client::events
This file is part of ArmarX.
Definition: Writer.cpp:14
armarx::navigation::memory::client::events::Writer
Definition: Writer.h:35
SimpleWriterBase.h
types.h
armarx::navigation::core::LocalPlanningFailedEvent
Definition: events.h:36
armarx::navigation::core::MovementStartedEvent
Definition: events.h:41