(C#) How to determine active/passive manager

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

(C#) How to determine active/passive manager

Post by fmulder »

I'm writing a C# manager that runs in a redundant application.
My manager needs to know its active/passive status.

I added some events but unfortunately... these only seem to get triggered when I switch redu (by choosing 'force active' in the System Overview)

Code: Select all

            // we want an event when our manager switches to active / passive
            myManager.RuntimeSystem.RedundancyActive += MyManager_RedundancyActive;
            myManager.RuntimeSystem.RedundancyPassive += MyManager_RedundancyPassive;
            
But how do I get the initial active/passive state ?

Does anyone know the C# answer ?

Share the fun
Frenk Mulder

kilianvp
Posts:443
Joined: Fri Jan 16, 2015 10:29 am

Re: (C#) How to determine active/passive manager

Post by kilianvp »

yes if you use ETM.WCCOA.Internal

Code: Select all

if (ETM.WCCOA.Internal.Resources.IsRedActive())
{
    // active
}
else
{
    // passive
}
The namespace “ETM.WCCOA.Internal” is provided for backward compatibility with older WinCC OA C# applications and shall not be used anymore. Please only use the functionalities provided by the “ETM.WCCOA” namespace.

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: (C#) How to determine active/passive manager

Post by fmulder »

Does anyone know the proper code for a 3.18 C# application
( Since the 'ETM.WCCOA.Internal.Resources.IsRedActive()' should not be used )

I can't find 'isRedActive' or anything that looks like it in the C# API ?

any help is appreciated

kilianvp
Posts:443
Joined: Fri Jan 16, 2015 10:29 am

Re: (C#) How to determine active/passive manager

Post by kilianvp »

In the C# API are many functions missing. Unfortunately there is no official way!

4 posts • Page 1 of 1