rad
2.0.0
|
#include <pthreadActivity.hpp>
Public Member Functions | |
PthreadActivity (const std::string &id, const int cpu=-1, const int priotity=-1) | |
virtual | ~PthreadActivity () |
virtual void | Run ()=0 |
std::string | GetName () |
int | SetName (const std::string &name) |
int | GetCPU () const |
int | GetConfiguredCPU () const |
void | SetConfiguredCPU (const int cpu) |
int | GetPriority () |
int | GetConfiguredPriority () const |
void | SetConfiguredPriority (const int priority) |
pthread_t | GetNativeHandle () const override |
PthreadActivity (const PthreadActivity &)=delete | |
PthreadActivity & | operator= (const PthreadActivity &)=delete |
Disable copy constructor. More... | |
PthreadActivity (const std::string &id, const int cpu=-1, const int priotity=-1) | |
virtual | ~PthreadActivity () |
virtual void | Run ()=0 |
std::string | GetName () |
int | SetName (const std::string &name) |
int | GetCPU () const |
int | GetConfiguredCPU () const |
void | SetConfiguredCPU (const int cpu) |
int | GetPriority () |
int | GetConfiguredPriority () const |
void | SetConfiguredPriority (const int priority) |
pthread_t | GetNativeHandle () const override |
PthreadActivity (const PthreadActivity &)=delete | |
PthreadActivity & | operator= (const PthreadActivity &)=delete |
Disable copy constructor. More... | |
![]() | |
ThreadBaseActivity (ThreadBaseActivity const &)=delete | |
void | start () override |
void | stop () override |
std::string | GetName () const |
int | SetName (const std::string &name) |
ThreadBaseActivity (ThreadBaseActivity const &)=delete | |
void | start () override |
void | stop () override |
std::string | GetName () const |
int | SetName (const std::string &name) |
bool | IsStopRequested () const |
To be implemented by child classes. More... | |
bool | IsStopRequested () const |
To be implemented by child classes. More... | |
![]() | |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Protected Member Functions | |
void | StartThread () override |
Disable assignment operator. More... | |
void | JoinThread () override |
bool | IsThreadJoined () const override |
void | StartThread () override |
Disable assignment operator. More... | |
void | JoinThread () override |
bool | IsThreadJoined () const override |
![]() |
This class is the base class for pthread-based do-activities.
: move to std::threads
: add common base class
: add fiber based activity
This class is the base class for pthread-based do-activities.
: move to std::threads
: add common base class
: add fiber based activity
|
explicit |
Constructor for the PthreadActivity class.
[in] | id | Identifier of the do-activity. |
[in] | cpu | Core where to run the thread associated to the activity. |
[in] | priority | Priority of the thread associated to the activity. |
|
virtual |
Destructor for the PthreadActivity class.
|
delete |
|
explicit |
|
virtual |
|
delete |
int rad::PthreadActivity::GetConfiguredCPU | ( | ) | const |
int rad::PthreadActivity::GetConfiguredCPU | ( | ) | const |
int rad::PthreadActivity::GetConfiguredPriority | ( | ) | const |
int rad::PthreadActivity::GetConfiguredPriority | ( | ) | const |
int rad::PthreadActivity::GetCPU | ( | ) | const |
int rad::PthreadActivity::GetCPU | ( | ) | const |
std::string rad::PthreadActivity::GetName | ( | ) |
std::string rad::PthreadActivity::GetName | ( | ) |
|
overridevirtual |
Implements rad::ThreadBaseActivity.
|
overridevirtual |
Implements rad::ThreadBaseActivity.
int rad::PthreadActivity::GetPriority | ( | ) |
int rad::PthreadActivity::GetPriority | ( | ) |
|
overrideprotectedvirtual |
Implements rad::ThreadBaseActivity.
|
overrideprotectedvirtual |
Implements rad::ThreadBaseActivity.
|
overrideprotectedvirtual |
Helper method to stop a do-activity thread.
Implements rad::ThreadBaseActivity.
|
overrideprotectedvirtual |
Implements rad::ThreadBaseActivity.
|
delete |
Disable copy constructor.
|
delete |
Disable copy constructor.
|
pure virtual |
Implemented in MyTestDoActivityPthread.
|
pure virtual |
Implemented in MyTestDoActivityPthread.
void rad::PthreadActivity::SetConfiguredCPU | ( | const int | cpu | ) |
Configure the CPU on which the thread should be executed.
[in] | cpu | New core identifier. |
void rad::PthreadActivity::SetConfiguredCPU | ( | const int | cpu | ) |
void rad::PthreadActivity::SetConfiguredPriority | ( | const int | priority | ) |
void rad::PthreadActivity::SetConfiguredPriority | ( | const int | priority | ) |
Configure the priority for this thread.
[in] | priority | New thread priority. |
int rad::PthreadActivity::SetName | ( | const std::string & | name | ) |
int rad::PthreadActivity::SetName | ( | const std::string & | name | ) |
[in] | name | for the thread. |
|
overrideprotectedvirtual |
Disable assignment operator.
Helper method to start a do-activity thread.
Implements rad::ThreadBaseActivity.
|
overrideprotectedvirtual |
Disable assignment operator.
Implements rad::ThreadBaseActivity.