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 
33 
35 {
36 
38  {
39  public:
41 
42  bool store(const server::StackResult& result, const std::string& clientID);
43 
45  const std::string& clientID);
46 
48  const std::string& clientID);
49 
50 
51  private:
52  bool storePrepare(const armarx::navigation::global_planning::GlobalPlannerResult& result,
53  const std::string& clientID,
54  armem::Commit& commit);
55 
56  bool storePrepare(const local_planning::LocalPlannerResult& result,
57  const std::string& clientID,
58  armem::Commit& commit);
59 
60  protected:
61  std::string propertyPrefix() const override;
62  Properties defaultProperties() const override;
63 
64  private:
65  std::mutex writeMutex;
66  };
67 } // namespace armarx::navigation::memory::client::stack_result
StackResult.h
armarx::navigation::local_planning::LocalPlannerResult
Definition: LocalPlanner.h:40
armarx::armem::Commit
A bundle of updates to be sent to the memory.
Definition: Commit.h:84
LocalPlanner.h
armarx::armem::client::util::SimpleWriterBase::Properties
Definition: SimpleWriterBase.h:47
armarx::navigation::memory::client::stack_result
This file is part of ArmarX.
Definition: Reader.cpp:19
armarx::armem::client::util::SimpleWriterBase::SimpleWriterBase
SimpleWriterBase()
Definition: SimpleWriterBase.cpp:8
GlobalPlanner.h
armarx::navigation::memory::client::stack_result::Writer::propertyPrefix
std::string propertyPrefix() const override
Definition: Writer.cpp:125
armarx::armem::client::util::SimpleWriterBase
Definition: SimpleWriterBase.h:36
armarx::navigation::global_planning::GlobalPlannerResult
Definition: GlobalPlanner.h:38
armarx::navigation::memory::client::stack_result::Writer
Definition: Writer.h:37
Commit.h
armarx::navigation::memory::client::stack_result::Writer::store
bool store(const server::StackResult &result, const std::string &clientID)
Definition: Writer.cpp:22
armarx::navigation::memory::client::stack_result::Writer::defaultProperties
Properties defaultProperties() const override
Definition: Writer.cpp:131
SimpleWriterBase.h
armarx::navigation::server::StackResult
Definition: StackResult.h:34