ifw-fcf
2.0.0
|
#include <taskSetup.hpp>
Public Member Functions | |
TaskSetup (const std::string &id, DataContext &data_ctx, DeviceFacade &device_facade, const std::any &payload) | |
Class constructor. More... | |
virtual | ~TaskSetup () |
Default destructor. More... | |
void | Run () override |
Thread run method. More... | |
TaskSetup (const TaskSetup &)=delete | |
Disable copy constructor. More... | |
TaskSetup & | operator= (const TaskSetup &)=delete |
Disable assignment operator. More... | |
This class implements a worker thread to manage a setup command. The thread will be active until the setup finishes successfully 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.
fcf::devmgr::common::TaskSetup::TaskSetup | ( | const std::string & | id, |
DataContext & | data_ctx, | ||
DeviceFacade & | device_facade, | ||
const std::any & | payload | ||
) |
Class constructor.
[in] | id | Thread ID |
[in,out] | data_ctx | Reference to data context object |
[in,out] | device_facade | Reference to device facade object |
[in] | payload | setup request object |
|
virtual |
Default destructor.
|
delete |
Disable copy constructor.
Disable assignment operator.
|
override |
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.