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(""); } }
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(); }
private void SetConfigForActionParameterAtDevice(ActionParameter param, ipcDeviceConfig config) { LoadStringValueToByteMemoryAtAddr(param.Value, config.memCFG, ConfigAddrForMapperInfo(param.sconnMappers.First())); }