Reader.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 
29 
32 
34 {
35 
37  {
38  public:
40  ~Reader() override;
41 
42  struct Query
43  {
44  std::string providerName;
47  };
48 
49  struct HumanResult
50  {
52 
53  enum Status
54  {
58  } status;
59 
60  std::string errorMessage = "";
61 
62  operator bool() const noexcept
63  {
64  return status == Status::Success;
65  }
66  };
67 
69  {
71 
72  enum Status
73  {
77  } status;
78 
79  std::string errorMessage = "";
80 
81  operator bool() const noexcept
82  {
83  return status == Status::Success;
84  }
85  };
86 
87  HumanResult queryHumans(const Query& query) const;
88  HumanGroupResult queryHumanGroups(const Query& query) const;
89 
90  protected:
93 
94  std::string propertyPrefix() const override;
95  Properties defaultProperties() const override;
96  };
97 
98 } // namespace armarx::navigation::memory::client::human
armarx::navigation::memory::client::human::Reader::propertyPrefix
std::string propertyPrefix() const override
Definition: Reader.cpp:62
armarx::navigation::memory::client::human::Reader::Query
Definition: Reader.h:42
armarx::navigation::memory::client::human::Reader::HumanGroupResult::NoData
@ NoData
Definition: Reader.h:75
armarx::navigation::memory::client::human::Reader
Definition: Reader.h:36
armarx::navigation::memory::client::human
Definition: Reader.cpp:24
armarx::navigation::memory::client::human::Reader::HumanResult::NoData
@ NoData
Definition: Reader.h:56
armarx::navigation::memory::client::human::Reader::Query::providerName
std::string providerName
Definition: Reader.h:44
armarx::navigation::memory::client::human::Reader::HumanResult
Definition: Reader.h:49
armarx::navigation::memory::client::human::Reader::HumanGroupResult
Definition: Reader.h:68
types.h
armarx::navigation::memory::client::human::Reader::defaultProperties
Properties defaultProperties() const override
Definition: Reader.cpp:68
armarx::navigation::human::Humans
std::vector< Human > Humans
Definition: types.h:45
armarx::navigation::memory::client::human::Reader::HumanGroupResult::errorMessage
std::string errorMessage
Definition: Reader.h:79
armarx::navigation::memory::client::human::Reader::queryHumans
HumanResult queryHumans(const Query &query) const
Definition: Reader.cpp:200
Costmap.h
armarx::status
status
Definition: FiniteStateMachine.h:259
armarx::navigation::memory::client::human::Reader::HumanResult::Status
Status
Definition: Reader.h:53
armarx::navigation::memory::client::human::Reader::HumanGroupResult::status
enum armarx::navigation::memory::client::human::Reader::HumanGroupResult::Status status
armarx::navigation::memory::client::human::Reader::HumanGroupResult::groups
armarx::navigation::human::HumanGroups groups
Definition: Reader.h:70
armarx::navigation::memory::client::human::Reader::HumanGroupResult::Error
@ Error
Definition: Reader.h:76
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::navigation::memory::client::human::Reader::HumanResult::humans
armarx::navigation::human::Humans humans
Definition: Reader.h:51
armarx::navigation::memory::client::human::Reader::buildHumanGroupsQuery
::armarx::armem::client::query::Builder buildHumanGroupsQuery(const Query &query) const
Definition: Reader.cpp:45
armarx::core::time::Duration
Represents a duration.
Definition: Duration.h:17
Time.h
Builder.h
armarx::armem::client::util::SimpleReaderBase::SimpleReaderBase
SimpleReaderBase()
Definition: SimpleReaderBase.cpp:9
armarx::navigation::memory::client::human::Reader::HumanResult::errorMessage
std::string errorMessage
Definition: Reader.h:60
armarx::navigation::memory::client::human::Reader::~Reader
~Reader() override
armarx::armem::client::query::Builder
The query::Builder class provides a fluent-style specification of hierarchical queries.
Definition: Builder.h:22
armarx::navigation::memory::client::human::Reader::HumanResult::Error
@ Error
Definition: Reader.h:57
armarx::navigation::memory::client::human::Reader::HumanGroupResult::Status
Status
Definition: Reader.h:72
armarx::navigation::memory::client::human::Reader::HumanResult::Success
@ Success
Definition: Reader.h:55
armarx::navigation::memory::client::human::Reader::buildHumansQuery
::armarx::armem::client::query::Builder buildHumansQuery(const Query &query) const
Definition: Reader.cpp:29
SimpleReaderBase.h
armarx::navigation::memory::client::human::Reader::queryHumanGroups
HumanGroupResult queryHumanGroups(const Query &query) const
Definition: Reader.cpp:147
armarx::armem::client::util::SimpleReaderBase
Definition: SimpleReaderBase.h:38
armarx::navigation::human::HumanGroups
std::vector< HumanGroup > HumanGroups
Definition: types.h:58
armarx::navigation::memory::client::human::Reader::HumanGroupResult::Success
@ Success
Definition: Reader.h:74
armarx::navigation::memory::client::human::Reader::Query::timestamp
armem::Time timestamp
Definition: Reader.h:45
armarx::navigation::memory::client::human::Reader::HumanResult::status
enum armarx::navigation::memory::client::human::Reader::HumanResult::Status status
armarx::navigation::memory::client::human::Reader::Query::maxAge
Duration maxAge
Definition: Reader.h:46