#include "ArcnetNodeCost.h"

namespace cosi {

namespace models {

namespace wiredbas {

ArcnetNodeCost::ArcnetNodeCost() {
}

ArcnetNodeCost::~ArcnetNodeCost() {
}

double ArcnetNodeCost::GetValue(std::string pComponentName,
		std::string pComponentType, Ports pPorts) {
	if (pComponentType =="Sensor") {
		return 160;
	} else if (pComponentType =="Actuator") {
		return 250;
	} else if (pComponentType =="Router") {
		return 740;
	} else if (pComponentType =="Gateway") {
		return 1440;
	} else if (pComponentType =="Controller") {
			return 1440;
	} else {
		return 0;
	}
}

double ArcnetNodeCost::GetValue(std::string pComponentName,
		std::string pComponentType, Ports pPorts, double pBusSpeed) {

	if (pComponentType =="Sensor") {
		return 160;
	} else if (pComponentType =="Actuator") {
		return 250;
	} else if (pComponentType =="Router") {
		return 740;
	} else if (pComponentType =="Gateway") {
		return 1440;
	} else if (pComponentType =="Controller") {
				return 1440;
	} else {
		return 0;
	}

}

}

}

}
