Recording.cpp
Go to the documentation of this file.
1 #include "Recording.h"
2 
5 
8 
10 {
11  using armarx::fromIce;
12  using armarx::toIce;
13 
14  /* ===========================
15  * DirectlyStoreInput
16  * =========================== */
17  DirectlyStoreInput DirectlyStoreInput::fromIce(const dto::DirectlyStoreInput& ice)
18  {
19  return armarx::fromIce<DirectlyStoreInput>(ice);
20  }
21  dto::DirectlyStoreInput DirectlyStoreInput::toIce() const
22  {
23  return armarx::toIce<dto::DirectlyStoreInput>(*this);
24  }
25  void toIce(dto::DirectlyStoreInput& ice, const DirectlyStoreInput& result)
26  {
27  toIce(ice.memory, result.memory);
28  }
29  void fromIce(const dto::DirectlyStoreInput& ice, DirectlyStoreInput& result)
30  {
31  fromIce(ice.memory, result.memory);
32  }
33 
34  /* ===========================
35  * DirectlyStoreResult
36  * =========================== */
37  DirectlyStoreResult DirectlyStoreResult::fromIce(const dto::DirectlyStoreResult& ice)
38  {
39  return armarx::fromIce<DirectlyStoreResult>(ice);
40  }
41  dto::DirectlyStoreResult DirectlyStoreResult::toIce() const
42  {
43  return armarx::toIce<dto::DirectlyStoreResult>(*this);
44  }
45  void toIce(dto::DirectlyStoreResult& ice, const DirectlyStoreResult& result)
46  {
47  toIce(ice, dynamic_cast<const detail::SuccessHeader&>(result));
48  }
49  void fromIce(const dto::DirectlyStoreResult& ice, DirectlyStoreResult& result)
50  {
51  fromIce(ice, dynamic_cast<detail::SuccessHeader&>(result));
52  }
53 
54  /* ===========================
55  * DirectlyStoreInput
56  * =========================== */
57  StartRecordInput StartRecordInput::fromIce(const dto::StartRecordInput& ice)
58  {
59  return armarx::fromIce<StartRecordInput>(ice);
60  }
61  dto::StartRecordInput StartRecordInput::toIce() const
62  {
63  return armarx::toIce<dto::StartRecordInput>(*this);
64  }
65  void toIce(dto::StartRecordInput& ice, const StartRecordInput& result)
66  {
67  toIce(ice.executionTime, result.executionTime);
68  ice.recordingID = result.recordingID;
69  ice.configuration.clear();
70  for (const auto& [k, v] : result.configuration)
71  {
73  armem::toIce(id, k);
74 
75  dto::RecordingModeConfiguration c;
76  c.mode = v.mode;
77  c.frequency = v.frequency;
78 
79  ice.configuration[id] = c;
80  }
81  }
82  void fromIce(const dto::StartRecordInput& ice, StartRecordInput& result)
83  {
84  fromIce(ice.executionTime, result.executionTime);
85  result.recordingID = ice.recordingID;
86  result.configuration.clear();
87  for (const auto& [k, v] : ice.configuration)
88  {
89  armem::MemoryID id;
90  armem::fromIce(k, id);
91 
93  c.mode = v.mode;
94  c.frequency = v.frequency;
95 
96  result.configuration[id] = c;
97  }
98  }
99 
100  /* ===========================
101  * StartRecordResult
102  * =========================== */
103  StartRecordResult StartRecordResult::fromIce(const dto::StartRecordResult& ice)
104  {
105  return armarx::fromIce<StartRecordResult>(ice);
106  }
107  dto::StartRecordResult StartRecordResult::toIce() const
108  {
109  return armarx::toIce<dto::StartRecordResult>(*this);
110  }
111  void toIce(dto::StartRecordResult& ice, const StartRecordResult& result)
112  {
113  toIce(ice, dynamic_cast<const detail::SuccessHeader&>(result));
114  }
115  void fromIce(const dto::StartRecordResult& ice, StartRecordResult& result)
116  {
117  fromIce(ice, dynamic_cast<detail::SuccessHeader&>(result));
118  }
119 
120  /* ===========================
121  * StopRecordResult
122  * =========================== */
123  StopRecordResult StopRecordResult::fromIce(const dto::StopRecordResult& ice)
124  {
125  return armarx::fromIce<StopRecordResult>(ice);
126  }
127  dto::StopRecordResult StopRecordResult::toIce() const
128  {
129  return armarx::toIce<dto::StopRecordResult>(*this);
130  }
131  void toIce(dto::StopRecordResult& ice, const StopRecordResult& result)
132  {
133  toIce(ice, dynamic_cast<const detail::SuccessHeader&>(result));
134  }
135  void fromIce(const dto::StopRecordResult& ice, StopRecordResult& result)
136  {
137  fromIce(ice, dynamic_cast<detail::SuccessHeader&>(result));
138  }
139 
140  /* ===========================
141  * RecordStatusResult
142  * =========================== */
143  RecordStatusResult RecordStatusResult::fromIce(const dto::RecordStatusResult& ice)
144  {
145  return armarx::fromIce<RecordStatusResult>(ice);
146  }
147  dto::RecordStatusResult RecordStatusResult::toIce() const
148  {
149  return armarx::toIce<dto::RecordStatusResult>(*this);
150  }
151  void toIce(dto::RecordStatusResult& ice, const RecordStatusResult& result)
152  {
153  toIce(ice, dynamic_cast<const detail::SuccessHeader&>(result));
154  }
155  void fromIce(const dto::RecordStatusResult& ice, RecordStatusResult& result)
156  {
157  fromIce(ice, dynamic_cast<detail::SuccessHeader&>(result));
158  }
159 
160  /* ===========================
161  * GetServerStructureResult
162  * ===========================
163  GetServerStructureResult GetServerStructureResult::fromIce(const dto::GetServerStructureResult& ice)
164  {
165  return armarx::fromIce<GetServerStructureResult>(ice);
166  }
167  dto::GetServerStructureResult GetServerStructureResult::toIce() const
168  {
169  return armarx::toIce<dto::GetServerStructureResult>(*this);
170  }
171  void toIce(dto::GetServerStructureResult& ice, const GetServerStructureResult& result)
172  {
173  toIce(ice, dynamic_cast<const detail::SuccessHeader&>(result));
174  toIce(ice.serverStructure, result.serverStructure);
175  }
176  void fromIce(const dto::GetServerStructureResult& ice, GetServerStructureResult& result)
177  {
178  fromIce(ice, dynamic_cast<detail::SuccessHeader&>(result));
179  fromIce(ice.serverStructure, result.serverStructure);
180  }*/
181 }
Recording.h
armarx::armem::server::ltm::RecordStatusResult
Definition: Recording.h:95
armarx::armem::server::ltm::DirectlyStoreResult::toIce
dto::DirectlyStoreResult toIce() const
Definition: Recording.cpp:41
armarx::armem::server::ltm::toIce
void toIce(dto::DirectlyStoreInput &ice, const DirectlyStoreInput &result)
Definition: Recording.cpp:25
armarx::armem::server::ltm::StartRecordResult::toIce
dto::StartRecordResult toIce() const
Definition: Recording.cpp:107
armarx::armem::server::ltm::DirectlyStoreInput
Definition: Recording.h:14
armarx::armem::toIce
void toIce(data::MemoryID &ice, const MemoryID &id)
Definition: ice_conversions.cpp:21
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
ice_conversions.h
armarx::armem::server::ltm::fromIce
void fromIce(const dto::DirectlyStoreInput &ice, DirectlyStoreInput &result)
Definition: Recording.cpp:29
armarx::armem::server::ltm::StartRecordInput::fromIce
static StartRecordInput fromIce(const dto::StartRecordInput &ice)
Definition: Recording.cpp:57
armarx::armem::server::ltm::DirectlyStoreResult::fromIce
static DirectlyStoreResult fromIce(const dto::DirectlyStoreResult &ice)
Definition: Recording.cpp:37
armarx::armem::server::ltm::RecordStatusResult::toIce
dto::RecordStatusResult toIce() const
Definition: Recording.cpp:147
armarx::armem::server::ltm::StopRecordResult::toIce
dto::StopRecordResult toIce() const
Definition: Recording.cpp:127
armarx::toIce
void toIce(std::map< IceKeyT, IceValueT > &iceMap, const boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
Definition: ice_conversions_boost_templates.h:15
armarx::armem::MemoryID
A memory ID.
Definition: MemoryID.h:47
armarx::armem::server::ltm::RecordStatusResult::fromIce
static RecordStatusResult fromIce(const dto::RecordStatusResult &ice)
Definition: Recording.cpp:143
armarx::armem::server::ltm::DirectlyStoreInput::toIce
dto::DirectlyStoreInput toIce() const
Definition: Recording.cpp:21
armarx::armem::server::ltm::DirectlyStoreInput::fromIce
static DirectlyStoreInput fromIce(const dto::DirectlyStoreInput &ice)
Definition: Recording.cpp:17
armarx::armem::server::ltm::StartRecordInput::toIce
dto::StartRecordInput toIce() const
Definition: Recording.cpp:61
armarx::armem::server::ltm::StopRecordResult
Definition: Recording.h:82
armarx::armem::detail::SuccessHeader
Definition: SuccessHeader.h:13
armarx::armem::fromIce
void fromIce(const data::MemoryID &ice, MemoryID &id)
Definition: ice_conversions.cpp:31
armarx::armem::server::ltm::StartRecordResult::fromIce
static StartRecordResult fromIce(const dto::StartRecordResult &ice)
Definition: Recording.cpp:103
armarx::armem::server::ltm::StartRecordInput
Definition: Recording.h:46
armarx::fromIce
void fromIce(const std::map< IceKeyT, IceValueT > &iceMap, boost::container::flat_map< CppKeyT, CppValueT > &cppMap)
Definition: ice_conversions_boost_templates.h:26
armarx::armem::server::ltm::StartRecordInput::RecordingModeConfiguration
Definition: Recording.h:48
armarx::armem::server::ltm
Definition: forward_declarations.h:20
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39
armarx::armem::server::ltm::StartRecordInput::recordingID
std::string recordingID
Definition: Recording.h:55
armarx::armem::server::ltm::StartRecordInput::executionTime
armarx::core::time::DateTime executionTime
Definition: Recording.h:54
armarx::armem::server::ltm::DirectlyStoreInput::memory
armem::wm::Memory memory
Definition: Recording.h:16
armarx::armem::server::ltm::StopRecordResult::fromIce
static StopRecordResult fromIce(const dto::StopRecordResult &ice)
Definition: Recording.cpp:123
armarx::armem::server::ltm::StartRecordResult
Definition: Recording.h:69
ice_conversions_templates.h
armarx::armem::server::ltm::DirectlyStoreResult
Definition: Recording.h:29
ice_conversions.h
ice_conversions.h
armarx::armem::server::ltm::StartRecordInput::configuration
std::map< armem::MemoryID, RecordingModeConfiguration > configuration
Definition: Recording.h:56
armarx::human::MemoryID
const armem::MemoryID MemoryID
Definition: memory_ids.cpp:29