Motorcortex Core  version: 2.7.6
cm_publisher.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2016 VECTIONEER.
4  */
5 
6 #ifndef CM_PUBLISHER_H
7 #define CM_PUBLISHER_H
8 
9 #include "ct_module.h"
10 #include "cm_conndata.h"
11 
12 namespace mcx::comm {
13 
14 class BaseRequestReply;
15 
16 class BasePublisher;
17 
18 class Publisher : public container::Module {
19 public:
20 
21  Publisher(const BaseRequestReply& req, ConnectionData url);
22 
23  ~Publisher() override;
24 
25 private:
26 
27  void create_(const char* name, parameter_server::Parameter* parameter_server, uint64_t dt_micro_s) override {};
28 
29  bool initPhase1_() override;
30 
31  bool initPhase2_() override { return true; };
32 
33  bool startOp_() override;
34 
35  bool iterateOp_(const container::TaskTime& system_time, container::UserTime* user_time) override;
36 
37  bool stopOp_() override;
38 
39  BasePublisher* pub_;
40  ConnectionData url_;
41 
42 };
43 
44 } // namespace mcx::comm
45 
46 #endif /* CM_PUBLISHER_H */
47 
mcx::parameter_server::Parameter
Definition: ps_parameter.h:45
mcx::comm::BaseRequestReply
Definition: cm_basereqrep.h:18
mcx::comm::ConnectionData
Definition: cm_conndata.h:18
mcx::comm::BasePublisher
Definition: cm_basepub.h:14
mcx::container::TaskTime
Internal time source.
Definition: ct_time.h:25
mcx::container::UserTime
External time source.
Definition: ct_time.h:40
mcx::container::Module
A building block of the Motorcortex components.
Definition: ct_module.h:64
mcx::comm::Publisher
Definition: cm_publisher.h:18