->SetEditSettingGroupConfirmationHandler

v1.6
Maxson Ramon dos Anjos Medeiros 1 month ago
parent f3f1ef5cc4
commit ba9c255aa0

@ -2943,6 +2943,36 @@ namespace IEC61850
return false;
}
public delegate void InternalEditSettingGroupConfirmationHandler(object parameter, SettingGroupControlBlock sgcb, uint editSg);
private InternalEditSettingGroupConfirmationHandler internalEditSettingGroupConfirmationHandler = null;
private object editSettingGroupConfirmationHandlerParameter = null;
private EditSettingGroupConfirmationHandler editSettingGroupConfirmationHandler = null;
public void SetEditSettingGroupConfirmationHandler(InternalEditSettingGroupConfirmationHandler handler, SettingGroupControlBlock settingGroupControlBlock, object parameter)
{
internalEditSettingGroupConfirmationHandler = handler;
editSettingGroupConfirmationHandlerParameter = parameter;
if (editSettingGroupConfirmationHandler == null)
{
editSettingGroupConfirmationHandler = new EditSettingGroupConfirmationHandler(InternalEditSettingGroupConfirmationImplementation);
IedServer_setEditSettingGroupConfirmationHandler(self, settingGroupControlBlock.self, editSettingGroupConfirmationHandler, IntPtr.Zero);
}
}
private void InternalEditSettingGroupConfirmationImplementation(IntPtr parameter, IntPtr sgcb, uint editSg)
{
if (sgcb != IntPtr.Zero)
{
internalEditSettingGroupConfirmationHandler(editSettingGroupChangedHandlerParameter, new SettingGroupControlBlock(sgcb), editSg);
}
}
//------------
//public delegate bool InternalSVCBEventHandler(SampledValuesControlBlock sampledValuesControlBlock, SMVEvent sMVEvent, object parameter);

@ -251,8 +251,14 @@ namespace server_access_control
return true;
}
void editSGConfirmationHandler(object parameter, SettingGroupControlBlock sgcb, uint editSg)
{
Console.WriteLine("Received edit sg confirm for sg " + editSg + "\n");
}
iedServer.SetActiveSettingGroupChangedHandler(activeSGChangedHandler, settingGroupControlBlock, null);
iedServer.SetEditSettingGroupChangedHandler(editSGChangedHandler, settingGroupControlBlock, null);
iedServer.SetEditSettingGroupConfirmationHandler(editSGConfirmationHandler, settingGroupControlBlock, null);
iedServer.Start(102);

Loading…
Cancel
Save