Skip to content

Commit

Permalink
outsourced temperature scan
Browse files Browse the repository at this point in the history
  • Loading branch information
JochiSt committed Jun 20, 2017
1 parent 931ba6e commit fe01ad4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef UTILS_H
#define UTILS_H

#include <vector>
#include "schematic.h"

/**
* \class utils
* \author Jochen Steinmann
Expand Down Expand Up @@ -42,6 +45,13 @@ class utils {
* \param[in] devhours device hours = runtime * devices * acceleration factor
*/
static float calcFIT(float conflevel, int failures, double devhours);

/**
* @param[in] schematic schematic, wich should be used for the temperature scan
* @param[in] temperatures given set of temperatures
* @param[out] FIT calculated FIT values corresponding the temperatures
*/
static void temperatureScan(schematic* schematic, std::vector<float> temperatures, std::vector<float> &FIT);
};

#endif
17 changes: 17 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,20 @@ float utils::calcFIT(float conflevel, int failures, double devhours){
return FIT;
}



void utils::temperatureScan(schematic* schematic, std::vector<float> temperatures, std::vector<float> &FIT){

FIT.clear();

bool verboseOutput = schematic -> getVerboseOutput();
schematic->setVerboseOutput(false); // we want a quiet function

for(unsigned int i=0; i < temperatures.size(); i++){
schematic -> setAmbientTemperature( temperatures[i] );
FIT.push_back( schematic -> getFIT() );

}

schematic -> setVerboseOutput( verboseOutput );
}

0 comments on commit fe01ad4

Please sign in to comment.