RumPi Linux Client 1.0
A wxWidgets desktop dashboard that visualizes a RumPi robot's live sensor data as a condition-reactive scene
RumPiManagerThread.h
Go to the documentation of this file.
1#pragma once
2#include <wx/wx.h>
3#include <wx/thread.h>
4
6wxDECLARE_EVENT(wxEVT_RUMPI_UPDATE, wxThreadEvent);
7
15class RumPiManagerThread : public wxThread
16{
17protected:
18 wxEvtHandler* myWxEventHandler;
19
20public:
35 RumPiManagerThread(wxEvtHandler* handler);
36
47 virtual ~RumPiManagerThread();
48
63 virtual wxThread::ExitCode Entry() override;
64};
wxDECLARE_EVENT(wxEVT_RUMPI_UPDATE, wxThreadEvent)
Custom event used to send updated component data from the manager thread back to the UI.
Background wxThread that runs the RumPi library's sensor loop and posts refreshed component data (and...
Definition: RumPiManagerThread.h:16
RumPiManagerThread(wxEvtHandler *handler)
Builds the manager thread (joinable) and stores the UI handler.
Definition: RumPiManagerThread.cpp:24
virtual ~RumPiManagerThread()
Destroys the thread, waiting for it to finish first.
Definition: RumPiManagerThread.cpp:39
wxEvtHandler * myWxEventHandler
The UI event handler that receives component-update events.
Definition: RumPiManagerThread.h:18
virtual wxThread::ExitCode Entry() override
Thread body: starts the library, then loops on a fast tick (~100ms) fast-sampling the wind/motion/lig...
Definition: RumPiManagerThread.cpp:61