示例#1
0
 private string sconnConfigToStringVal(sconnConfigMapper map, ipcDeviceConfig config)
 {
     try
     {
         if (map.ConfigType == ipcDefines.mAdrInput)
         {
             return(config.memCFG[ConfigAddrForMapperInfo(map)].ToString());
         }
         else if (map.ConfigType == ipcDefines.mAdrOutput)
         {
             return(config.memCFG[ConfigAddrForMapperInfo(map)].ToString());
         }
         else if (map.ConfigType == ipcDefines.mAdrRelay)
         {
             return(config.memCFG[ConfigAddrForMapperInfo(map)].ToString());
         }
         else
         {
             return(config.memCFG[map.ConfigType].ToString());    //direct value
         }
     }
     catch (Exception e)
     {
         nlogger.ErrorException(e.Message, e);
         return("");
     }
 }
示例#2
0
 public sconnDevice(ipcDeviceConfig cfg)
 {
     this.Inputs        = cfg.Inputs;
     this.Outputs       = cfg.Outputs;
     this.Relays        = cfg.Relays;
     this.NetworkConfig = cfg.NetworkConfig;
     this._ScheduleCFG  = cfg.ScheduleCFG;
     this._NamesCFG     = cfg.NamesCFG;
     this.memCFG        = cfg.memCFG;
     LoadDeviceNames();
 }
示例#3
0
 private void SetConfigForActionParameterAtDevice(ActionParameter param, ipcDeviceConfig config)
 {
     LoadStringValueToByteMemoryAtAddr(param.Value, config.memCFG, ConfigAddrForMapperInfo(param.sconnMappers.First()));
 }