- .NET API: added ControlAction.SetError method

pull/244/head
Michael Zillgith 5 years ago
parent f800160162
commit da8f9fe9cf

@ -649,6 +649,21 @@ namespace IEC61850
NONE = -1
}
/// <summary>
/// Definition for LastAppError error type for control models
/// Used in LastApplError and CommandTermination messages.
/// </summary>
public enum ControlLastApplError {
NO_ERROR = 0,
UNKNOWN = 1,
TIMEOUT_TEST = 2,
OPERATOR_TEST = 3
}
/// <summary>
/// AddCause - additional cause information for control model errors
/// Used in LastApplError and CommandTermination messages.
/// </summary>
public enum ControlAddCause {
ADD_CAUSE_UNKNOWN = 0,
ADD_CAUSE_NOT_SUPPORTED = 1,

@ -875,6 +875,9 @@ namespace IEC61850
[DllImport ("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern void ControlAction_setAddCause (IntPtr self, int addCause);
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern void ControlAction_setError(IntPtr self, int error);
[DllImport ("iec61850", CallingConvention = CallingConvention.Cdecl)]
static extern int ControlAction_getOrCat (IntPtr self);
@ -905,6 +908,15 @@ namespace IEC61850
this.iedServer = iedServer;
}
/// <summary>
/// Sets the error code for the next command termination or application error message.
/// </summary>
/// <param name="error">the errror code to use</param>
public void SetError(ControlLastApplError error)
{
ControlAction_setError(self, (int)error);
}
/// <summary>
/// Sets the add cause for the next command termination or application error message
/// </summary>

Loading…
Cancel
Save