rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZpbExmalifImpl.hpp
Go to the documentation of this file.
1 // GENERATED, DO NOT MANUALLY MODIFY
2 // generator core v1.10
3 // specific generator: C++ ZPB .hpp Generator v0.86
4 // source: /home/jenkins/workspace/ICS-daily-and-weekly/ifw-rad-daily/rad/cpp/_examples/exmalif/src/exmalif.xml
5 
6 #pragma once
7 
8 #include <memory>
9 #include <vector>
10 #include <string>
11 #include <algorithm>
12 #include <utility>
13 
14 #include <boost/functional/hash.hpp>
15 
16 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
17 
18 #include <mal/Mal.hpp>
19 #include <mal/utility/future.hpp>
20 #include <mal/rr/ClientAsync.hpp>
21 #include <mal/rr/AmiZpb.hpp>
22 #include <mal/ps/ZpbDataEntity.hpp>
23 #include <mal/utility/Uri.hpp>
24 #include <mal/util/ZpbList.hpp>
25 #include <mal/types/ZpbMalTypes.hpp>
26 #include <mal/rr/ServerContextZpb.hpp>
27 #include <mal/rr/ServerContextZpbAmi.hpp>
28 #include <mal/rr/ServerContextProvider.hpp>
29 
30 
31 
32 
33 namespace exmalif {
34 namespace zpb {
35 
36 // generated
37 class TelPositionImpl : public virtual ::exmalif::TelPosition,
38  public virtual ::elt::mal::ps::ZpbDataEntity<::exmalif::TelPosition> {
39  public:
41 
42  TelPositionImpl(): m_zpbObj(new ::generated::zpb::exmalif::TelPosition())
43  {}
44 
46  m_zpbObj(inner, ::elt::mal::util::list::NoopDeleter<ZpbType*>())
47  {}
48 
49 
51  TelPositionImpl() {
52  *m_zpbObj = inner;
53  }
54 
55  TelPositionImpl( float ra, float dec ): TelPositionImpl() {
56  setRa(ra);
57  setDec(dec);
58  }
59 
60 
61  TelPositionImpl(const TelPositionImpl &rhs): m_zpbObj(rhs.m_zpbObj) {}
62 
63  TelPositionImpl(TelPositionImpl &&rhs): m_zpbObj(std::move(rhs.m_zpbObj)) {}
64 
66  copy(that);
67  return *this;
68  }
69 
70  float getRa() const override {
71  return m_zpbObj->ra();
72  }
73 
74  void setRa(float ra) override {
75  m_zpbObj->set_ra(ra);
76  }
77  float getDec() const override {
78  return m_zpbObj->dec();
79  }
80 
81  void setDec(float dec) override {
82  m_zpbObj->set_dec(dec);
83  }
84 
85  std::unique_ptr<::exmalif::TelPosition> clone() const override {
86  return std::unique_ptr<::exmalif::TelPosition>(new TelPositionImpl(getRa(),getDec()));
87  }
88 
89  bool keyEquals(const ::exmalif::TelPosition& other) const override {
90  return false;
91  }
92 
93  std::size_t keyHash() const {
94  std::size_t seed = 0;
95  return seed;
96  }
97 
98  std::unique_ptr<::exmalif::TelPosition> cloneKey() const override {
99  std::unique_ptr<::exmalif::TelPosition> entity(new TelPositionImpl());
100  return entity;
101  };
102 
103  bool hasKey() const override {
104  return false;
105  }
106 
107  bool toByteArray(zmq::message_t& msg) const override {
108  msg.rebuild(m_zpbObj->ByteSizeLong());
109  return m_zpbObj->SerializeToArray(msg.data(), msg.size());
110  }
111 
112  bool toByteArray(std::string &output) const override {
113  return m_zpbObj->SerializeToString(&output);
114  }
115 
116  bool fromByteArray(const std::string &data) override {
117  return m_zpbObj->ParseFromString(data);
118  }
119 
120  bool fromByteArray(const void * data, std::size_t size) override {
121  google::protobuf::io::ArrayInputStream ais(data, size);
122  return m_zpbObj->ParseFromZeroCopyStream(&ais);
123  }
124 
125  void copy(const ::exmalif::TelPosition &from) override {
126  setRa(from.getRa());
127  setDec(from.getDec());
128  };
129 
130  operator ZpbType*() const {
131  return &*m_zpbObj;
132  }
133 
134  static int32_t typeHash() {
135  return -1632905179;
136  }
137 
138  private:
139 
140  std::shared_ptr<ZpbType> m_zpbObj;
141 
142  };
143 
144 } // namespace zpb
145 } // namespace exmalif
146 
147 
148 
149 
150 
151 
152 
153 
154 namespace exmalif {
155 namespace zpb {
156 
157 // generated
159  public virtual ::elt::mal::ps::ZpbDataEntity<::exmalif::AxesPosition> {
160  public:
162 
163  AxesPositionImpl(): m_zpbObj(new ::generated::zpb::exmalif::AxesPosition())
164  {}
165 
167  m_zpbObj(inner, ::elt::mal::util::list::NoopDeleter<ZpbType*>())
168  {}
169 
170 
172  AxesPositionImpl() {
173  *m_zpbObj = inner;
174  }
175 
176  AxesPositionImpl( float alt, float az ): AxesPositionImpl() {
177  setAlt(alt);
178  setAz(az);
179  }
180 
181 
182  AxesPositionImpl(const AxesPositionImpl &rhs): m_zpbObj(rhs.m_zpbObj) {}
183 
184  AxesPositionImpl(AxesPositionImpl &&rhs): m_zpbObj(std::move(rhs.m_zpbObj)) {}
185 
187  copy(that);
188  return *this;
189  }
190 
191  float getAlt() const override {
192  return m_zpbObj->alt();
193  }
194 
195  void setAlt(float alt) override {
196  m_zpbObj->set_alt(alt);
197  }
198  float getAz() const override {
199  return m_zpbObj->az();
200  }
201 
202  void setAz(float az) override {
203  m_zpbObj->set_az(az);
204  }
205 
206  std::unique_ptr<::exmalif::AxesPosition> clone() const override {
207  return std::unique_ptr<::exmalif::AxesPosition>(new AxesPositionImpl(getAlt(),getAz()));
208  }
209 
210  bool keyEquals(const ::exmalif::AxesPosition& other) const override {
211  return false;
212  }
213 
214  std::size_t keyHash() const {
215  std::size_t seed = 0;
216  return seed;
217  }
218 
219  std::unique_ptr<::exmalif::AxesPosition> cloneKey() const override {
220  std::unique_ptr<::exmalif::AxesPosition> entity(new AxesPositionImpl());
221  return entity;
222  };
223 
224  bool hasKey() const override {
225  return false;
226  }
227 
228  bool toByteArray(zmq::message_t& msg) const override {
229  msg.rebuild(m_zpbObj->ByteSizeLong());
230  return m_zpbObj->SerializeToArray(msg.data(), msg.size());
231  }
232 
233  bool toByteArray(std::string &output) const override {
234  return m_zpbObj->SerializeToString(&output);
235  }
236 
237  bool fromByteArray(const std::string &data) override {
238  return m_zpbObj->ParseFromString(data);
239  }
240 
241  bool fromByteArray(const void * data, std::size_t size) override {
242  google::protobuf::io::ArrayInputStream ais(data, size);
243  return m_zpbObj->ParseFromZeroCopyStream(&ais);
244  }
245 
246  void copy(const ::exmalif::AxesPosition &from) override {
247  setAlt(from.getAlt());
248  setAz(from.getAz());
249  };
250 
251  operator ZpbType*() const {
252  return &*m_zpbObj;
253  }
254 
255  static int32_t typeHash() {
256  return -1286306241;
257  }
258 
259  private:
260 
261  std::shared_ptr<ZpbType> m_zpbObj;
262 
263  };
264 
265 } // namespace zpb
266 } // namespace exmalif
267 
268 
269 
270 
271 
272 
273 
274 
275 namespace exmalif {
276 namespace zpb {
277 
278 // generated
279 class LogInfoImpl : public virtual ::exmalif::LogInfo,
280  public virtual ::elt::mal::ps::ZpbDataEntity<::exmalif::LogInfo> {
281  public:
283 
284  LogInfoImpl(): m_zpbObj(new ::generated::zpb::exmalif::LogInfo())
285  {}
286 
288  m_zpbObj(inner, ::elt::mal::util::list::NoopDeleter<ZpbType*>())
289  {}
290 
291 
293  LogInfoImpl() {
294  *m_zpbObj = inner;
295  }
296 
297  LogInfoImpl( const std::string& level, const std::string& logger ): LogInfoImpl() {
298  setLevel(level);
299  setLogger(logger);
300  }
301 
302 
303  LogInfoImpl(const LogInfoImpl &rhs): m_zpbObj(rhs.m_zpbObj) {}
304 
305  LogInfoImpl(LogInfoImpl &&rhs): m_zpbObj(std::move(rhs.m_zpbObj)) {}
306 
308  copy(that);
309  return *this;
310  }
311 
312  std::string getLevel() const override {
313  return m_zpbObj->level();
314  }
315 
316  void setLevel(const std::string& level) override {
317  m_zpbObj->set_level(level);
318  }
319  std::string getLogger() const override {
320  return m_zpbObj->logger();
321  }
322 
323  void setLogger(const std::string& logger) override {
324  m_zpbObj->set_logger(logger);
325  }
326 
327  std::unique_ptr<::exmalif::LogInfo> clone() const override {
328  return std::unique_ptr<::exmalif::LogInfo>(new LogInfoImpl(getLevel(),getLogger()));
329  }
330 
331  bool keyEquals(const ::exmalif::LogInfo& other) const override {
332  return false;
333  }
334 
335  std::size_t keyHash() const {
336  std::size_t seed = 0;
337  return seed;
338  }
339 
340  std::unique_ptr<::exmalif::LogInfo> cloneKey() const override {
341  std::unique_ptr<::exmalif::LogInfo> entity(new LogInfoImpl());
342  return entity;
343  };
344 
345  bool hasKey() const override {
346  return false;
347  }
348 
349  bool toByteArray(zmq::message_t& msg) const override {
350  msg.rebuild(m_zpbObj->ByteSizeLong());
351  return m_zpbObj->SerializeToArray(msg.data(), msg.size());
352  }
353 
354  bool toByteArray(std::string &output) const override {
355  return m_zpbObj->SerializeToString(&output);
356  }
357 
358  bool fromByteArray(const std::string &data) override {
359  return m_zpbObj->ParseFromString(data);
360  }
361 
362  bool fromByteArray(const void * data, std::size_t size) override {
363  google::protobuf::io::ArrayInputStream ais(data, size);
364  return m_zpbObj->ParseFromZeroCopyStream(&ais);
365  }
366 
367  void copy(const ::exmalif::LogInfo &from) override {
368  setLevel(from.getLevel());
369  setLogger(from.getLogger());
370  };
371 
372  operator ZpbType*() const {
373  return &*m_zpbObj;
374  }
375 
376  static int32_t typeHash() {
377  return -1574765012;
378  }
379 
380  private:
381 
382  std::shared_ptr<ZpbType> m_zpbObj;
383 
384  };
385 
386 } // namespace zpb
387 } // namespace exmalif
388 
389 
390 
391 
392 
393 
394 
395 
396 namespace exmalif {
397 namespace zpb {
398 
399 // generated
401  public:
403 
404  ExceptionErrImpl(): m_zpbObj(new ::generated::zpb::exmalif::ExceptionErr())
405  {}
406 
408  m_zpbObj(inner, ::elt::mal::util::list::NoopDeleter<ZpbType*>())
409  {}
410 
411 
413  ExceptionErrImpl() {
414  *m_zpbObj = inner;
415  }
416 
418  ExceptionErrImpl() {
419  copy(malVal);
420  }
421 
422  ExceptionErrImpl( const std::string& desc, int32_t code ): ExceptionErrImpl() {
423  setDesc(desc);
424  setCode(code);
425  }
426 
427 
428  ExceptionErrImpl(const ExceptionErrImpl &rhs): m_zpbObj(rhs.m_zpbObj) {}
429 
430  ExceptionErrImpl(ExceptionErrImpl &&rhs): m_zpbObj(std::move(rhs.m_zpbObj)) {}
431 
433  copy(that);
434  return *this;
435  }
436 
437  std::string getDesc() const override {
438  return m_zpbObj->desc();
439  }
440  int32_t getCode() const override {
441  return m_zpbObj->code();
442  }
443 
445  setDesc(from.getDesc());
446  setCode(from.getCode());
447  };
448 
449  operator ZpbType*() const {
450  return &*m_zpbObj;
451  }
452 
453  private:
454  void setDesc(const std::string& desc) {
455  m_zpbObj->set_desc(desc);
456  }
457  void setCode(int32_t code) {
458  m_zpbObj->set_code(code);
459  }
460 
461  std::shared_ptr<ZpbType> m_zpbObj;
462 
463  };
464 
465 } // namespace zpb
466 } // namespace exmalif
467 
468 
469 
470 
471 
472 
473 
474 namespace elt {
475 namespace mal {
476 namespace rr {
477 
478 template<>
480  public AmiZpbHelper<std::string>,
481  public ReplyObserver<::generated::zpb::exmalif::StdCmds_Reply> {
482  public:
483  void updateReply(const ::generated::zpb::exmalif::StdCmds_Reply& reply, bool isPending) {
484  auto& data = reply.data();
485  auto code = reply.header().code();
486 
487  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
488  std::ostringstream errMsg;
489 
490  errMsg << "Code:" << code << " Message:";
491  reply.header().has_exceptionmessage() ?
492  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
493 
494  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
495  handleCompletedExceptionally(::elt::mal::UnhandledRemoteException(errMsg.str())) :
496  handleCompletedExceptionally(::elt::mal::MalException(errMsg.str()));
497 
498  } else if (isPending) {
499  handlePending((std::string)data.getpresetprogress().retval());
500  } else {
501  handleCompleted((std::string)data.getpresetprogress().retval());
502  }
503  }
504 
505  void cancel() {}
506 };
507 
508 } // namespace rr
509 } // namespace mal
510 } // namespace elt
511 
512 
513 
514 namespace exmalif {
515 namespace zpb {
516 
517 
518 template<typename Intf>
520 
521 
522 template<>
524  : public virtual ::elt::mal::rr::ClientAsyncImpl<::exmalif::StdCmdsAsync,
525  ::generated::zpb::exmalif::StdCmds_Request,
526  ::generated::zpb::exmalif::StdCmds_Reply>,
527  public virtual ::exmalif::StdCmdsAsync {
528  public:
530  const ::elt::mal::Uri &uri,
531  const std::vector<std::shared_ptr<::elt::mal::rr::qos::QoS>> &standardQoS,
532  const ::elt::mal::Mal::Properties &malSpecificProperties,
533  const std::shared_ptr<::elt::mal::ZpbMal> &zpbMal):
534  ::elt::mal::rr::ClientAsyncImpl<::exmalif::StdCmdsAsync,
535  ::generated::zpb::exmalif::StdCmds_Request, ::generated::zpb::exmalif::StdCmds_Reply>(
536  uri, standardQoS, malSpecificProperties, zpbMal) {}
537 
538  ::elt::mal::future<std::string> Stop() override {
541  new ::generated::zpb::exmalif::StdCmds_Stop_In();
542 
543 
544 
545  request.mutable_data()->set_allocated_stop(params);
546 
547  return sendRequest(request).then([](
548  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
549  auto reply = replyFut.get();
550  auto code = reply.header().code();
551 
552  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
553  std::ostringstream errMsg;
554 
555  errMsg << "Code:" << code << " Message:";
556  reply.header().has_exceptionmessage() ?
557  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
558 
559  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
560  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
561  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
562  }
563  auto data = reply.data();
564  return (std::string)data.stop().retval();
565  });
566  }
567 
568  ::elt::mal::future<std::string> Init() override {
571  new ::generated::zpb::exmalif::StdCmds_Init_In();
572 
573 
574 
575  request.mutable_data()->set_allocated_init(params);
576 
577  return sendRequest(request).then([](
578  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
579  auto reply = replyFut.get();
580  auto code = reply.header().code();
581 
582  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
583  std::ostringstream errMsg;
584 
585  errMsg << "Code:" << code << " Message:";
586  reply.header().has_exceptionmessage() ?
587  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
588 
589  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
590  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
591  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
592  }
593  auto data = reply.data();
594  return (std::string)data.init().retval();
595  });
596  }
597 
598  ::elt::mal::future<std::string> Reset() override {
601  new ::generated::zpb::exmalif::StdCmds_Reset_In();
602 
603 
604 
605  request.mutable_data()->set_allocated_reset(params);
606 
607  return sendRequest(request).then([](
608  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
609  auto reply = replyFut.get();
610  auto code = reply.header().code();
611 
612  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
613  std::ostringstream errMsg;
614 
615  errMsg << "Code:" << code << " Message:";
616  reply.header().has_exceptionmessage() ?
617  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
618 
619  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
620  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
621  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
622  }
623  auto data = reply.data();
624  return (std::string)data.reset().retval();
625  });
626  }
627 
628  ::elt::mal::future<std::string> Enable() override {
631  new ::generated::zpb::exmalif::StdCmds_Enable_In();
632 
633 
634 
635  request.mutable_data()->set_allocated_enable(params);
636 
637  return sendRequest(request).then([](
638  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
639  auto reply = replyFut.get();
640  auto code = reply.header().code();
641 
642  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
643  std::ostringstream errMsg;
644 
645  errMsg << "Code:" << code << " Message:";
646  reply.header().has_exceptionmessage() ?
647  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
648 
649  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
650  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
651  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
652  }
653  auto data = reply.data();
654  return (std::string)data.enable().retval();
655  });
656  }
657 
658  ::elt::mal::future<std::string> Disable() override {
661  new ::generated::zpb::exmalif::StdCmds_Disable_In();
662 
663 
664 
665  request.mutable_data()->set_allocated_disable(params);
666 
667  return sendRequest(request).then([](
668  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
669  auto reply = replyFut.get();
670  auto code = reply.header().code();
671 
672  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
673  std::ostringstream errMsg;
674 
675  errMsg << "Code:" << code << " Message:";
676  reply.header().has_exceptionmessage() ?
677  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
678 
679  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
680  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
681  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
682  }
683  auto data = reply.data();
684  return (std::string)data.disable().retval();
685  });
686  }
687 
688  ::elt::mal::future<std::string> Status() override {
691  new ::generated::zpb::exmalif::StdCmds_Status_In();
692 
693 
694 
695  request.mutable_data()->set_allocated_status(params);
696 
697  return sendRequest(request).then([](
698  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
699  auto reply = replyFut.get();
700  auto code = reply.header().code();
701 
702  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
703  std::ostringstream errMsg;
704 
705  errMsg << "Code:" << code << " Message:";
706  reply.header().has_exceptionmessage() ?
707  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
708 
709  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
710  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
711  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
712  }
713  auto data = reply.data();
714  return (std::string)data.status().retval();
715  });
716  }
717 
718  ::elt::mal::future<std::string> Config() override {
721  new ::generated::zpb::exmalif::StdCmds_Config_In();
722 
723 
724 
725  request.mutable_data()->set_allocated_config(params);
726 
727  return sendRequest(request).then([](
728  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
729  auto reply = replyFut.get();
730  auto code = reply.header().code();
731 
732  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
733  std::ostringstream errMsg;
734 
735  errMsg << "Code:" << code << " Message:";
736  reply.header().has_exceptionmessage() ?
737  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
738 
739  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
740  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
741  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
742  }
743  auto data = reply.data();
744  return (std::string)data.config().retval();
745  });
746  }
747 
748  ::elt::mal::future<std::string> Exit() override {
751  new ::generated::zpb::exmalif::StdCmds_Exit_In();
752 
753 
754 
755  request.mutable_data()->set_allocated_exit(params);
756 
757  return sendRequest(request).then([](
758  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
759  auto reply = replyFut.get();
760  auto code = reply.header().code();
761 
762  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
763  std::ostringstream errMsg;
764 
765  errMsg << "Code:" << code << " Message:";
766  reply.header().has_exceptionmessage() ?
767  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
768 
769  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
770  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
771  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
772  }
773  auto data = reply.data();
774  return (std::string)data.exit().retval();
775  });
776  }
777 
778  ::elt::mal::future<std::string> SetLogLevel(const std::shared_ptr<::exmalif::LogInfo>& info) override {
781  new ::generated::zpb::exmalif::StdCmds_SetLogLevel_In();
782 
783 
784  {
785  auto _infoImpl = dynamic_cast< ::exmalif::zpb::LogInfoImpl*>(info.get());
786  if (_infoImpl) {
787  *params->mutable_info() = **_infoImpl;
788  } else {
790  _tmp.copy(*info);
791  *params->mutable_info() = **&_tmp;
792  }
793  }
794 
795  request.mutable_data()->set_allocated_setloglevel(params);
796 
797  return sendRequest(request).then([](
798  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
799  auto reply = replyFut.get();
800  auto code = reply.header().code();
801 
802  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
803  std::ostringstream errMsg;
804 
805  errMsg << "Code:" << code << " Message:";
806  reply.header().has_exceptionmessage() ?
807  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
808 
809  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
810  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
811  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
812  }
813  auto data = reply.data();
814  if (data.setloglevel().has_exexceptionerr()) {
815  ::elt::mal::throw_exception(::exmalif::zpb::ExceptionErrImpl(data.setloglevel().exexceptionerr()));
816  }
817  return (std::string)data.setloglevel().retval();
818  });
819  }
820 
821  ::elt::mal::future<std::string> Preset(const std::shared_ptr<::exmalif::TelPosition>& pos) override {
824  new ::generated::zpb::exmalif::StdCmds_Preset_In();
825 
826 
827  {
828  auto _posImpl = dynamic_cast< ::exmalif::zpb::TelPositionImpl*>(pos.get());
829  if (_posImpl) {
830  *params->mutable_pos() = **_posImpl;
831  } else {
833  _tmp.copy(*pos);
834  *params->mutable_pos() = **&_tmp;
835  }
836  }
837 
838  request.mutable_data()->set_allocated_preset(params);
839 
840  return sendRequest(request).then([](
841  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
842  auto reply = replyFut.get();
843  auto code = reply.header().code();
844 
845  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
846  std::ostringstream errMsg;
847 
848  errMsg << "Code:" << code << " Message:";
849  reply.header().has_exceptionmessage() ?
850  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
851 
852  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
853  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
854  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
855  }
856  auto data = reply.data();
857  return (std::string)data.preset().retval();
858  });
859  }
860 
861  ::elt::mal::future<std::string> Move(const std::shared_ptr<::exmalif::AxesPosition>& pos) override {
864  new ::generated::zpb::exmalif::StdCmds_Move_In();
865 
866 
867  {
868  auto _posImpl = dynamic_cast< ::exmalif::zpb::AxesPositionImpl*>(pos.get());
869  if (_posImpl) {
870  *params->mutable_pos() = **_posImpl;
871  } else {
873  _tmp.copy(*pos);
874  *params->mutable_pos() = **&_tmp;
875  }
876  }
877 
878  request.mutable_data()->set_allocated_move(params);
879 
880  return sendRequest(request).then([](
881  ::elt::mal::future<::generated::zpb::exmalif::StdCmds_Reply> replyFut) {
882  auto reply = replyFut.get();
883  auto code = reply.header().code();
884 
885  if (code != ::elt::mal::zpb::rr::CompletionCode::COMPLETED) {
886  std::ostringstream errMsg;
887 
888  errMsg << "Code:" << code << " Message:";
889  reply.header().has_exceptionmessage() ?
890  errMsg << reply.header().exceptionmessage() : errMsg << "Unknown error message";
891 
892  code == ::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION ?
893  ::elt::mal::throw_exception(::elt::mal::UnhandledRemoteException(errMsg.str())) :
894  ::elt::mal::throw_exception(::elt::mal::MalException(errMsg.str()));
895  }
896  auto data = reply.data();
897  if (data.move().has_exexceptionerr()) {
898  ::elt::mal::throw_exception(::exmalif::zpb::ExceptionErrImpl(data.move().exexceptionerr()));
899  }
900  return (std::string)data.move().retval();
901  });
902  }
903 
904  std::shared_ptr<::elt::mal::rr::Ami<std::string>> GetPresetProgress() override {
907  new ::generated::zpb::exmalif::StdCmds_GetPresetProgress_In();
908 
909 
910 
912 
913  auto ami = std::shared_ptr<::elt::mal::rr::Ami<std::string>>(
914  new ::elt::mal::rr::AmiZpb<std::string, ::generated::zpb::exmalif::StdCmds_Reply,
916 
917  auto observer =
918  std::dynamic_pointer_cast<::elt::mal::rr::ReplyObserver<
919  ::generated::zpb::exmalif::StdCmds_Reply>>(ami);
920 
921  sendRequestWithObserver(request, observer);
922  return ami;
923 
924 }
925 
926 };
927 
928 
929 class StdCmdsSyncImpl : virtual public ::exmalif::StdCmdsSync {
930  public:
932  const ::elt::mal::Uri &uri,
933  const std::vector<std::shared_ptr<::elt::mal::rr::qos::QoS>> &standardQoS,
934  const ::elt::mal::Mal::Properties &malSpecificProperties,
935  const std::shared_ptr<::elt::mal::ZpbMal> &zpbMal)
936  : m_delegate(uri, standardQoS, malSpecificProperties, zpbMal), m_timeoutMs{} {
937  m_timeoutMs = ::elt::mal::util::getReplyTimeQoS(standardQoS);
938  }
939 
940  std::shared_ptr<::elt::mal::Mal> getMal() const override {
941  return m_delegate.getMal();
942  }
943 
944  std::string Stop() override {
945  auto future = m_delegate.Stop();
946  if (::elt::mal::future_status::ready
947  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
948  return future.get();
949  } else {
950  throw ::elt::mal::TimeoutException("timeout");
951  }
952  }
953 
954  std::string Init() override {
955  auto future = m_delegate.Init();
956  if (::elt::mal::future_status::ready
957  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
958  return future.get();
959  } else {
960  throw ::elt::mal::TimeoutException("timeout");
961  }
962  }
963 
964  std::string Reset() override {
965  auto future = m_delegate.Reset();
966  if (::elt::mal::future_status::ready
967  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
968  return future.get();
969  } else {
970  throw ::elt::mal::TimeoutException("timeout");
971  }
972  }
973 
974  std::string Enable() override {
975  auto future = m_delegate.Enable();
976  if (::elt::mal::future_status::ready
977  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
978  return future.get();
979  } else {
980  throw ::elt::mal::TimeoutException("timeout");
981  }
982  }
983 
984  std::string Disable() override {
985  auto future = m_delegate.Disable();
986  if (::elt::mal::future_status::ready
987  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
988  return future.get();
989  } else {
990  throw ::elt::mal::TimeoutException("timeout");
991  }
992  }
993 
994  std::string Status() override {
995  auto future = m_delegate.Status();
996  if (::elt::mal::future_status::ready
997  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
998  return future.get();
999  } else {
1000  throw ::elt::mal::TimeoutException("timeout");
1001  }
1002  }
1003 
1004  std::string Config() override {
1005  auto future = m_delegate.Config();
1006  if (::elt::mal::future_status::ready
1007  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
1008  return future.get();
1009  } else {
1010  throw ::elt::mal::TimeoutException("timeout");
1011  }
1012  }
1013 
1014  std::string Exit() override {
1015  auto future = m_delegate.Exit();
1016  if (::elt::mal::future_status::ready
1017  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
1018  return future.get();
1019  } else {
1020  throw ::elt::mal::TimeoutException("timeout");
1021  }
1022  }
1023 
1024  std::string SetLogLevel(const std::shared_ptr<::exmalif::LogInfo>& info) override {
1025  auto future = m_delegate.SetLogLevel(info);
1026  if (::elt::mal::future_status::ready
1027  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
1028  return future.get();
1029  } else {
1030  throw ::elt::mal::TimeoutException("timeout");
1031  }
1032  }
1033 
1034  std::string Preset(const std::shared_ptr<::exmalif::TelPosition>& pos) override {
1035  auto future = m_delegate.Preset(pos);
1036  if (::elt::mal::future_status::ready
1037  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
1038  return future.get();
1039  } else {
1040  throw ::elt::mal::TimeoutException("timeout");
1041  }
1042  }
1043 
1044  std::string Move(const std::shared_ptr<::exmalif::AxesPosition>& pos) override {
1045  auto future = m_delegate.Move(pos);
1046  if (::elt::mal::future_status::ready
1047  == future.wait_for(boost::chrono::milliseconds(m_timeoutMs))) {
1048  return future.get();
1049  } else {
1050  throw ::elt::mal::TimeoutException("timeout");
1051  }
1052  }
1053 
1054  std::shared_ptr<::elt::mal::rr::Ami<std::string>> GetPresetProgress() override {
1055  return m_delegate.GetPresetProgress();
1056  }
1057 
1058 
1059 
1060  void close() override {
1061  m_delegate.close();
1062  }
1063 
1064  ::elt::mal::future<void> asyncConnect() override {
1065  return m_delegate.asyncConnect();
1066  }
1067 
1068  ::elt::mal::rr::ListenerRegistration registerConnectionListener(ConnectionListener listener) override {
1069  return m_delegate.registerConnectionListener(listener);
1070  }
1071 
1072  private:
1074  int64_t m_timeoutMs;
1075 };
1076 
1077 
1078 class AsyncStdCmdsImpl : virtual public ::elt::mal::rr::ZpbRrEntity {
1079  public:
1081  ::elt::mal::rr::ZpbServer &zpbServer,
1082  const std::shared_ptr<::exmalif::AsyncStdCmds> &entity,
1083  const std::shared_ptr<::elt::mal::Mal> &mal)
1084  : m_zpbServer(zpbServer), m_entity(entity), m_mal(mal) {}
1085 
1086 
1087  void processRequest(zmq::socket_t &socket,
1088  const std::string &id, const std::string &topicIdFrame,
1089  const std::string &headerFrame,
1090  const ::elt::mal::zpb::rr::ZpbHeader &header) {
1091  if (!::elt::mal::util::getSocketHasRcvMore(socket)) {
1092  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> unhandledExReplyHeader(
1093  new ::elt::mal::zpb::rr::ReplyHeader());
1094 
1095  unhandledExReplyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::INVALID_ARGUMENT);
1096  unhandledExReplyHeader->set_exceptionmessage("missing request frame");
1097 
1098  sendReply(socket, id, topicIdFrame, headerFrame, std::move(unhandledExReplyHeader),
1099  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return>());
1100 
1101  return;
1102  }
1103 
1105 
1106  //auto requestStr = ::elt::mal::util::readFrame(socket);
1107  zmq::message_t msgFrame;
1108  socket.recv(&msgFrame, 0);
1109 
1110  if (!request.ParseFromArray(msgFrame.data(), msgFrame.size())) {
1111  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> unhandledExReplyHeader(
1112  new ::elt::mal::zpb::rr::ReplyHeader());
1113 
1114  unhandledExReplyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::INVALID_ARGUMENT);
1115  unhandledExReplyHeader->set_exceptionmessage("Invalid Request: Request parsing failed");
1116 
1117  sendReply(socket, id, topicIdFrame, headerFrame, std::move(unhandledExReplyHeader),
1118  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return>());
1119 
1120  return;
1121  }
1122 
1123  auto call = request.mutable_data();
1124 
1125  if (call->has_stop()) {
1126  auto params = call->mutable_stop();
1127 
1128  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1129  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1130 
1131  ::elt::mal::rr::ServerContextProvider::setInstance<
1132  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1133 
1134  m_entity->Stop().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1135  (::elt::mal::future<std::string> f) {
1136  if (!f.has_exception()) {
1137  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1138  new ::generated::zpb::exmalif::StdCmds_Return());
1139 
1140  auto out = new ::generated::zpb::exmalif::StdCmds_Stop_Out();
1141 
1142  out->set_retval(f.get());
1143 
1144  data->set_allocated_stop(out);
1145 
1146  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1147  } else {
1148  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1149  }
1150  });
1151 
1152  } else if (call->has_init()) {
1153  auto params = call->mutable_init();
1154 
1155  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1156  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1157 
1158  ::elt::mal::rr::ServerContextProvider::setInstance<
1159  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1160 
1161  m_entity->Init().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1162  (::elt::mal::future<std::string> f) {
1163  if (!f.has_exception()) {
1164  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1165  new ::generated::zpb::exmalif::StdCmds_Return());
1166 
1167  auto out = new ::generated::zpb::exmalif::StdCmds_Init_Out();
1168 
1169  out->set_retval(f.get());
1170 
1171  data->set_allocated_init(out);
1172 
1173  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1174  } else {
1175  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1176  }
1177  });
1178 
1179  } else if (call->has_reset()) {
1180  auto params = call->mutable_reset();
1181 
1182  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1183  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1184 
1185  ::elt::mal::rr::ServerContextProvider::setInstance<
1186  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1187 
1188  m_entity->Reset().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1189  (::elt::mal::future<std::string> f) {
1190  if (!f.has_exception()) {
1191  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1192  new ::generated::zpb::exmalif::StdCmds_Return());
1193 
1194  auto out = new ::generated::zpb::exmalif::StdCmds_Reset_Out();
1195 
1196  out->set_retval(f.get());
1197 
1198  data->set_allocated_reset(out);
1199 
1200  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1201  } else {
1202  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1203  }
1204  });
1205 
1206  } else if (call->has_enable()) {
1207  auto params = call->mutable_enable();
1208 
1209  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1210  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1211 
1212  ::elt::mal::rr::ServerContextProvider::setInstance<
1213  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1214 
1215  m_entity->Enable().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1216  (::elt::mal::future<std::string> f) {
1217  if (!f.has_exception()) {
1218  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1219  new ::generated::zpb::exmalif::StdCmds_Return());
1220 
1221  auto out = new ::generated::zpb::exmalif::StdCmds_Enable_Out();
1222 
1223  out->set_retval(f.get());
1224 
1225  data->set_allocated_enable(out);
1226 
1227  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1228  } else {
1229  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1230  }
1231  });
1232 
1233  } else if (call->has_disable()) {
1234  auto params = call->mutable_disable();
1235 
1236  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1237  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1238 
1239  ::elt::mal::rr::ServerContextProvider::setInstance<
1240  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1241 
1242  m_entity->Disable().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1243  (::elt::mal::future<std::string> f) {
1244  if (!f.has_exception()) {
1245  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1246  new ::generated::zpb::exmalif::StdCmds_Return());
1247 
1248  auto out = new ::generated::zpb::exmalif::StdCmds_Disable_Out();
1249 
1250  out->set_retval(f.get());
1251 
1252  data->set_allocated_disable(out);
1253 
1254  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1255  } else {
1256  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1257  }
1258  });
1259 
1260  } else if (call->has_status()) {
1261  auto params = call->mutable_status();
1262 
1263  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1264  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1265 
1266  ::elt::mal::rr::ServerContextProvider::setInstance<
1267  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1268 
1269  m_entity->Status().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1270  (::elt::mal::future<std::string> f) {
1271  if (!f.has_exception()) {
1272  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1273  new ::generated::zpb::exmalif::StdCmds_Return());
1274 
1275  auto out = new ::generated::zpb::exmalif::StdCmds_Status_Out();
1276 
1277  out->set_retval(f.get());
1278 
1279  data->set_allocated_status(out);
1280 
1281  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1282  } else {
1283  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1284  }
1285  });
1286 
1287  } else if (call->has_config()) {
1288  auto params = call->mutable_config();
1289 
1290  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1291  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1292 
1293  ::elt::mal::rr::ServerContextProvider::setInstance<
1294  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1295 
1296  m_entity->Config().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1297  (::elt::mal::future<std::string> f) {
1298  if (!f.has_exception()) {
1299  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1300  new ::generated::zpb::exmalif::StdCmds_Return());
1301 
1302  auto out = new ::generated::zpb::exmalif::StdCmds_Config_Out();
1303 
1304  out->set_retval(f.get());
1305 
1306  data->set_allocated_config(out);
1307 
1308  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1309  } else {
1310  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1311  }
1312  });
1313 
1314  } else if (call->has_exit()) {
1315  auto params = call->mutable_exit();
1316 
1317  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1318  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1319 
1320  ::elt::mal::rr::ServerContextProvider::setInstance<
1321  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1322 
1323  m_entity->Exit().then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1324  (::elt::mal::future<std::string> f) {
1325  if (!f.has_exception()) {
1326  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1327  new ::generated::zpb::exmalif::StdCmds_Return());
1328 
1329  auto out = new ::generated::zpb::exmalif::StdCmds_Exit_Out();
1330 
1331  out->set_retval(f.get());
1332 
1333  data->set_allocated_exit(out);
1334 
1335  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1336  } else {
1337  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1338  }
1339  });
1340 
1341  } else if (call->has_setloglevel()) {
1342  auto params = call->mutable_setloglevel();
1343 
1344  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1345  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1346 
1347  ::elt::mal::rr::ServerContextProvider::setInstance<
1348  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1349 
1350  m_entity->SetLogLevel(std::shared_ptr< ::exmalif::LogInfo>(new ::exmalif::zpb::LogInfoImpl(params->mutable_info()))).then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1351  (::elt::mal::future<std::string> f) {
1352  if (!f.has_exception()) {
1353  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1354  new ::generated::zpb::exmalif::StdCmds_Return());
1355 
1356  auto out = new ::generated::zpb::exmalif::StdCmds_SetLogLevel_Out();
1357 
1358  out->set_retval(f.get());
1359 
1360  data->set_allocated_setloglevel(out);
1361 
1362  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1363  } else {
1364  try {
1365  ::elt::mal::rethrow_exception(f.get_exception_ptr());
1366  }
1367  catch (::exmalif::ExceptionErr &e) {
1368  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(new ::generated::zpb::exmalif::StdCmds_Return());
1369 
1371 
1372  auto out = new ::generated::zpb::exmalif::StdCmds_SetLogLevel_Out();
1373 
1374  *out->mutable_exexceptionerr() = **&_ex;
1375 
1376  data->set_allocated_setloglevel(out);
1377 
1378  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1379  } catch (...) {}
1380 
1381  sendUnhandledExceptionReply(socket, id, topicIdFrame,
1382  headerFrame, f.get_exception_ptr());
1383  }
1384  });
1385 
1386  } else if (call->has_preset()) {
1387  auto params = call->mutable_preset();
1388 
1389  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1390  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1391 
1392  ::elt::mal::rr::ServerContextProvider::setInstance<
1393  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1394 
1395  m_entity->Preset(std::shared_ptr< ::exmalif::TelPosition>(new ::exmalif::zpb::TelPositionImpl(params->mutable_pos()))).then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1396  (::elt::mal::future<std::string> f) {
1397  if (!f.has_exception()) {
1398  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1399  new ::generated::zpb::exmalif::StdCmds_Return());
1400 
1401  auto out = new ::generated::zpb::exmalif::StdCmds_Preset_Out();
1402 
1403  out->set_retval(f.get());
1404 
1405  data->set_allocated_preset(out);
1406 
1407  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1408  } else {
1409  sendUnhandledExceptionReply(socket, id, topicIdFrame, headerFrame, f.get_exception_ptr());
1410  }
1411  });
1412 
1413  } else if (call->has_move()) {
1414  auto params = call->mutable_move();
1415 
1416  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1417  new ::elt::mal::rr::ServerContextZpb<std::string>(m_mal));
1418 
1419  ::elt::mal::rr::ServerContextProvider::setInstance<
1420  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1421 
1422  m_entity->Move(std::shared_ptr< ::exmalif::AxesPosition>(new ::exmalif::zpb::AxesPositionImpl(params->mutable_pos()))).then(m_zpbServer.getExecutor(), [this, &socket, id, topicIdFrame, headerFrame, params]
1423  (::elt::mal::future<std::string> f) {
1424  if (!f.has_exception()) {
1425  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1426  new ::generated::zpb::exmalif::StdCmds_Return());
1427 
1428  auto out = new ::generated::zpb::exmalif::StdCmds_Move_Out();
1429 
1430  out->set_retval(f.get());
1431 
1432  data->set_allocated_move(out);
1433 
1434  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1435  } else {
1436  try {
1437  ::elt::mal::rethrow_exception(f.get_exception_ptr());
1438  }
1439  catch (::exmalif::ExceptionErr &e) {
1440  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(new ::generated::zpb::exmalif::StdCmds_Return());
1441 
1443 
1444  auto out = new ::generated::zpb::exmalif::StdCmds_Move_Out();
1445 
1446  *out->mutable_exexceptionerr() = **&_ex;
1447 
1448  data->set_allocated_move(out);
1449 
1450  sendCompletedReply(socket, id, topicIdFrame, headerFrame, std::move(data));
1451  } catch (...) {}
1452 
1453  sendUnhandledExceptionReply(socket, id, topicIdFrame,
1454  headerFrame, f.get_exception_ptr());
1455  }
1456  });
1457 
1458  } else if (call->has_getpresetprogress()) {
1459  auto serverContext = std::unique_ptr<::elt::mal::rr::ServerContext<std::string>>(
1460  new ::elt::mal::rr::ServerContextZpbAmi<std::string,
1463  *this, socket, id, topicIdFrame, headerFrame, header, m_mal));
1464 
1465  ::elt::mal::rr::ServerContextProvider::setInstance<
1466  ::elt::mal::rr::ServerContext<std::string>>(serverContext);
1467 
1468  try {
1469  m_entity->GetPresetProgress();
1470  } catch (std::exception &e) {
1471  auto ami = ::elt::mal::rr::ServerContextProvider::getInstance<
1472  ::elt::mal::rr::ServerContext<float>>().createAmi();
1473  if (ami) {
1474  ami->completeExceptionally(e);
1475  }
1476  }
1477 
1478 } else {
1479 std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> unhandledExReplyHeader(
1480  new ::elt::mal::zpb::rr::ReplyHeader());
1481 
1482 unhandledExReplyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::UNKNOWN_OPERATION);
1483 
1484 sendReply(socket, id, topicIdFrame, headerFrame, std::move(unhandledExReplyHeader),
1485  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return>());
1486 }
1487  }
1488 
1490  zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame,
1491  const std::string &headerFrame,
1492  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> replyHeader,
1493  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data) {
1495 
1496  reply.set_allocated_header(replyHeader.release());
1497 
1498  if (data) {
1499  reply.set_allocated_data(data.release());
1500  }
1501 
1502  auto replyStr = reply.SerializeAsString();
1503 
1504  m_zpbServer.sendReply(socket, id, topicIdFrame, headerFrame, replyStr);
1505  }
1506 
1508  zmq::socket_t &socket, const std::string &id,
1509  const std::string &topicIdFrame, const std::string &headerFrame,
1510  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data) {
1511  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> completedReplyHeader(
1512  new ::elt::mal::zpb::rr::ReplyHeader());
1513 
1514  completedReplyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::COMPLETED);
1515 
1516  sendReply(socket, id, topicIdFrame, headerFrame,
1517  std::move(completedReplyHeader), std::move(data));
1518  }
1519 
1521  zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame,
1522  const std::string &headerFrame, ::elt::mal::exception_ptr exceptionPtr) {
1523  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> unhandledExReplyHeader(
1524  new ::elt::mal::zpb::rr::ReplyHeader());
1525 
1526  unhandledExReplyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::UNKNOWN_EXCEPTION);
1527 
1528  std::string exceptionMessage = "Unknown";
1529 
1530  try {
1531  ::elt::mal::rethrow_exception(exceptionPtr);
1532  } catch (std::exception &e) {
1533  exceptionMessage = e.what();
1534  } catch (...) {}
1535 
1536  unhandledExReplyHeader->set_exceptionmessage(exceptionMessage);
1537 
1538  sendReply(socket, id, topicIdFrame, headerFrame, std::move(unhandledExReplyHeader),
1539  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return>());
1540  }
1541 
1542  private:
1543  ::elt::mal::rr::ZpbServer &m_zpbServer;
1544  std::shared_ptr<::exmalif::AsyncStdCmds> m_entity;
1545  const std::shared_ptr<::elt::mal::Mal>& m_mal;
1546 };
1547 
1548 
1549 } // namespace zpb
1550 } // namespace exmalif
1551 
1552 
1553 
1554 namespace elt {
1555 namespace mal {
1556 namespace rr {
1557 
1558 
1559 template<>
1561  public ::elt::mal::rr::ServerAmi<std::string> {
1562  public:
1564  zmq::socket_t &socket,
1565  const std::string &id,
1566  const std::string &topicIdFrame,
1567  const std::string &headerFrame,
1568  const ::elt::mal::zpb::rr::ZpbHeader &header) :
1569  m_replier(replier),
1570  m_socket(socket),
1571  m_id(id),
1572  m_topicIdFrame(topicIdFrame),
1573  m_headerFrame(headerFrame),
1574  m_header(header) {}
1575 
1576  bool complete(const std::string& status) override {
1577  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1578  new ::generated::zpb::exmalif::StdCmds_Return());
1579 
1580  std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader> replyHeader(
1581  new ::elt::mal::zpb::rr::ReplyHeader());
1582 
1583  replyHeader->set_code(::elt::mal::zpb::rr::CompletionCode::PENDING);
1584 
1585  data->mutable_getpresetprogress()->set_retval(status);
1586 
1587  m_replier.sendReply(m_socket, m_id, m_topicIdFrame,
1588  m_headerFrame, std::move(replyHeader), std::move(data));
1589 
1590  return true;
1591  }
1592 
1593  bool completeExceptionally(const std::exception &ex) override {
1594  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1595  new ::generated::zpb::exmalif::StdCmds_Return());
1596 
1597  m_replier.sendUnhandledExceptionReply(m_socket, m_id, m_topicIdFrame,
1598  m_headerFrame, boost::copy_exception(ex));
1599  m_isCompleted = true;
1600  return true;
1601  }
1602 
1603  bool completed(const std::string& status) override {
1604  std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return> data(
1605  new ::generated::zpb::exmalif::StdCmds_Return());
1606 
1607  data->mutable_getpresetprogress()->set_retval(status);
1608 
1609  m_replier.sendCompletedReply(m_socket, m_id, m_topicIdFrame,
1610  m_headerFrame, std::move(data));
1611 
1612  m_isCompleted = true;
1613  return true;
1614  }
1615 
1616  bool isDone() override {
1617  return m_isCompleted;
1618  }
1619 
1620  future_type next() override {
1621  return future_type();
1622  }
1623 
1624  private:
1626 
1627  // replier arguments
1628 
1629  zmq::socket_t &m_socket;
1630  const std::string m_id;
1631  const std::string m_topicIdFrame;
1632  const std::string m_headerFrame;
1633  const ::elt::mal::zpb::rr::ZpbHeader m_header;
1634  bool m_isCompleted = false;
1635 };
1636 
1637 
1638 } // namespace rr
1639 } // namespace mal
1640 } // namespace elt
1641 
1642 
1643 
1644 
1645 
1646 
Definition: ZpbExmalifImpl.hpp:158
::generated::zpb::exmalif::TelPosition * mutable_pos()
Definition: exmalif.pb.h:4847
AsyncStdCmdsImpl(::elt::mal::rr::ZpbServer &zpbServer, const std::shared_ptr<::exmalif::AsyncStdCmds > &entity, const std::shared_ptr<::elt::mal::Mal > &mal)
Definition: ZpbExmalifImpl.hpp:1080
void setLevel(const std::string &level) override
Definition: ZpbExmalifImpl.hpp:316
Definition: Exmalif.hpp:28
LogInfoImpl(LogInfoImpl &&rhs)
Definition: ZpbExmalifImpl.hpp:305
bool keyEquals(const ::exmalif::LogInfo &other) const override
Definition: ZpbExmalifImpl.hpp:331
std::shared_ptr<::elt::mal::Mal > getMal() const override
Definition: ZpbExmalifImpl.hpp:940
void close() override
Definition: ZpbExmalifImpl.hpp:1060
void set_allocated_disable(::generated::zpb::exmalif::StdCmds_Disable_In *disable)
Definition: exmalif.pb.h:4246
TelPositionImpl()
Definition: ZpbExmalifImpl.hpp:42
void set_allocated_preset(::generated::zpb::exmalif::StdCmds_Preset_In *preset)
TelPositionImpl(const ::generated::zpb::exmalif::TelPosition &inner)
Definition: ZpbExmalifImpl.hpp:50
StdCmdsSyncImpl(const ::elt::mal::Uri &uri, const std::vector< std::shared_ptr<::elt::mal::rr::qos::QoS >> &standardQoS, const ::elt::mal::Mal::Properties &malSpecificProperties, const std::shared_ptr<::elt::mal::ZpbMal > &zpbMal)
Definition: ZpbExmalifImpl.hpp:931
required string logger
Definition: exmalif.proto:25
int32_t getCode() const override
Definition: ZpbExmalifImpl.hpp:440
ExceptionErrImpl(ExceptionErrImpl &&rhs)
Definition: ZpbExmalifImpl.hpp:430
AxesPositionImpl(AxesPositionImpl &&rhs)
Definition: ZpbExmalifImpl.hpp:184
::generated::zpb::exmalif::AxesPosition ZpbType
Definition: ZpbExmalifImpl.hpp:161
float getRa() const override
Definition: ZpbExmalifImpl.hpp:70
ExceptionErrImpl & operator=(const ExceptionErrImpl &that)
Definition: ZpbExmalifImpl.hpp:432
void set_allocated_stop(::generated::zpb::exmalif::StdCmds_Stop_In *stop)
std::unique_ptr<::exmalif::TelPosition > clone() const override
Definition: ZpbExmalifImpl.hpp:85
std::string Enable() override
Definition: ZpbExmalifImpl.hpp:974
Definition: exmalif.pb.h:726
Definition: exmalif.pb.h:2317
::elt::mal::future< std::string > Init() override
Definition: ZpbExmalifImpl.hpp:568
static int32_t typeHash()
Definition: ZpbExmalifImpl.hpp:255
bool keyEquals(const ::exmalif::TelPosition &other) const override
Definition: ZpbExmalifImpl.hpp:89
static int32_t typeHash()
Definition: ZpbExmalifImpl.hpp:376
::generated::zpb::exmalif::StdCmds_Call * mutable_data()
Definition: exmalif.pb.h:5570
bool hasKey() const override
Definition: ZpbExmalifImpl.hpp:224
bool fromByteArray(const std::string &data) override
Definition: ZpbExmalifImpl.hpp:237
void set_allocated_move(::generated::zpb::exmalif::StdCmds_Move_In *move)
bool toByteArray(std::string &output) const override
Definition: ZpbExmalifImpl.hpp:354
Definition: Exmalif.hpp:90
void copy(const ::exmalif::TelPosition &from) override
Definition: ZpbExmalifImpl.hpp:125
bool toByteArray(std::string &output) const override
Definition: ZpbExmalifImpl.hpp:233
LogInfoImpl(::generated::zpb::exmalif::LogInfo *inner)
Definition: ZpbExmalifImpl.hpp:287
::generated::zpb::exmalif::TelPosition ZpbType
Definition: ZpbExmalifImpl.hpp:40
std::string SetLogLevel(const std::shared_ptr<::exmalif::LogInfo > &info) override
Definition: ZpbExmalifImpl.hpp:1024
void set_allocated_init(::generated::zpb::exmalif::StdCmds_Init_In *init)
LogInfoImpl & operator=(const LogInfoImpl &that)
Definition: ZpbExmalifImpl.hpp:307
Definition: exmalif.pb.h:1454
TelPositionImpl(float ra, float dec)
Definition: ZpbExmalifImpl.hpp:55
required sfixed32 code
Definition: exmalif.proto:30
Definition: ZpbExmalifImpl.hpp:519
Definition: Exmalif.hpp:49
Definition: exmalif.pb.h:194
Definition: ZpbExmalifImpl.hpp:37
::generated::zpb::exmalif::AxesPosition * mutable_pos()
Definition: exmalif.pb.h:4909
Definition: ZpbExmalifImpl.hpp:1078
void set_allocated_data(::generated::zpb::exmalif::StdCmds_Return *data)
Definition: exmalif.pb.h:7192
void copy(const ::exmalif::LogInfo &from) override
Definition: ZpbExmalifImpl.hpp:367
std::unique_ptr<::exmalif::AxesPosition > cloneKey() const override
Definition: ZpbExmalifImpl.hpp:219
TelPositionImpl & operator=(const TelPositionImpl &that)
Definition: ZpbExmalifImpl.hpp:65
::generated::zpb::exmalif::StdCmds_Stop_In * mutable_stop()
Definition: exmalif.pb.h:4978
void set_allocated_setloglevel(::generated::zpb::exmalif::StdCmds_SetLogLevel_In *setloglevel)
bool fromByteArray(const std::string &data) override
Definition: ZpbExmalifImpl.hpp:358
AxesPositionImpl & operator=(const AxesPositionImpl &that)
Definition: ZpbExmalifImpl.hpp:186
std::string Reset() override
Definition: ZpbExmalifImpl.hpp:964
ExceptionErrImpl(const ::exmalif::ExceptionErr &malVal)
Definition: ZpbExmalifImpl.hpp:417
Definition: ZpbExmalifImpl.hpp:929
void sendReply(zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame, const std::string &headerFrame, std::unique_ptr<::elt::mal::zpb::rr::ReplyHeader > replyHeader, std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return > data)
Definition: ZpbExmalifImpl.hpp:1489
::elt::mal::future< std::string > SetLogLevel(const std::shared_ptr<::exmalif::LogInfo > &info) override
Definition: ZpbExmalifImpl.hpp:778
std::string Stop() override
Definition: ZpbExmalifImpl.hpp:944
ExceptionErrImpl()
Definition: ZpbExmalifImpl.hpp:404
bool keyEquals(const ::exmalif::AxesPosition &other) const override
Definition: ZpbExmalifImpl.hpp:210
void sendCompletedReply(zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame, const std::string &headerFrame, std::unique_ptr<::generated::zpb::exmalif::StdCmds_Return > data)
Definition: ZpbExmalifImpl.hpp:1507
std::string Status() override
Definition: ZpbExmalifImpl.hpp:994
bool hasKey() const override
Definition: ZpbExmalifImpl.hpp:103
static int32_t typeHash()
Definition: ZpbExmalifImpl.hpp:134
ServerAmiZpb(::exmalif::zpb::AsyncStdCmdsImpl &replier, zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame, const std::string &headerFrame, const ::elt::mal::zpb::rr::ZpbHeader &header)
Definition: ZpbExmalifImpl.hpp:1563
void set_allocated_header(::elt::mal::zpb::rr::ReplyHeader *header)
Definition: exmalif.pb.h:7134
Definition: exmalif.pb.h:448
::elt::mal::future< std::string > Move(const std::shared_ptr<::exmalif::AxesPosition > &pos) override
Definition: ZpbExmalifImpl.hpp:861
AxesPositionImpl()
Definition: ZpbExmalifImpl.hpp:163
LogInfoImpl()
Definition: ZpbExmalifImpl.hpp:284
std::size_t keyHash() const
Definition: ZpbExmalifImpl.hpp:93
bool fromByteArray(const void *data, std::size_t size) override
Definition: ZpbExmalifImpl.hpp:362
void setRa(float ra) override
Definition: ZpbExmalifImpl.hpp:74
AxesPositionImpl(const AxesPositionImpl &rhs)
Definition: ZpbExmalifImpl.hpp:182
::elt::mal::future< std::string > Exit() override
Definition: ZpbExmalifImpl.hpp:748
bool fromByteArray(const std::string &data) override
Definition: ZpbExmalifImpl.hpp:116
bool toByteArray(zmq::message_t &msg) const override
Definition: ZpbExmalifImpl.hpp:228
std::unique_ptr<::exmalif::AxesPosition > clone() const override
Definition: ZpbExmalifImpl.hpp:206
std::unique_ptr<::exmalif::LogInfo > clone() const override
Definition: ZpbExmalifImpl.hpp:327
::elt::mal::future< std::string > Preset(const std::shared_ptr<::exmalif::TelPosition > &pos) override
Definition: ZpbExmalifImpl.hpp:821
int32_t code
Definition: Exmalif.hpp:113
std::unique_ptr<::exmalif::TelPosition > cloneKey() const override
Definition: ZpbExmalifImpl.hpp:98
bool toByteArray(zmq::message_t &msg) const override
Definition: ZpbExmalifImpl.hpp:349
Definition: exmalif.pb.h:1350
bool toByteArray(std::string &output) const override
Definition: ZpbExmalifImpl.hpp:112
required float dec
Definition: exmalif.proto:15
LogInfoImpl(const ::generated::zpb::exmalif::LogInfo &inner)
Definition: ZpbExmalifImpl.hpp:292
Definition: exmalif.pb.h:1796
std::string Move(const std::shared_ptr<::exmalif::AxesPosition > &pos) override
Definition: ZpbExmalifImpl.hpp:1044
Definition: Exmalif.hpp:162
void setLogger(const std::string &logger) override
Definition: ZpbExmalifImpl.hpp:323
ExceptionErrImpl(::generated::zpb::exmalif::ExceptionErr *inner)
Definition: ZpbExmalifImpl.hpp:407
std::string Disable() override
Definition: ZpbExmalifImpl.hpp:984
LogInfoImpl(const LogInfoImpl &rhs)
Definition: ZpbExmalifImpl.hpp:303
void setAlt(float alt) override
Definition: ZpbExmalifImpl.hpp:195
void set_allocated_enable(::generated::zpb::exmalif::StdCmds_Enable_In *enable)
required float az
Definition: exmalif.proto:20
std::string desc
Definition: Exmalif.hpp:112
message AxesPosition
Definition: exmalif.proto:18
Definition: Exmalif.hpp:70
::elt::mal::future< void > asyncConnect() override
Definition: ZpbExmalifImpl.hpp:1064
std::string Preset(const std::shared_ptr<::exmalif::TelPosition > &pos) override
Definition: ZpbExmalifImpl.hpp:1034
void updateReply(const ::generated::zpb::exmalif::StdCmds_Reply &reply, bool isPending)
Definition: ZpbExmalifImpl.hpp:483
LogInfoImpl(const std::string &level, const std::string &logger)
Definition: ZpbExmalifImpl.hpp:297
void processRequest(zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame, const std::string &headerFrame, const ::elt::mal::zpb::rr::ZpbHeader &header)
Definition: ZpbExmalifImpl.hpp:1087
void set_allocated_status(::generated::zpb::exmalif::StdCmds_Status_In *status)
package generated zpb exmalif
Definition: exmalif.proto:11
void copy(const ::exmalif::AxesPosition &from) override
Definition: ZpbExmalifImpl.hpp:246
void setDec(float dec) override
Definition: ZpbExmalifImpl.hpp:81
::generated::zpb::exmalif::LogInfo * mutable_info()
Definition: exmalif.pb.h:4785
std::size_t keyHash() const
Definition: ZpbExmalifImpl.hpp:335
Definition: exmalif.pb.h:591
message LogInfo
Definition: exmalif.proto:23
std::size_t keyHash() const
Definition: ZpbExmalifImpl.hpp:214
std::string Init() override
Definition: ZpbExmalifImpl.hpp:954
::elt::mal::future< std::string > Stop() override
Definition: ZpbExmalifImpl.hpp:538
void setAz(float az) override
Definition: ZpbExmalifImpl.hpp:202
AxesPositionImpl(float alt, float az)
Definition: ZpbExmalifImpl.hpp:176
std::shared_ptr<::elt::mal::rr::Ami< std::string > > GetPresetProgress() override
Definition: ZpbExmalifImpl.hpp:904
std::string getLogger() const override
Definition: ZpbExmalifImpl.hpp:319
message TelPosition
Definition: exmalif.proto:13
::elt::mal::future< std::string > Disable() override
Definition: ZpbExmalifImpl.hpp:658
Definition: exmalif.pb.h:934
std::string getDesc() const override
Definition: ZpbExmalifImpl.hpp:437
Definition: exmalif.pb.h:1677
std::string Exit() override
Definition: ZpbExmalifImpl.hpp:1014
bool fromByteArray(const void *data, std::size_t size) override
Definition: ZpbExmalifImpl.hpp:120
::generated::zpb::exmalif::ExceptionErr ZpbType
Definition: ZpbExmalifImpl.hpp:402
void set_allocated_exit(::generated::zpb::exmalif::StdCmds_Exit_In *exit)
void set_allocated_reset(::generated::zpb::exmalif::StdCmds_Reset_In *reset)
float getAz() const override
Definition: ZpbExmalifImpl.hpp:198
TelPositionImpl(const TelPositionImpl &rhs)
Definition: ZpbExmalifImpl.hpp:61
Definition: exmalif.pb.h:830
TelPositionImpl(::generated::zpb::exmalif::TelPosition *inner)
Definition: ZpbExmalifImpl.hpp:45
void set_allocated_config(::generated::zpb::exmalif::StdCmds_Config_In *config)
::elt::mal::rr::ListenerRegistration registerConnectionListener(ConnectionListener listener) override
Definition: ZpbExmalifImpl.hpp:1068
float getDec() const override
Definition: ZpbExmalifImpl.hpp:77
AxesPositionImpl(const ::generated::zpb::exmalif::AxesPosition &inner)
Definition: ZpbExmalifImpl.hpp:171
Definition: ZpbExmalifImpl.hpp:400
float getAlt() const override
Definition: ZpbExmalifImpl.hpp:191
void sendUnhandledExceptionReply(zmq::socket_t &socket, const std::string &id, const std::string &topicIdFrame, const std::string &headerFrame,::elt::mal::exception_ptr exceptionPtr)
Definition: ZpbExmalifImpl.hpp:1520
bool hasKey() const override
Definition: ZpbExmalifImpl.hpp:345
::elt::mal::future< std::string > Config() override
Definition: ZpbExmalifImpl.hpp:718
Definition: exmalif.pb.h:1038
::generated::zpb::exmalif::LogInfo ZpbType
Definition: ZpbExmalifImpl.hpp:282
std::unique_ptr<::exmalif::LogInfo > cloneKey() const override
Definition: ZpbExmalifImpl.hpp:340
ExceptionErrImpl(const ::generated::zpb::exmalif::ExceptionErr &inner)
Definition: ZpbExmalifImpl.hpp:412
std::string getLevel() const override
Definition: ZpbExmalifImpl.hpp:312
Definition: exmalif.pb.h:321
::elt::mal::future< std::string > Reset() override
Definition: ZpbExmalifImpl.hpp:598
AxesPositionImpl(::generated::zpb::exmalif::AxesPosition *inner)
Definition: ZpbExmalifImpl.hpp:166
::elt::mal::future< std::string > Enable() override
Definition: ZpbExmalifImpl.hpp:628
message ExceptionErr
Definition: exmalif.proto:28
void set_allocated_getpresetprogress(::generated::zpb::exmalif::StdCmds_GetPresetProgress_In *getpresetprogress)
std::string Config() override
Definition: ZpbExmalifImpl.hpp:1004
void copy(const ::exmalif::ExceptionErr &from)
Definition: ZpbExmalifImpl.hpp:444
Definition: exmalif.pb.h:1142
std::shared_ptr<::elt::mal::rr::Ami< std::string > > GetPresetProgress() override
Definition: ZpbExmalifImpl.hpp:1054
ExceptionErrImpl(const std::string &desc, int32_t code)
Definition: ZpbExmalifImpl.hpp:422
Definition: exmalif.pb.h:1246
TelPositionImpl(TelPositionImpl &&rhs)
Definition: ZpbExmalifImpl.hpp:63
Definition: Exmalif.hpp:168
::elt::mal::future< std::string > Status() override
Definition: ZpbExmalifImpl.hpp:688
Definition: ZpbExmalifImpl.hpp:279
StdCmdsAsyncImpl(const ::elt::mal::Uri &uri, const std::vector< std::shared_ptr<::elt::mal::rr::qos::QoS >> &standardQoS, const ::elt::mal::Mal::Properties &malSpecificProperties, const std::shared_ptr<::elt::mal::ZpbMal > &zpbMal)
Definition: ZpbExmalifImpl.hpp:529
bool toByteArray(zmq::message_t &msg) const override
Definition: ZpbExmalifImpl.hpp:107
bool fromByteArray(const void *data, std::size_t size) override
Definition: ZpbExmalifImpl.hpp:241
ExceptionErrImpl(const ExceptionErrImpl &rhs)
Definition: ZpbExmalifImpl.hpp:428