public int AddNotification(IPLCNotify notify, string varName, string text, AdsTransMode transMode, int cycleTime, int maxDelay) { if (m_hConnect.ContainsKey(varName) == true) { return(m_hConnect[varName]); } object userData = varName; int handle = m_adsClient.AddDeviceNotification(varName, m_dataStream, transMode, cycleTime, maxDelay, text); m_notify.Add(text, notify); m_hConnect.Add(varName, handle); return(handle); }
public AdsNotificationSettings(AdsTransMode mode, int cycleTime, int maxDelay) : base(mode, cycleTime, maxDelay) { }
private void OnModeChanged(AdsTransMode value) { this._mode = value; }
public NotificationSettings(AdsTransMode mode, int cycleTime, int maxDelay) { this._mode = mode; this._cycleTime = cycleTime; this._maxDelay = maxDelay; }
public AdsErrorCode AdsAddDeviceNotificationReq(AmsAddress rAddr, uint invokeId, uint indexGroup, uint indexOffset, uint cbLength, AdsTransMode transMode, uint maxDelay, uint cycleTime) { TcAdsAddDeviceNotificationReqHeader adsHeader = new TcAdsAddDeviceNotificationReqHeader { _indexGroup = indexGroup, _indexOffset = indexOffset, _cbLength = cbLength, _transMode = transMode, _maxDelay = maxDelay, _cycleTime = cycleTime }; return(this.AdsRequest(rAddr, invokeId, 6, 0, adsHeader, null)); }
public virtual void AdsAddDeviceNotificationInd(AmsAddress rAddr, uint invokeId, uint indexGroup, uint indexOffset, uint cbLength, AdsTransMode transMode, uint maxDelay, uint cycleTime) { this.AdsAddDeviceNotificationRes(rAddr, invokeId, AdsErrorCode.DeviceServiceNotSupported, 0); }