Développement cloud.
This commit is contained in:
@@ -56,6 +56,7 @@ int CSystemConfig::LoadConfig()
|
||||
|
||||
*InputStream >> FileVersion;
|
||||
|
||||
//Load CAN devices configs
|
||||
int NbDevices;
|
||||
*InputStream >> NbDevices;
|
||||
for(int i = 0; i < NbDevices; i++)
|
||||
@@ -66,6 +67,12 @@ int CSystemConfig::LoadConfig()
|
||||
mCANDeviceConfigList.append(NewDeviceConfig);
|
||||
}
|
||||
|
||||
//Load Cloud logging settings
|
||||
*InputStream >> mCloudLoggingParams;
|
||||
|
||||
//Load general program settings
|
||||
*InputStream >> mSaveLocalLogFile;
|
||||
|
||||
|
||||
ConfigFile->close();
|
||||
delete ConfigFile;
|
||||
@@ -111,6 +118,12 @@ int CSystemConfig::SaveConfig()
|
||||
*OutputStream << *mCANDeviceConfigList.at(i); //Add each device info to config file
|
||||
}
|
||||
|
||||
//Save the Cloud logging settings
|
||||
*OutputStream << mCloudLoggingParams;
|
||||
|
||||
//Save the general system parameters
|
||||
*OutputStream << mSaveLocalLogFile;
|
||||
|
||||
ConfigFile->flush();
|
||||
ConfigFile->close();
|
||||
|
||||
@@ -147,3 +160,17 @@ int CSystemConfig::SetCANDevicesConfigList(QList<CCANDeviceConfig *> *DevicesCon
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
CCloudParams *CSystemConfig::GetCloudParams()
|
||||
{
|
||||
return &mCloudLoggingParams;
|
||||
}
|
||||
|
||||
int CSystemConfig::SetCloudParams(CCloudParams *CloudParams)
|
||||
{
|
||||
if(CloudParams == 0)
|
||||
return RET_GENERAL_ERROR;
|
||||
|
||||
mCloudLoggingParams = *CloudParams;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user