diff --git a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs index c5c821cc..b57e822b 100644 --- a/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs +++ b/dotnet/IEC61850forCSharp/IEC61850ServerAPI.cs @@ -1836,6 +1836,14 @@ namespace IEC61850 [return: MarshalAs(UnmanagedType.I1)] static extern bool ControlAction_isSelect(IntPtr self); + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + static extern bool ControlAction_getSynchroCheck(IntPtr self); + + [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + static extern bool ControlAction_getInterlockCheck(IntPtr self); + private IntPtr self; private IedServer.ControlHandlerInfo info; private IedServer iedServer; @@ -1955,6 +1963,16 @@ namespace IEC61850 { return ControlAction_isSelect(self); } + + public bool GetSynchroCheck() + { + return ControlAction_getSynchroCheck(self); + } + + public bool GetInterlockCheck() + { + return ControlAction_getInterlockCheck(self); + } } public delegate void GoCBEventHandler(MmsGooseControlBlock goCB, int cbEvent, object parameter); diff --git a/src/iec61850/inc/iec61850_server.h b/src/iec61850/inc/iec61850_server.h index d206b904..2a9665a1 100644 --- a/src/iec61850/inc/iec61850_server.h +++ b/src/iec61850/inc/iec61850_server.h @@ -1357,6 +1357,26 @@ ControlAction_getOrIdent(ControlAction self, int* orIdentSize); LIB61850_API int ControlAction_getCtlNum(ControlAction self); +/** + * \brief Gets the synchroCheck bit provided by the client + * + * \param self the control action instance + * + * \return the synchroCheck bit + */ +LIB61850_API bool +ControlAction_getSynchroCheck(ControlAction self); + +/** + * \brief Gets the interlockCheck bit provided by the client + * + * \param self the control action instance + * + * \return the interlockCheck bit + */ +LIB61850_API bool +ControlAction_getInterlockCheck(ControlAction self); + /** * \brief Check if the control callback is called by a select or operate command * diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index 05d2d074..bcbb7d22 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -2498,6 +2498,22 @@ ControlAction_getCtlNum(ControlAction self) return -1; } +bool +ControlAction_getSynchroCheck(ControlAction self) +{ + ControlObject* controlObject = (ControlObject*) self; + + return (bool)(controlObject->synchroCheck); +} + +bool +ControlAction_getInterlockCheck(ControlAction self) +{ + ControlObject* controlObject = (ControlObject*) self; + + return (bool)(controlObject->interlockCheck); +} + bool ControlAction_isSelect(ControlAction self) {