neic-glass3  1.4.6
brokerInput.h
Go to the documentation of this file.
1 /*****************************************
2  * This file is documented for Doxygen.
3  * If you modify this file please update
4  * the comments so that Doxygen will still
5  * be able to work.
6  ****************************************/
7 #ifndef BROKERINPUT_H
8 #define BROKERINPUT_H
9 
10 #include <json.h>
11 #include <threadbaseclass.h>
12 #include <input.h>
13 #include <Consumer.h>
14 
15 #include <vector>
16 #include <queue>
17 #include <mutex>
18 #include <string>
19 #include <memory>
20 
21 namespace glass3 {
22 
34  public:
41  brokerInput();
42 
52  explicit brokerInput(const std::shared_ptr<const json::Object> &config);
53 
60  ~brokerInput();
61 
70  bool setup(std::shared_ptr<const json::Object> config) override;
71 
78  void clear() override;
79 
80  protected:
90  std::string fetchRawData(std::string* pOutType) override;
91 
96  void logConsumer(const std::string &message);
97 
98  private:
102  hazdevbroker::Consumer * m_Consumer;
103 
107  int m_iBrokerHeartbeatInterval;
108 
113  double m_dPollTime;
114 
119  int m_iRunningAverageCounter;
120 
125  double m_dRunningPollTimeAverage;
126 
131  int m_iMessageCounter;
132 
136  time_t tLastPerformanceReport;
137 
144  int m_iReportInterval;
145 };
146 } // namespace glass3
147 #endif // BROKERINPUT_H
glass3 broker input class
Definition: brokerInput.h:33
brokerInput()
brokerInput constructor
Definition: brokerInput.cpp:16
bool setup(std::shared_ptr< const json::Object > config) override
brokerInput configuration function
Definition: brokerInput.cpp:64
void logConsumer(const std::string &message)
the function for consumer logging
Definition: brokerInput.cpp:314
The neic-glass3 project namespace containing all the classes and functions that make up neic-glass3...
void clear() override
output clear function
Definition: brokerInput.cpp:193
neic-glass3 Input class
Definition: input.h:66
~brokerInput()
brokerInput destructor
Definition: brokerInput.cpp:56
std::string fetchRawData(std::string *pOutType) override
get input data string and type
Definition: brokerInput.cpp:202