IP-Symcon Module Library
v1.0
|
00001 <? 00029 include_once "IPSInstaller.ips.php"; 00030 include_once "IPSEDIP_Constants.ips.php"; 00031 include_once "IPSEDIP_Configuration.ips.php"; 00032 00033 $IPS_INSTALL_PROGRAM_PATH = 'Program'; 00034 $IPS_INSTALL_HARDWARE_PATH = 'Hardware'; 00035 00040 $ProgramPath = $IPS_INSTALL_PROGRAM_PATH.".IPSEDIP"; 00041 00046 $HardwarePath = $IPS_INSTALL_HARDWARE_PATH.".IPSEDIP"; 00047 00048 /* ---------------------------------------------------------------------- */ 00049 /* Ab hier NICHTS mehr ändern - außer man weiß was man tut ... */ 00050 /* ---------------------------------------------------------------------- */ 00051 00052 $HardwareCategoryId = CreateCategoryPath($HardwarePath, 90); 00053 $ProgramCategoryId = CreateCategoryPath($ProgramPath, 90); 00054 $CategoryIdScripts = CreateCategory('Scripts', $ProgramCategoryId, 0); 00055 00056 $id_ScriptMain = CreateScript('IPSEDIP', 'IPSEDIP.class.php', $CategoryIdScripts, 10); 00057 $id_ScriptConstants = CreateScript('IPSEDIP_Constants', 'IPSEDIP_Constants.ips.php', $CategoryIdScripts, 30); 00058 $id_ScriptConfiguration = CreateScript('IPSEDIP_Configuration', 'IPSEDIP_Configuration.ips.php', $CategoryIdScripts, 40); 00059 $id_ScriptReceive = CreateScript('IPSEDIP_Receive', 'IPSEDIP_Receive.ips.php', $CategoryIdScripts, 50); 00060 $id_ScriptEvent = CreateScript('IPSEDIP_Event', 'IPSEDIP_Event.ips.php', $CategoryIdScripts, 60); 00061 $id_ScriptTimer = CreateScript('IPSEDIP_Timer', 'IPSEDIP_Timer.ips.php', $CategoryIdScripts, 70); 00062 $id_ScriptInstallation = CreateScript('IPSEDIP_Installation', 'IPSEDIP_Installation.ips.php', $CategoryIdScripts,100); 00063 00064 foreach ($EDIP_CONFIGURATION as $configItem=>$configData) { 00065 if ($configData[EDIP_CONFIG_REGISTER]<>"" and $configData[EDIP_CONFIG_ROOT]<>"") { 00066 $id_Instance = CreateDummyInstance($configItem, $ProgramCategoryId, 10); 00067 $id_Register = CreateVariable(EDIP_VAR_REGISTER, 1 /*Integer*/, $id_Instance, 10, '', null, 0); 00068 $id_Root = CreateVariable(EDIP_VAR_ROOT, 1 /*Integer*/, $id_Instance, 20, '', null, 0); 00069 $id_Current = CreateVariable(EDIP_VAR_CURRENT, 1 /*Integer*/, $id_Instance, 40, '', null, 0); 00070 $id_Categories = CreateVariable(EDIP_VAR_OBJECTIDS, 3 /*String*/, $id_Instance, 50, '', null, ''); 00071 $id_Variables = CreateVariable(EDIP_VAR_OBJECTCMDS, 3 /*String*/, $id_Instance, 60, '', null, ''); 00072 $id_Variables = CreateVariable(EDIP_VAR_OBJECTVALUES, 3 /*String*/, $id_Instance, 60, '', null, ''); 00073 $id_value = CreateVariable(EDIP_VAR_OBJECTEDIT, 1 /*Integer*/, $id_Instance, 70, '', null, 0); 00074 00075 SetValue($id_Register, $configData[EDIP_CONFIG_REGISTER]); 00076 SetValue($id_Root, $configData[EDIP_CONFIG_ROOT]); 00077 SetValue($id_Current, $configData[EDIP_CONFIG_ROOT]); 00078 SetValue($id_value, 0); 00079 } else { 00080 echo "Register/Root Ids NOT assigned... \n"; 00081 } 00082 } 00083 00084 CreateTimer_CyclicBySeconds ('Timer', $id_ScriptTimer, EDIP_CONFIG_REFRESHTIMER); 00085 00086 SetVariableConstant ("EDIP_ID_PROGRAM", $ProgramCategoryId, 'IPSEDIP_Constants.ips.php'); 00087 SetVariableConstant ("EDIP_ID_EVENTSCRIPT",$id_ScriptEvent, 'IPSEDIP_Constants.ips.php'); 00088 00089 //$id_IOComPort = CreateSerialPort('EDIPVorzimmer_ComPort', 'COM11', 115200, 1, 8, 'None',0, $IgnoreIOPortInstanceError); 00090 //$id_Register = CreateRegisterVariable('EDIPVorzimmer_Register', $HardwareCategoryId, $id_ScriptReceive, $id_IOComPort); 00091 00092 00094 ?>