#include "EthernetCameraSensor.h"

namespace cosi {

namespace library {

namespace wiredbas {

EthernetCameraSensor::EthernetCameraSensor() {
	ComponentName = "Ethernet-Camera-Sensor";
	ComponentType = "Sensor";
	mPorts.AddPort("P1", "Eth", cosi::PortInterface::INOUT) ;
}

EthernetCameraSensor::~EthernetCameraSensor() {

}

cosi::commstruct::wiredbas::PlatformInstance* EthernetCameraSensor::GetPlatformInstance(
		int V, Position pP) {
	cosi::commstruct::wiredbas::PlatformInstance * RetVal =
			new cosi::commstruct::wiredbas::PlatformInstance("");
	RetVal->AddVertex(V) ;
	(*RetVal)[V].PRJ(Name)SetValue(ComponentName);
	(*RetVal)[V].PRJ(Type)SetValue(ComponentType);
	(*RetVal)[V].PRJ(Position)Set(pP);
	(*RetVal)[V].PRJ(Ports)Set(mPorts);
	return RetVal;
}

cosi::commstruct::wiredbas::Implementation * EthernetCameraSensor::GetImplementationInstance(
		int V, Position pP, ThreadSet pThreads, TransferTable pT) {
	cosi::commstruct::wiredbas::Implementation
				* RetVal = new cosi::commstruct::wiredbas::Implementation("");
	RetVal->AddVertex(V) ;
	(*RetVal)[V].PRJ(Name)SetValue(ComponentName);
	(*RetVal)[V].PRJ(Type)SetValue(ComponentType);
	(*RetVal)[V].PRJ(Position)Set(pP);
	(*RetVal)[V].PRJ(Ports)Set(mPorts);
	(*RetVal)[V].PRJ(ThreadSet)Set(pThreads);
	(*RetVal)[V].PRJ(TransferTable)Set(pT);
	return RetVal;
}

double EthernetCameraSensor::GetCost() {
	return mCostModel->GetValue(ComponentName, ComponentType, mPorts) ;
}
RealDelay EthernetCameraSensor::GetDelay(Vertex NodeId,
		cosi::commstruct::wiredbas::Implementation* pI, Vertex Src, Vertex Dest) {
	return RealDelay(0) ;
}
double EthernetCameraSensor::GetDelayValue(Vertex NodeId,
		cosi::commstruct::wiredbas::Implementation* pI, Vertex Src, Vertex Dest) {
	return 0;
}

}

}

}
