Exemplo n.º 1
0
        /// <summary>
        /// Check if there is ANY free space in controller; at this point we do not know if delta will contain 1 or 10 measurements
        /// so we only check if is it possible to add minimal memory occupying element
        /// </summary>
        public void Enlist()
        {
            Console.WriteLine("\nTransaction started -> \nPozvan je Enlist na SCADA");

            ITransactionCallback callback = OperationContext.Current.GetCallbackChannel <ITransactionCallback>();

            bool isSuccessfull = false;

            // at this point, we will only check if there is a free space for any DIGITALS or any ANALOGS
            var availableRtus = dbContext.GettAllRTUs().Values.Where(r => r.FreeSpaceForDigitals == true ||
                                                                     r.FreeSpaceForAnalogs == true).ToList();

            if (availableRtus.Count != 0)
            {
                isSuccessfull = false;
            }

            try
            {
                callback.CallbackEnlist(isSuccessfull);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                callback.CallbackEnlist(false);
            }
        }
Exemplo n.º 2
0
        public void Enlist()
        {
            ITransactionCallback callback = OperationContext.Current.GetCallbackChannel <ITransactionCallback>();

            Console.WriteLine("Pozvan je enlist na NMS-u");
            try
            {
                gda.GetCopyOfNetworkModel();
                callback.CallbackEnlist(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                callback.CallbackEnlist(false);
            }
        }
        public void Enlist()
        {
            Console.WriteLine("Pozvan je enlist na CommunicationEngine-u");

            ITransactionCallback callback = OperationContext.Current.GetCallbackChannel <ITransactionCallback>();

            callback.CallbackEnlist();
        }
Exemplo n.º 4
0
        public void Enlist()
        {
            Console.WriteLine("Pozvan je enlist na DMS-u");
            oldTree = DMSService.Instance.Tree;
            ITransactionCallback callback = OperationContext.Current.GetCallbackChannel <ITransactionCallback>();

            callback.CallbackEnlist(true);
        }