- added functions ControlObjectClient_setInterlockCheck and ControlObjectClient_setSynchroCheck to replace the functions ControlObjectClient_enableInterlockCheck and ControlObjectClient_enableSynchroCheck

pull/6/head
Michael Zillgith 9 years ago
parent c2d45a3f66
commit 8f45ac88c6

@ -137,11 +137,11 @@ namespace IEC61850
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
private static extern void ControlObjectClient_setOrigin(IntPtr self, string orIdent, int orCat); private static extern void ControlObjectClient_setOrigin(IntPtr self, string orIdent, int orCat);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
private static extern void ControlObjectClient_enableInterlockCheck(IntPtr self); private static extern void ControlObjectClient_setInterlockCheck(IntPtr self, bool value);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)] [DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
private static extern void ControlObjectClient_enableSynchroCheck(IntPtr self); private static extern void ControlObjectClient_setSynchroCheck(IntPtr self, bool value);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void InternalCommandTerminationHandler(IntPtr parameter,IntPtr controlClient); private delegate void InternalCommandTerminationHandler(IntPtr parameter,IntPtr controlClient);
@ -373,19 +373,37 @@ namespace IEC61850
/// <summary> /// <summary>
/// Enables the synchro check for operate commands /// Enables the synchro check for operate commands
/// </summary> /// </summary>
[Obsolete("use SetSynchroCheck instead")]
public void EnableSynchroCheck () public void EnableSynchroCheck ()
{ {
ControlObjectClient_enableSynchroCheck(controlObject); ControlObjectClient_setSynchroCheck (controlObject, true);
} }
/// <summary> /// <summary>
/// Enables the interlock check for operate and select commands /// Enables the interlock check for operate and select commands
/// </summary> /// </summary>
public void EnableInterlockCheck () [Obsolete("use SetInterlockCheck instead")]
public void EnableInterlockCheck ()
{ {
ControlObjectClient_enableInterlockCheck(controlObject); ControlObjectClient_setInterlockCheck (controlObject, true);
} }
/// <summary>
/// Sets the value of the interlock check flag for operate and select commands
/// </summary>
public void SetInterlockCheck (bool value)
{
ControlObjectClient_setInterlockCheck (controlObject, value);
}
/// <summary>
/// Sets the value of the synchro check flag for operate command
/// </summary>
public void SetSynchroCheck (bool value)
{
ControlObjectClient_setSynchroCheck (controlObject, value);
}
/// <summary> /// <summary>
/// Gets the last received LastApplError (Additional Cause Diagnostics) value. /// Gets the last received LastApplError (Additional Cause Diagnostics) value.
/// </summary> /// </summary>

@ -24,7 +24,7 @@ namespace example3
{ {
IsoConnectionParameters parameters = con.GetConnectionParameters(); IsoConnectionParameters parameters = con.GetConnectionParameters();
parameters.SetRemoteAddresses(1,1, new byte[] {0x00, 0x01, 0x02, 0x03}); parameters.SetRemoteAddresses(1, new byte[] {0x00, 0x01}, new byte[] {0x00, 0x01, 0x02, 0x03});
con.ConnectTimeout = 10000; con.ConnectTimeout = 10000;

@ -848,12 +848,25 @@ ControlObjectClient_enableInterlockCheck(ControlObjectClient self)
self->interlockCheck = true; self->interlockCheck = true;
} }
void
ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value)
{
self->interlockCheck = value;
}
void void
ControlObjectClient_enableSynchroCheck(ControlObjectClient self) ControlObjectClient_enableSynchroCheck(ControlObjectClient self)
{ {
self->synchroCheck = true; self->synchroCheck = true;
} }
void
ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value)
{
self->synchroCheck = value;
}
void void
ControlObjectClient_setLastApplError(ControlObjectClient self, LastApplError lastApplError) ControlObjectClient_setLastApplError(ControlObjectClient self, LastApplError lastApplError)
{ {

@ -1510,12 +1510,36 @@ ControlObjectClient_setOrigin(ControlObjectClient self, const char* orIdent, int
void void
ControlObjectClient_useConstantT(ControlObjectClient self, bool useConstantT); ControlObjectClient_useConstantT(ControlObjectClient self, bool useConstantT);
/**
* \deprecated use ControlObjectClient_setInterlockCheck instead
*/
void void
ControlObjectClient_enableInterlockCheck(ControlObjectClient self); ControlObjectClient_enableInterlockCheck(ControlObjectClient self);
/**
* \deprecated use ControlObjectClient_setSynchroCheck instead
*/
void void
ControlObjectClient_enableSynchroCheck(ControlObjectClient self); ControlObjectClient_enableSynchroCheck(ControlObjectClient self);
/**
* \brief Set the value of the interlock check flag when a control command is sent
*
* \param self the ControlObjectClient instance
* \param value if true the server will perform a interlock check if supported
*/
void
ControlObjectClient_setInterlockCheck(ControlObjectClient self, bool value);
/**
* \brief Set the value of the synchro check flag when a control command is sent
*
* \param self the ControlObjectClient instance
* \param value if true the server will perform a synchro check if supported
*/
void
ControlObjectClient_setSynchroCheck(ControlObjectClient self, bool value);
/** /**
* \brief Private a callback handler that is invoked when a command termination message is received. * \brief Private a callback handler that is invoked when a command termination message is received.

@ -523,4 +523,6 @@ EXPORTS
MmsValue_getUtcTimeQuality MmsValue_getUtcTimeQuality
MmsConnection_getMmsConnectionParameters MmsConnection_getMmsConnectionParameters
IedServer_updateVisibleStringAttributeValue IedServer_updateVisibleStringAttributeValue
ControlObjectClient_setInterlockCheck
ControlObjectClient_setSynchroCheck

@ -600,4 +600,5 @@ EXPORTS
MmsValue_getUtcTimeQuality MmsValue_getUtcTimeQuality
MmsConnection_getMmsConnectionParameters MmsConnection_getMmsConnectionParameters
IedServer_updateVisibleStringAttributeValue IedServer_updateVisibleStringAttributeValue
ControlObjectClient_setInterlockCheck
ControlObjectClient_setSynchroCheck

Loading…
Cancel
Save