/// <summary> /// /// </summary> /// <param name="StartImmediate">start working thread immediate</param> /// <param name="Name">Driver Name</param> /// <param name="XAMServerIP">XAMServer IP</param> public XAMUmpClient(bool StartImmediate, string XAMServerIP, XAMUmpClientConfig config) : base(null, XAMUmpClientService.XAMUmpClientName, XAMServerIP, StartImmediate, true, XAMCommon.XAMControlDB.UserLogMode.All, XAMVarListMode.IOVariablesFromDB) { Config = config; try { dispatcher = new XAMIO.Ulux.Ump.XAMUmpDispatcher(base.Trace); } catch { } }
/// <summary> /// /// </summary> /// <param name="p">process info</param> public XAMUmpClientCom(XAMCommon.ServiceReference.XAMIOProcessInfo p, XAMUmpClientConfig config, string conId, XAMUmpDispatcher dispatcher) : base(null, p, conId, config.XAMServerIP, IOStandbyMode.Mode.Read) { string[] split = conId.Split(':'); string destination = split[0]; int projectID = System.Convert.ToInt16(split[1]); int firmwareVersion = System.Convert.ToInt16(split[2]); int switchID = System.Convert.ToInt16(split[3]); int designID = System.Convert.ToInt16(split[4]); this.Config = config; client = new XAMUmpStream(dispatcher, destination, projectID, firmwareVersion, switchID, designID, Trace); client.ValueEvent += client_ValueEvent; }