Add stop transfer automatically.
This commit is contained in:
@@ -125,6 +125,7 @@ void DeviceManager::initDevice()
|
||||
mGetScanProgressAction = new DmsAsyncAction(USRV_SCAN, ACT_SCAN_PROGRESS_PASSIVE, this,"responseGetScanProgress(const QString&)", this);
|
||||
mGetSoftwareVersionAction = new DmsAsyncAction(USRV_INFOCFG, ACT_IFCFG_VERINFO, this,"responseGetSoftwareVersion(const QString&)", this);
|
||||
mGetDeviceTemperatureAction = new DmsAsyncAction(USRV_SCAN, ACT_SCAN_TEMP, this, "responseGetDeviceTemperature(const QString&)", this);
|
||||
mStopTransferAction = new DmsAsyncAction(USRV_XFR, ACT_XFR_STOP, this, "responseStopTransfer(const QString&)", this);
|
||||
connect(mGetScanProgressAction, &DmsAsyncAction::timeout, this, &DeviceManager::scanTimeout);
|
||||
|
||||
|
||||
@@ -565,6 +566,9 @@ void DeviceManager::processReceiveDMSInfoResult(int aServerID, int aActionID, co
|
||||
case ACT_XFR_START :
|
||||
emit responseTransfer(aContents);
|
||||
break;
|
||||
case ACT_XFR_STOP :
|
||||
emit responseStopTransfer(aContents);
|
||||
break;
|
||||
case ACT_XFR_PROGRESS_PASSIVE :
|
||||
emit responseGetTransferProgress(aContents);
|
||||
break;
|
||||
@@ -802,6 +806,7 @@ void DeviceManager::startTransfer()
|
||||
int code = jsonObj["code"].toInt();
|
||||
if(code != 0)
|
||||
{
|
||||
mStopTransferAction->execute();
|
||||
QString msg = jsonObj["info"].toString();
|
||||
THROW_ERROR(msg);
|
||||
return;
|
||||
|
||||
@@ -149,6 +149,7 @@ signals:
|
||||
void responsePumpControl(const QString& aResponse);
|
||||
void responseSetSimulatorMode(const QString& aResponse);
|
||||
void responseSetHeartBeat(const QString& aResponese);
|
||||
void responseStopTransfer(const QString& aResponse);
|
||||
//Recon
|
||||
void createEmptyScanToRecon(const QString& aScanID, const QString& aPath);
|
||||
void createScanToRecon(const QString& aScanID, const QString& aPatientID, const QString& aReferenceID, const QString& aPath);
|
||||
@@ -200,6 +201,7 @@ private:
|
||||
DmsAsyncAction* mGetDeviceTemperatureAction = nullptr;
|
||||
DmsAsyncAction* mGetScanProgressAction = nullptr;
|
||||
DmsAsyncAction* mGetSoftwareVersionAction = nullptr;
|
||||
DmsAsyncAction* mStopTransferAction = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user