Skip to content
Snippets Groups Projects
Select Git revision
  • 317e8f4bb5b1b431c0245fe2a1208fd7cff08b54
  • master default protected
2 results

nginx.yml

Blame
  • Forked from Sebastian Rieger / cloud-computing-msc-ai-examples
    Source project has a limited visibility.
    expirament.h 1.32 KiB
    #pragma once
    
    #include "coincell.h"
    #include "biocontrol.h"
    #include "heaters.h"
    #include "multiplexers.h"
    #include "vcpps.h"
    
    #include <atomic>
    
    class Expirament
    {
    private:
    	static constexpr size_t MAX_LOOP = 100;
    	static constexpr size_t STEP_COUNT = 11;
    
    	std::vector<std::unique_ptr<CoinCell>>* coinCells;
    	Vcpps* psu;
    	Heaters* heaters;
    	Multiplexers* multiplexers;
    	BioControl* biocontrol;
    	float voltage;
    	float current;
    	std::filesystem::path outdir;
    	std::filesystem::path stepfile;
    	std::atomic<size_t> globalstep = 0;
    
    	bool preparePsu();
    
    	bool step(size_t startsubstep = 0);
    
    	void setTemperatures(float fraction);
    
    	bool takeMesurements();
    
    	bool heatMeasureSeq(float fraction);
    
    	bool thermalCycle(size_t count, size_t start = 0);
    
    	bool charge(float fraction, bool all = false);
    
    	bool chargeCellToVoltage(int id, float voltage);
    
    	void saveStep(size_t substep = 0);
    
    	std::filesystem::path createCsvPath(const std::filesystem::path& filename);
    
    public:
    
    	Expirament(std::vector<std::unique_ptr<CoinCell>>* coinCells, Vcpps* psu, float voltage, float current,
    		Heaters* heaters, Multiplexers* multiplexers, BioControl* biocontrol, const std::filesystem::path& outdir,
    		const std::filesystem::path& stepfile);
    
    	bool startup();
    	bool run(size_t startstep = 0, size_t startsubstep = 0);
    	bool shutdown();
    
    	size_t getGlobalstep();
    };