// CLEAN
// LISTCLEAN

/***************************************************************************
                          rack.h  -  description
                             -------------------
    begin                : Mon Apr 15 2002
    copyright            : (C) 2002 by Ross Andrews
    email                : randrews@geekfu.org
 ***************************************************************************/

class rack;

#ifndef RACK_H
#define RACK_H

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

#include "module.h"

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;
	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;
	double cs_p4_asc,cs_p4_orb,cs_p4_desc;
	double cs_m20_asc,cs_m20_orb,cs_m20_desc;
	double cs_m80_asc,cs_m80_orb,cs_m80_desc;
	double cs_m180_asc,cs_m180_orb,cs_m180_desc;

	vector<double> sums; // The sums fields

	bool RFCA;
	module* mod;

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

	double calc_energy();
};

#endif
