public TcAdsSyncPort(AmsAddress addr, TcLocalSystem localSystem, INotificationReceiver iNoteReceiver, bool clientCycle, bool synchronize) { object[] args = new object[] { this._id, addr }; using (new MethodTrace("Id: {0:d}, Address = {1}", args)) { this._localSystem = localSystem; this._iNoteReceiver = iNoteReceiver; if (!base.IsLocalNetId(addr.netId, localSystem.NetId)) { base.address = addr.Clone(); } else { base.address = new AmsAddress(localSystem.NetId, addr.port); this._bLocal = true; } this._bSynchronize = synchronize; this._bClientCycle = clientCycle; this._adsStateHandle = 0; this._symbolVersionHandle = 0; this._symbolTable = new SymbolTable(this); if (synchronize) { this._routerSyncWindow = new SyncWindow(this); } } }
public static TcLocalSystem GetInstance(TransportProtocol protocol) { object obj2 = s_instLock; lock (obj2) { if (s_instance == null) { s_instance = new TcLocalSystem(protocol); } s_instance.AddRef(); return(s_instance); } }
protected override void Dispose(bool disposing) { if (!base._disposed) { object[] args = new object[] { this.GetHashCode() }; Module.Trace.TraceInformation("ID: {0::d}", args); if (disposing && (this._routerNotificationTimer != null)) { this._routerNotificationTimer.Dispose(); } this.AmsUnRegisterRouterNotification(false); this.AdsPortClose(false); s_instance = null; base.Dispose(disposing); } base._disposed = true; }
public TcAdsSyncPortRouter(AmsAddress addr, TcLocalSystem localSystem, INotificationReceiver iNoteReceiver, bool clientCycle, bool synchronize) : base(addr, localSystem, iNoteReceiver, clientCycle, synchronize) { Module.Trace.TraceVerbose($"ID: ({base.Id:d})"); }