rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions
TunerstudioThread Class Referenceabstract

#include <tunerstudio.h>

Inheritance diagram for TunerstudioThread:
Inheritance graph
[legend]
Collaboration diagram for TunerstudioThread:
Collaboration graph
[legend]

Public Member Functions

 TunerstudioThread (const char *name)
 
virtual TsChannelBasesetupChannel ()=0
 
void ThreadTask () override
 
- Public Member Functions inherited from ThreadController< CONNECTIVITY_THREAD_STACK >
 ThreadController (const char *name, tprio_t priority)
 
void start ()
 Start the thread.
 
void stop ()
 Request thread termination and waits for termination.
 

Additional Inherited Members

- Protected Member Functions inherited from ThreadController< CONNECTIVITY_THREAD_STACK >
void main () override
 
- Protected Attributes inherited from ThreadController< CONNECTIVITY_THREAD_STACK >
const char *const m_name
 

Detailed Description

Definition at line 79 of file tunerstudio.h.

Constructor & Destructor Documentation

◆ TunerstudioThread()

TunerstudioThread::TunerstudioThread ( const char name)
inline

Definition at line 81 of file tunerstudio.h.

82 : ThreadController(name, PRIO_CONSOLE)
83 {
84 }
A base class for a controller that requires its own thread.

Member Function Documentation

◆ setupChannel()

virtual TsChannelBase * TunerstudioThread::setupChannel ( )
pure virtual

Referenced by ThreadTask().

Here is the caller graph for this function:

◆ ThreadTask()

void TunerstudioThread::ThreadTask ( )
overridevirtual

Implements ThreadController< CONNECTIVITY_THREAD_STACK >.

Definition at line 741 of file tunerstudio.cpp.

741 {
742 auto channel = setupChannel();
743
744 // No channel configured for this thread, cancel.
745 if (!channel || !channel->isConfigured()) {
746 return;
747 }
748
749 // Until the end of time, process incoming messages.
750 while (true) {
751 if (tsProcessOne(channel) == 0) {
752 onDataArrived(true);
753 } else {
754 onDataArrived(false);
755 }
756 }
757}
uint16_t channel
Definition adc_inputs.h:104
virtual TsChannelBase * setupChannel()=0
void onDataArrived(bool valid)
static int tsProcessOne(TsChannelBase *tsChannel)
Here is the call graph for this function:

The documentation for this class was generated from the following files: