// Adapted from cold stowage
class Rack;

#ifndef RACK_H
#define RACK_H

#include "resultset.h"
#include <string>

using namespace std;

/**
  *@author Ross Andrews
  */

class Rack {
private:

public: 
	Rack();
	Rack(MYSQL&,string);
	~Rack();
	string name;
	string modname; // The *recommended* module name
	string partner; // The partner this rack is made by
	double cycles_per_increment,hrs_per_cycle, // Runtime
	       upmass_resupply,mid_resupply,stowage, // Stowage/upmass
	       power,keepalive_power, // Power
	       crew_training,crew_time, // Crewtime
	       MTL_flow,MTL_flow_keepalive,MTL_inlet,MTL_outlet, // MTL
	       LTL_flow,LTL_flow_keepalive,LTL_inlet,LTL_outlet, // LTL
	       video_uplink,video_downlink,video_rate, // Video
	       // Networking
	       nominal_uplink,peak_uplink,peak_uplink_duration,
	       nominal_downlink,peak_downlink,peak_downlink_duration,
	       nominal_1553,peak_1553,peak_1553_duration,
	       nominal_ethernet,peak_ethernet,peak_ethernet_duration,
	       nominal_HRL,peak_HRL,peak_HRL_duration;
	bool RFCA;
	bool attached;
	//module* mod;
	static double inclength,middeckmass,rack_overhead;
	double mod_MTL_min,mod_MTL_RFCA_min,
	  mod_MTL_max,mod_MTL_RFCA_max;
	double mod_LTL_min,mod_LTL_RFCA_min,
	  mod_LTL_max,mod_LTL_RFCA_max;

	double calc_runtime();
	double calc_MTL_flow();
	double calc_MTL_flow_keepalive();
	double calc_LTL_flow();
	double calc_LTL_flow_keepalive();

	double calc_energy();
	double calc_upmass();
};

#endif
