protected void Acsunsolicited(AcsUnsolicitedEvent data, eventTypeACS eventType) { AnalizeFailurs(data.failureEvent.error); if (OnUniversalFailureEvent != null) { OnUniversalFailureSysEvent?.Invoke(this, new UniversalFailureSys { Error = data.failureEvent.error, EventType = eventType }); } }
protected void Acsconfirmation(ACSConfirmationEvent data, eventTypeACS eventType) { switch (eventType) { case eventTypeACS.ACS_ABORT_STREAM: AlertClose(); break; case eventTypeACS.ACS_CLOSE_STREAM_CONF: AlertClose(); break; case eventTypeACS.ACS_OPEN_STREAM_CONF: OnConnnectedEvent?.Invoke(this, null); CbTaskNew.Set(data.invokeID, new NullTsapiReturn()); StatusConnection = StatusConection.Open; _waitClient.Set(); break; case eventTypeACS.ACS_UNIVERSAL_FAILURE_CONF: if (OnUniversalFailureEvent != null) { OnUniversalFailureSysEvent?.Invoke(this, new UniversalFailureSys { Error = data.failureEvent.error, EventType = eventType }); } CbTaskNew.Clear(); AnalizeFailurs(data.failureEvent.error); break; default: Log.Error($"{LinkName} : Error ACSCONFIRMATION ", new ProgrammingExeption($"Не обработан event '{eventType}' в ACSCONFIRMATION")); throw new ProgrammingExeption($"Не обработан event '{eventType}' в ACSCONFIRMATION"); } }