ifw
0.0.1-dev
|
#include <taskSetup.hpp>
Public Member Functions | |
TaskSetup (const std::string &id, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade, modif::ReqSetup setup) | |
Class constructor. More... | |
virtual | ~TaskSetup () |
Default destructor. More... | |
virtual void | run () |
Thread run method. More... | |
TaskSetup (const TaskSetup &)=delete | |
Disable copy constructor. More... | |
TaskSetup & | operator= (const TaskSetup &)=delete |
Disable assignment operator. More... | |
TaskSetup (const std::string &id, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade, modif::ReqSetup setup) | |
Class constructor. More... | |
virtual | ~TaskSetup () |
Default destructor. More... | |
virtual void | run () |
Thread run method. More... | |
TaskSetup (const TaskSetup &)=delete | |
Disable copy constructor. More... | |
TaskSetup & | operator= (const TaskSetup &)=delete |
Disable assignment operator. More... | |
TaskSetup (const std::string &id, rad::SMAdapter &sm, DataContext &data_ctx, DeviceFacade &device_facade, modif::ReqSetup setup) | |
Class constructor. More... | |
virtual | ~TaskSetup () |
Default destructor. More... | |
virtual void | run () |
Thread run method. More... | |
TaskSetup (const TaskSetup &)=delete | |
Disable copy constructor. More... | |
TaskSetup & | operator= (const TaskSetup &)=delete |
Disable assignment operator. More... | |
![]() | |
Activity (const std::string &id, rad::SMAdapter &sm) | |
virtual | ~Activity () |
virtual void | start () |
virtual void | stop () |
std::string | GetName () |
int | SetName (const std::string &name) |
pthread_t | GetPThread () |
void | TriggerInternalEvent (UniqueEvent &&e) |
Activity (const Activity &)=delete | |
Activity & | operator= (const Activity &)=delete |
Disable copy constructor. More... | |
Activity (const std::string &id, rad::SMAdapter &sm) | |
virtual | ~Activity () |
virtual void | start () |
virtual void | stop () |
std::string | GetName () |
int | SetName (const std::string &name) |
pthread_t | GetPThread () |
void | TriggerInternalEvent (UniqueEvent &&e) |
Activity (const Activity &)=delete | |
Activity & | operator= (const Activity &)=delete |
Disable copy constructor. More... | |
Activity (const std::string &id, rad::SMAdapter &sm) | |
virtual | ~Activity () |
virtual void | start () |
virtual void | stop () |
std::string | GetName () |
int | SetName (const std::string &name) |
pthread_t | GetPThread () |
void | TriggerInternalEvent (UniqueEvent &&e) |
Activity (const Activity &)=delete | |
Activity & | operator= (const Activity &)=delete |
Disable copy constructor. More... | |
![]() | |
Activity (const std::string &id) | |
bool | isRunning () |
void | setRunning (const bool running) |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
bool | isRunning () |
void | setRunning (const bool running) |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
bool | isRunning () |
void | setRunning (const bool running) |
std::string | getId () const |
void | setId (const std::string &id) |
This class implements a worker thread to manage a setup command. The thread will be active until the setup finishes succesfully or when an error or timeout occurs. When the server receives a STOP command, the thread shall be stopped.
The TaskSetup reports the outcome of the setup action through events. The three events used are: SetupDone, SetupTimeout and SetupError.
This worker class prevent the Device Manager to block when managing parallel setup events.
Several worker threads can be running concurrently. Handling of conflicts between devices addressed in several setups shall be handled at the controller side.
devmgr::common::TaskSetup::TaskSetup | ( | const std::string & | id, |
rad::SMAdapter & | sm, | ||
DataContext & | data_ctx, | ||
DeviceFacade & | device_facade, | ||
modif::ReqSetup | setup | ||
) |
Class constructor.
[in] | id | Thread ID |
[in,out] | sm | Reference to SM object |
[in,out] | data_ctx | Reference to data context object |
[in,out] | device_facade | Reference to device facade object |
[in] | setup | Copy of setup request object |
|
virtual |
Default destructor.
devmgr::common::TaskSetup::TaskSetup | ( | const std::string & | id, |
rad::SMAdapter & | sm, | ||
DataContext & | data_ctx, | ||
DeviceFacade & | device_facade, | ||
modif::ReqSetup | setup | ||
) |
Class constructor.
[in] | id | Thread ID |
[in,out] | sm | Reference to SM object |
[in,out] | data_ctx | Reference to data context object |
[in,out] | device_facade | Reference to device facade object |
[in] | setup | Copy of setup request object |
|
virtual |
Default destructor.
devmgr::common::TaskSetup::TaskSetup | ( | const std::string & | id, |
rad::SMAdapter & | sm, | ||
DataContext & | data_ctx, | ||
DeviceFacade & | device_facade, | ||
modif::ReqSetup | setup | ||
) |
Class constructor.
[in] | id | Thread ID |
[in,out] | sm | Reference to SM object |
[in,out] | data_ctx | Reference to data context object |
[in,out] | device_facade | Reference to device facade object |
[in] | setup | Copy of setup request object |
|
virtual |
Default destructor.
Disable assignment operator.
Disable assignment operator.
Disable assignment operator.
|
virtual |
Thread run method.
Do-activity to perform the actions of a setup command. The specific actions are defined by the payload of the setup message.
Implements rad::Activity.
|
virtual |
Thread run method.
Do-activity to perform the actions of a setup command. The specific actions are defined by the payload of the setup message.
Implements rad::Activity.
|
virtual |
Thread run method.
Do-activity to perform the actions of a setup command. The specific actions are defined by the payload of the setup message.
Implements rad::Activity.