//====================================================================== // ISubscription /// <summary> /// Tells the server to send an data change update for all subscription items containing the cached values. /// </summary> public override void Refresh() { lock (this) { if (subscription_ == null) { throw new NotConnectedException(); } string methodName = "IOPCAsyncIO2.Refresh2"; try { int cancelID = 0; IOPCAsyncIO2 subscription = BeginComCall <IOPCAsyncIO2>(methodName, true); subscription.Refresh2(OPCDATASOURCE.OPC_DS_CACHE, ++_counter, out cancelID); } catch (Exception e) { ComCallError(methodName, e); throw Utilities.Interop.CreateException(methodName, e); } finally { EndComCall(methodName); } } }
/// <summary> /// Tells the server to send an data change update for all subscription items containing the cached values. /// </summary> public override void Refresh() { if (subscription_ == null) { throw new NotConnectedException(); } lock (lock_) { string methodName = "IOPCAsyncIO2.Refresh2"; try { int cancelID = 0; IOPCAsyncIO2 subscription = BeginComCall <IOPCAsyncIO2>(methodName, true); subscription.Refresh2(OPCDATASOURCE.OPC_DS_CACHE, ++_counter, out cancelID); if (DCOMCallWatchdog.IsCancelled) { throw new Exception($"{methodName} call was cancelled due to response timeout"); } } catch (Exception e) { ComCallError(methodName, e); throw Utilities.Interop.CreateException(methodName, e); } finally { EndComCall(methodName); } } }
public void Refresh2(OPCDataSource p_SourceMode, int p_TransactionID, out int p_CancelID) { m_IfAsync.Refresh2(p_SourceMode, p_TransactionID, out p_CancelID); }