コード例 #1
0
void MechanicalCoolingControl::delta_ext(double e, const IO_Bag& xb)
{
	IO_Bag::const_iterator iter = xb.begin();
	for (; iter != xb.end(); iter++)
	{
		assert((*iter).port == tempData);
		TemperatureEvent* temp =
			dynamic_cast<TemperatureEvent*>((*iter).value);
		if (temp->getItem() == THERMOSTAT_THERMOMETER && temp->getUnit() == 4)
		{
			if (off && temp->getTempC() > setPoint)
				change_mode = true;
			else if (!off && temp->getTempC() < setPoint-deadBand)
				change_mode = true;
		}
	}
}
コード例 #2
0
void MechanicalCoolingControl::gc_output(IO_Bag& yb)
{
	IO_Bag::iterator iter = yb.begin();
	for (; iter != yb.end(); iter++)
		delete (*iter).value;
}