示例#1
0
 public ipcSiteConfig(int devices) : this()
 {
     _deviceNo     = devices;
     deviceConfigs = new ipcDeviceConfig[deviceNo];
     for (int i = 0; i < deviceNo; i++)
     {
         deviceConfigs[i] = new  ipcDeviceConfig();
     }
 }
示例#2
0
 public void addDeviceCfg()
 {
     _deviceNo++;
     ipcDeviceConfig[] nDeviceConfigs = new  ipcDeviceConfig[deviceNo];
     if (deviceConfigs.GetLength(0) != 0) //copy only if config is not empty
     {
         for (int i = 0; i < deviceNo - 1; i++)
         {
             nDeviceConfigs[i] = deviceConfigs[i];
         }
     }
     nDeviceConfigs[deviceNo - 1] = new  ipcDeviceConfig();
     deviceConfigs = nDeviceConfigs;
     globalConfig.memCFG[ipcDefines.mAdrDevNO] = (byte)deviceNo;
 }