1234567891011121314151617181920212223 |
- #include <time.h>
- #include "inputbusiness.h"
-
- InputBusiness::InputBusiness(InputManager *input, const QList<QVariant> &channels, ServerManager *server)
- : m_input(input)
- , m_channels(channels)
- , m_server(server)
- {
- }
-
- InputBusiness::~InputBusiness()
- {
- }
-
- void InputBusiness::readAndSend()
- {
- QList<QVariant> values;
- quint64 timestamp = time(nullptr);
- foreach (auto channel, m_channels)
- values.append(m_input->read(channel));
- m_server->sendData(values, timestamp);
- }
|