package Projects.Cible1;

import gpclasses.baseclasses.*;
import gpclasses.system.*;
import gpclasses.tags.*;
import gpclasses.trends.*;
import gpclasses.macroobjects.*;

public class TagDB0
{
	public static Object classFactory1(int tagFieldIdentifier)
	{
		//switch (tagFieldIdentifier - TagDB.startNumber + 1)
		{
			//default: break;

			//case 1:
				TagDB.Savedata = new CgpDiscreteTag("Savedata", 1, TagDB.startNumber + 4, false, true, false, -1);
				//return TagDB.Savedata;
		};

		return TagDB0.classFactory2(tagFieldIdentifier);
	}

	public static Object classFactory2(int tagFieldIdentifier)
	{
		//switch (tagFieldIdentifier - TagDB.startNumber + 1)
		{
			//default: break;

			//case 2:
				TagDB.REG48_PV = new CgpIntTag("REG48_PV", 1, TagDB.startNumber + 0, true, 0, true);
				TagDB.REG48_PV.setMinMaxValues(0, 65535, true);
				//return TagDB.REG48_PV;
			//case 3:
				TagDB.REG48_SV = new CgpIntTag("REG48_SV", 1, TagDB.startNumber + 1, true, 0, true);
				TagDB.REG48_SV.setMinMaxValues(0, 65535, true);
				TagDB.REG48_SV.enableScaling(0, 100, 0, 100);
				//return TagDB.REG48_SV;
			//case 4:
				TagDB.REG48_AL1 = new CgpDiscreteTag("REG48_AL1", 1, TagDB.startNumber + 2, true, false, true);
				//return TagDB.REG48_AL1;
			//case 5:
				TagDB.REG48_AL2 = new CgpDiscreteTag("REG48_AL2", 1, TagDB.startNumber + 3, true, false, true);
				//return TagDB.REG48_AL2;
		};

		new RefTagDB();

		{
				TagDB.REG48_PV.historian = CgpHistorianFactory.createHistorian(100, "REG48_PV", CgpBaseCollection.INTERVAL_UNITS_SECONDS, 1, 0, false, null);
				TagDB.REG48_PV.historian.setStorageType((byte) CgpHdaHistorian.STORAGETYPE_SRAM_WITH_FILE, (byte) CgpHdaHistorian.DATASIZE_IN_DAYS, 7, 10);
				TagDB.REG48_SV.historian = CgpHistorianFactory.createHistorian(100, "REG48_SV", CgpBaseCollection.INTERVAL_UNITS_SECONDS, 1, 0, false, null);
				TagDB.REG48_SV.historian.setStorageType((byte) CgpHdaHistorian.STORAGETYPE_SRAM_WITH_FILE, (byte) CgpHdaHistorian.DATASIZE_IN_DAYS, 7, 10);
		}

		return null;
	}
}
