Mrntt: Call initializeDeviceReattacher in init
It works surprisingly well on the first try.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <callback.h>
|
||||
#include <componentThread.h>
|
||||
#include <deviceManager/deviceManager.h>
|
||||
#include <deviceManager/deviceReattacher.h>
|
||||
#include <senseApis/senseApiManager.h>
|
||||
#include <marionette/marionette.h>
|
||||
#include <mind.h>
|
||||
@@ -26,6 +27,10 @@ std::vector<std::shared_ptr<DeviceRole>>
|
||||
std::vector<DeviceAttachmentSpec>
|
||||
DeviceManager::commandLineDASpecs;
|
||||
|
||||
DeviceManager::~DeviceManager()
|
||||
{
|
||||
}
|
||||
|
||||
const std::string DeviceManager::stringifyDeviceSpecs(void)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@@ -700,5 +705,20 @@ void DeviceManager::detachAllAttachedDeviceRoles(
|
||||
request.get(), request));
|
||||
}
|
||||
|
||||
void DeviceManager::initializeDeviceReattacher()
|
||||
{
|
||||
deviceReattacher = std::make_unique<DeviceReattacher>(
|
||||
*this, mrntt::mrntt.thread);
|
||||
|
||||
deviceReattacher->start();
|
||||
}
|
||||
|
||||
void DeviceManager::finalizeDeviceReattacher()
|
||||
{
|
||||
if (deviceReattacher) {
|
||||
deviceReattacher->stop();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace device
|
||||
} // namespace smo
|
||||
|
||||
Reference in New Issue
Block a user