|
|
@ -414,6 +414,12 @@ namespace IEC61850
|
|
|
|
IedConnection_getServerDirectoryAsync(IntPtr self, out int error, string continueAfter, IntPtr result,
|
|
|
|
IedConnection_getServerDirectoryAsync(IntPtr self, out int error, string continueAfter, IntPtr result,
|
|
|
|
IedConnection_GetNameListHandler handler, IntPtr parameter);
|
|
|
|
IedConnection_GetNameListHandler handler, IntPtr parameter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[DllImport("iec61850", CallingConvention = CallingConvention.Cdecl)]
|
|
|
|
|
|
|
|
static extern UInt32
|
|
|
|
|
|
|
|
IedConnection_getLogicalDeviceVariablesAsync(IntPtr self, out int error, string ldName, string continueAfter, IntPtr result,
|
|
|
|
|
|
|
|
IedConnection_GetNameListHandler handler, IntPtr parameter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********************
|
|
|
|
/********************
|
|
|
|
* FileDirectoryEntry
|
|
|
|
* FileDirectoryEntry
|
|
|
|
*********************/
|
|
|
|
*********************/
|
|
|
@ -522,7 +528,8 @@ namespace IEC61850
|
|
|
|
/// Gets or sets the timeout used for connection attempts.
|
|
|
|
/// Gets or sets the timeout used for connection attempts.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The connect timeout in milliseconds</value>
|
|
|
|
/// <value>The connect timeout in milliseconds</value>
|
|
|
|
public UInt32 ConnectTimeout {
|
|
|
|
public UInt32 ConnectTimeout
|
|
|
|
|
|
|
|
{
|
|
|
|
get {
|
|
|
|
get {
|
|
|
|
return connectTimeout;
|
|
|
|
return connectTimeout;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -531,6 +538,20 @@ namespace IEC61850
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// Gets or sets the maximum size if a PDU (has to be set before calling connect!).
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <value>The maximum allowed size of an MMS PDU.</value>
|
|
|
|
|
|
|
|
public int MaxPduSize
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get {
|
|
|
|
|
|
|
|
return GetMmsConnection().GetLocalDetail();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
set {
|
|
|
|
|
|
|
|
GetMmsConnection().SetLocalDetail(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MmsConnection GetMmsConnection ()
|
|
|
|
public MmsConnection GetMmsConnection ()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1645,6 +1666,30 @@ namespace IEC61850
|
|
|
|
throw new IedConnectionException("Get server directory failed", error);
|
|
|
|
throw new IedConnectionException("Get server directory failed", error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return invokeId;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UInt32 GetLogicalDeviceVariablesAsync(string ldName, string continueAfter, GetNameListHandler handler, object parameter)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return GetLogicalDeviceVariablesAsync(null, ldName, continueAfter, handler, parameter);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UInt32 GetLogicalDeviceVariablesAsync(List<string> result, string ldName, string continueAfter, GetNameListHandler handler, object parameter)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int error;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tuple<GetNameListHandler, object, List<string>> callbackInfo = Tuple.Create(handler, parameter, result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GCHandle handle = GCHandle.Alloc(callbackInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UInt32 invokeId = IedConnection_getLogicalDeviceVariablesAsync(connection, out error, ldName, continueAfter, IntPtr.Zero, nativeGetNameListHandler, GCHandle.ToIntPtr(handle));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (error != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
handle.Free();
|
|
|
|
|
|
|
|
throw new IedConnectionException("Get logical device variables failed", error);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return invokeId;
|
|
|
|
return invokeId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|