You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inputbusiness.cpp 621B

123456789101112131415161718192021222324
  1. #include <time.h>
  2. #include "inputbusiness.h"
  3. InputBusiness::InputBusiness(InputManager *input, const QList<QVariant> &channels, quint64 interval, ServerManager *server)
  4. : m_server(server)
  5. , m_thread(new ReadThread(input, channels, interval, this))
  6. {
  7. connect(m_thread, SIGNAL(newValues(InputValues,quint64)), this, SLOT(m_newValues(InputValues,quint64)));
  8. }
  9. InputBusiness::~InputBusiness()
  10. {
  11. }
  12. void InputBusiness::m_newValues(InputValues values, quint64 timestamp)
  13. {
  14. m_server->sendData(values, timestamp);
  15. emit newValues(values, timestamp);
  16. }
  17. void InputBusiness::start()
  18. {
  19. m_thread->start();
  20. }