sensorgroupthread.h
Go to the documentation of this file.
1 
7 #ifndef SENSORGROUPTHREAD_H
8 #define SENSORGROUPTHREAD_H
9 
10 #include <string>
11 #include <queue>
15 #include <boost/range/algorithm/remove_if.hpp>
16 #include <boost/algorithm/string/trim.hpp>
17 #include <algorithm>
18 
19 class ThreadDispatcher;
20 
26 typedef boost::function<void(const std::string&)> errorCallbackPtr;
27 
37 {
38 public:
47  std::shared_ptr<Syntax> syntax, ThreadDispatcher* dispatcher,
48  const std::unordered_map<unsigned char, std::shared_ptr<SensorGroup>>&
49  sensorGroups);
53  void startThread();
57  void stopThread();
65 
66 private:
69  std::shared_ptr<Syntax> syntax;
70  std::unordered_map<unsigned char, std::shared_ptr<SensorGroup>>
80  void workerFunction();
81 };
82 
83 #endif // SENSORGROUPTHREAD_H
SensorGroupThread(std::shared_ptr< Syntax > syntax, ThreadDispatcher *dispatcher, const std::unordered_map< unsigned char, std::shared_ptr< SensorGroup >> &sensorGroups)
SensorGroupThread constructor.
Header file for the CommunicationThread class.
The ThreadDispatcher class coordinates other communication threads and handles start up and shut down...
boost::function< void(const std::string &)> errorCallbackPtr
boost::function< void(const std::string &)> errorCallbackPtr
Definition: readingthread.h:24
void workerFunction()
Worker function, responsible for parsing sensor messages and calling the correct sensor group process...
ThreadDispatcher * dispatcher
Header file for the ThreadDispatcher class.
std::shared_ptr< Syntax > syntax
Header file for the SensorGroup class.
void stopThread()
Stop parsing incoming sensor group messages.
void registerErrorCallback(errorCallbackPtr error)
Register an error callback that can be called to treat occuing communication and parsing errors...
The CommunicationThread class is the abstract base class of all thread objects used in the communicat...
std::unordered_map< unsigned char, std::shared_ptr< SensorGroup > > sensorGroups
errorCallbackPtr error
void startThread()
Start parsing incoming sensor group messages.
The SensorGroupThread class implements functionality to extract the group identifier of an incoming s...


pses_ucbridge
Author(s): Sebastian Ehmes
autogenerated on Sat Oct 28 2017 19:16:13