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
24#include <mutex>
25#include <string>
26
29
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 bool store(const core::GlobalTrajectoryUpdatedEvent& event, const std::string& clientID);
50 bool store(const core::LocalTrajectoryUpdatedEvent& event, const std::string& clientID);
51
52 std::string propertyPrefix() const override;
53 Properties defaultProperties() const override;
54
55 protected:
56 private:
57 std::mutex writeMutex;
58
59 bool store(const armem::Commit& commit);
60 bool store(const armem::EntityUpdate& commit);
61
62 template <typename AronEventT, typename EventT>
63 bool
64 storeImpl(const EventT& event, const std::string& eventName, const std::string& clientID);
65 };
66} // namespace armarx::navigation::memory::client::events
std::string propertyPrefix() const override
Definition Writer.cpp:24
Properties defaultProperties() const override
Definition Writer.cpp:30
bool store(const core::GoalReachedEvent &event, const std::string &clientID)
Definition Writer.cpp:84
This file is part of ArmarX.
Definition Writer.cpp:21
A bundle of updates to be sent to the memory.
Definition Commit.h:90
An update of an entity for a specific point in time.
Definition Commit.h:26
Event describing that the global trajectory was updated.
Definition events.h:114
Event describing that the targeted goal was successfully reached.
Definition events.h:53
Event describing the occurance of an internal unhandled error.
Definition events.h:105
Event describing that the local trajectory was updated.
Definition events.h:122
Event describing that for security reasons, the robot was stopped completely.
Definition events.h:88
Event desciribing that a significant safety throttling factor was reached.
Definition events.h:72
Event describing that the user aborted the current execution.
Definition events.h:97
Event describing that a user-defined waypoint was successfully reached.
Definition events.h:61