Clean
This commit is contained in:
@@ -40,11 +40,11 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
Array.Reverse(data, pos, 4);
|
Array.Reverse(data, pos, 4);
|
||||||
byte temp;
|
byte temp;
|
||||||
temp = data[pos]; data[pos] = data[pos+2]; data[pos+2] = temp;
|
temp = data[pos]; data[pos] = data[pos + 2]; data[pos + 2] = temp;
|
||||||
temp = data[pos+1]; data[pos+1] = data[pos+3]; data[pos+3] = temp;
|
temp = data[pos + 1]; data[pos + 1] = data[pos + 3]; data[pos + 3] = temp;
|
||||||
var t = BitConverter.ToSingle(data, pos);
|
var t = BitConverter.ToSingle(data, pos);
|
||||||
temp = data[pos]; data[pos] = data[pos+2]; data[pos+2] = temp;
|
temp = data[pos]; data[pos] = data[pos + 2]; data[pos + 2] = temp;
|
||||||
temp = data[pos+1]; data[pos+1] = data[pos+3]; data[pos+3] = temp;
|
temp = data[pos + 1]; data[pos + 1] = data[pos + 3]; data[pos + 3] = temp;
|
||||||
Array.Reverse(data, pos, 4);
|
Array.Reverse(data, pos, 4);
|
||||||
pos += 4;
|
pos += 4;
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Modbus.Net.Modbus
|
|||||||
/// <param name="masterAddress">主站号</param>
|
/// <param name="masterAddress">主站号</param>
|
||||||
/// <param name="endian">端格式</param>
|
/// <param name="endian">端格式</param>
|
||||||
public ModbusMachine(TKey id, ModbusType connectionType, string connectionString,
|
public ModbusMachine(TKey id, ModbusType connectionType, string connectionString,
|
||||||
IEnumerable<AddressUnit<TUnitKey, int ,int>> getAddresses, bool keepConnect, byte slaveAddress, byte masterAddress,
|
IEnumerable<AddressUnit<TUnitKey, int, int>> getAddresses, bool keepConnect, byte slaveAddress, byte masterAddress,
|
||||||
Endian endian)
|
Endian endian)
|
||||||
: base(id, getAddresses, keepConnect, slaveAddress, masterAddress)
|
: base(id, getAddresses, keepConnect, slaveAddress, masterAddress)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ namespace Modbus.Net
|
|||||||
else if (length == 0) return null;
|
else if (length == 0) return null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
duplicatedMessages = new List<(byte[],bool)>();
|
duplicatedMessages = new List<(byte[], bool)>();
|
||||||
var skipLength = 0;
|
var skipLength = 0;
|
||||||
while (receiveMessageCopy.Length >= length)
|
while (receiveMessageCopy.Length >= length)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Modbus.Net
|
namespace Modbus.Net
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Modbus.Net
|
namespace Modbus.Net
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
namespace Modbus.Net
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Modbus.Net
|
|
||||||
{
|
{
|
||||||
#if NET462
|
#if NET462
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ namespace Modbus.Net
|
|||||||
}
|
}
|
||||||
foreach (var assembly in AssemblyHelper.GetAllLibraryAssemblies())
|
foreach (var assembly in AssemblyHelper.GetAllLibraryAssemblies())
|
||||||
{
|
{
|
||||||
var valueHelper = assembly.GetType("Modbus.Net."+endian.ToString() + "ValueHelper")?.GetProperty("Instance")?.GetValue(null, null) as ValueHelper;
|
var valueHelper = assembly.GetType("Modbus.Net." + endian.ToString() + "ValueHelper")?.GetProperty("Instance")?.GetValue(null, null) as ValueHelper;
|
||||||
if (valueHelper != null)
|
if (valueHelper != null)
|
||||||
{
|
{
|
||||||
EndianInstanceCache[endian.ToString()] = valueHelper;
|
EndianInstanceCache[endian.ToString()] = valueHelper;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using Quartz;
|
using Quartz;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Quartz.Logging;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using Modbus.Net;
|
using Modbus.Net;
|
||||||
using Modbus.Net.Modbus;
|
using Modbus.Net.Modbus;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using AddressUnit = Modbus.Net.AddressUnit<string, int, int>;
|
||||||
using MachineJobSchedulerCreator = Modbus.Net.MachineJobSchedulerCreator<Modbus.Net.IMachineMethodDatas, string, double>;
|
using MachineJobSchedulerCreator = Modbus.Net.MachineJobSchedulerCreator<Modbus.Net.IMachineMethodDatas, string, double>;
|
||||||
using ModbusMachine = Modbus.Net.Modbus.ModbusMachine<string, string>;
|
using ModbusMachine = Modbus.Net.Modbus.ModbusMachine<string, string>;
|
||||||
using AddressUnit = Modbus.Net.AddressUnit<string, int, int>;
|
|
||||||
|
|
||||||
namespace AnyType.Controllers
|
namespace AnyType.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Quartz.Logging;
|
using Quartz.Logging;
|
||||||
using System.Configuration;
|
|
||||||
|
|
||||||
namespace MachineJob
|
namespace MachineJob
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Ae;
|
using Technosoftware.DaAeHdaClient.Ae;
|
||||||
using Technosoftware.OpcRcw.Comn;
|
|
||||||
using Technosoftware.OpcRcw.Ae;
|
using Technosoftware.OpcRcw.Ae;
|
||||||
|
using Technosoftware.OpcRcw.Comn;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#pragma warning disable 0618
|
#pragma warning disable 0618
|
||||||
@@ -189,7 +188,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
((IOPCEventServer)server_).CreateEventSubscription(
|
((IOPCEventServer)server_).CreateEventSubscription(
|
||||||
(state.Active)?1:0,
|
(state.Active) ? 1 : 0,
|
||||||
state.BufferTime,
|
state.BufferTime,
|
||||||
state.MaxSize,
|
state.MaxSize,
|
||||||
++m_handles,
|
++m_handles,
|
||||||
@@ -544,18 +543,18 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
var ppszNodeNames = IntPtr.Zero;
|
var ppszNodeNames = IntPtr.Zero;
|
||||||
var ppCLSIDs = IntPtr.Zero;
|
var ppCLSIDs = IntPtr.Zero;
|
||||||
|
|
||||||
var count = (attributeIDs != null)?attributeIDs.Length:0;
|
var count = (attributeIDs != null) ? attributeIDs.Length : 0;
|
||||||
|
|
||||||
// call server.
|
// call server.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
((IOPCEventServer)server_).TranslateToItemIDs(
|
((IOPCEventServer)server_).TranslateToItemIDs(
|
||||||
(sourceName != null)?sourceName:"",
|
(sourceName != null) ? sourceName : "",
|
||||||
eventCategory,
|
eventCategory,
|
||||||
(conditionName != null)?conditionName:"",
|
(conditionName != null) ? conditionName : "",
|
||||||
(subConditionName != null)?subConditionName:"",
|
(subConditionName != null) ? subConditionName : "",
|
||||||
count,
|
count,
|
||||||
(count > 0)?attributeIDs:new int[0],
|
(count > 0) ? attributeIDs : new int[0],
|
||||||
out ppszAttrItemIDs,
|
out ppszAttrItemIDs,
|
||||||
out ppszNodeNames,
|
out ppszNodeNames,
|
||||||
out ppCLSIDs);
|
out ppCLSIDs);
|
||||||
@@ -616,10 +615,10 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
((IOPCEventServer)server_).GetConditionState(
|
((IOPCEventServer)server_).GetConditionState(
|
||||||
(sourceName != null)?sourceName:"",
|
(sourceName != null) ? sourceName : "",
|
||||||
(conditionName != null)?conditionName:"",
|
(conditionName != null) ? conditionName : "",
|
||||||
(attributeIDs != null)?attributeIDs.Length:0,
|
(attributeIDs != null) ? attributeIDs.Length : 0,
|
||||||
(attributeIDs != null)?attributeIDs:new int[0],
|
(attributeIDs != null) ? attributeIDs : new int[0],
|
||||||
out ppConditionState);
|
out ppConditionState);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -1125,7 +1124,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
var pftActiveTime = new OpcRcw.Ae.FILETIME[count];
|
var pftActiveTime = new OpcRcw.Ae.FILETIME[count];
|
||||||
var pdwCookie = new int[count];
|
var pdwCookie = new int[count];
|
||||||
|
|
||||||
for (var ii = 0; ii < count; ii ++)
|
for (var ii = 0; ii < count; ii++)
|
||||||
{
|
{
|
||||||
pszSource[ii] = conditions[ii].SourceName;
|
pszSource[ii] = conditions[ii].SourceName;
|
||||||
pszConditionName[ii] = conditions[ii].ConditionName;
|
pszConditionName[ii] = conditions[ii].ConditionName;
|
||||||
@@ -1333,7 +1332,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
// verify object.
|
// verify object.
|
||||||
if (unknown == null)
|
if (unknown == null)
|
||||||
{
|
{
|
||||||
throw new OpcResultException(new OpcResult( (int)OpcResult.E_FAIL.Code, OpcResult.FuncCallType.SysFuncCall, null ),"The response from the server was invalid or incomplete");
|
throw new OpcResultException(new OpcResult((int)OpcResult.E_FAIL.Code, OpcResult.FuncCallType.SysFuncCall, null), "The response from the server was invalid or incomplete");
|
||||||
}
|
}
|
||||||
|
|
||||||
// save object.
|
// save object.
|
||||||
@@ -1345,7 +1344,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void ChangeBrowsePosition(string areaID)
|
private void ChangeBrowsePosition(string areaID)
|
||||||
{
|
{
|
||||||
var targetID = (areaID != null)?areaID:"";
|
var targetID = (areaID != null) ? areaID : "";
|
||||||
|
|
||||||
// invoke COM method.
|
// invoke COM method.
|
||||||
try
|
try
|
||||||
@@ -1374,7 +1373,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
{
|
{
|
||||||
((IOPCEventAreaBrowser)m_browser).BrowseOPCAreas(
|
((IOPCEventAreaBrowser)m_browser).BrowseOPCAreas(
|
||||||
dwBrowseFilterType,
|
dwBrowseFilterType,
|
||||||
(browseFilter != null)?browseFilter:"",
|
(browseFilter != null) ? browseFilter : "",
|
||||||
out enumerator);
|
out enumerator);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -1385,7 +1384,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
// verify object.
|
// verify object.
|
||||||
if (enumerator == null)
|
if (enumerator == null)
|
||||||
{
|
{
|
||||||
throw new OpcResultException(new OpcResult( (int)OpcResult.E_FAIL.Code, OpcResult.FuncCallType.SysFuncCall, null ),"The response from the server was invalid or incomplete");
|
throw new OpcResultException(new OpcResult((int)OpcResult.E_FAIL.Code, OpcResult.FuncCallType.SysFuncCall, null), "The response from the server was invalid or incomplete");
|
||||||
}
|
}
|
||||||
|
|
||||||
// return result.
|
// return result.
|
||||||
@@ -1438,7 +1437,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
var buffer = new string[1];
|
var buffer = new string[1];
|
||||||
|
|
||||||
// re-calculate buffer length.
|
// re-calculate buffer length.
|
||||||
var bufferLength = (maxElements > 0 && maxElements-elements.Count < buffer.Length)?maxElements-elements.Count:buffer.Length;
|
var bufferLength = (maxElements > 0 && maxElements - elements.Count < buffer.Length) ? maxElements - elements.Count : buffer.Length;
|
||||||
|
|
||||||
// fetch first batch of names.
|
// fetch first batch of names.
|
||||||
var pFetched = Marshal.AllocCoTaskMem(sizeof(int));
|
var pFetched = Marshal.AllocCoTaskMem(sizeof(int));
|
||||||
@@ -1470,7 +1469,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
}
|
}
|
||||||
|
|
||||||
// re-calculate buffer length.
|
// re-calculate buffer length.
|
||||||
bufferLength = (maxElements > 0 && maxElements-elements.Count < buffer.Length)?maxElements-elements.Count:buffer.Length;
|
bufferLength = (maxElements > 0 && maxElements - elements.Count < buffer.Length) ? maxElements - elements.Count : buffer.Length;
|
||||||
|
|
||||||
// fetch next block.
|
// fetch next block.
|
||||||
result = enumerator.Next(bufferLength, buffer, pFetched);
|
result = enumerator.Next(bufferLength, buffer, pFetched);
|
||||||
@@ -1514,7 +1513,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
string browseFilter,
|
string browseFilter,
|
||||||
System.Runtime.InteropServices.ComTypes.IEnumString enumerator)
|
System.Runtime.InteropServices.ComTypes.IEnumString enumerator)
|
||||||
:
|
:
|
||||||
base (areaID, browseType, browseFilter)
|
base(areaID, browseType, browseFilter)
|
||||||
{
|
{
|
||||||
m_enumerator = enumerator;
|
m_enumerator = enumerator;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,9 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Ae;
|
using Technosoftware.DaAeHdaClient.Ae;
|
||||||
using Technosoftware.OpcRcw.Ae;
|
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
|
using Technosoftware.OpcRcw.Ae;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -333,7 +331,9 @@ namespace Technosoftware.DaAeHdaClient.Com.Ae
|
|||||||
// build results.
|
// build results.
|
||||||
var filters = new TsCAeSubscriptionFilters
|
var filters = new TsCAeSubscriptionFilters
|
||||||
{
|
{
|
||||||
EventTypes = pdwEventType, LowSeverity = pdwLowSeverity, HighSeverity = pdwHighSeverity
|
EventTypes = pdwEventType,
|
||||||
|
LowSeverity = pdwLowSeverity,
|
||||||
|
HighSeverity = pdwHighSeverity
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,12 +22,11 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
|
||||||
using System.Net;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
internal class ComUtils
|
internal class ComUtils
|
||||||
{
|
{
|
||||||
#region NetApi Function Declarations
|
#region NetApi Function Declarations
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct SERVER_INFO_100
|
private struct SERVER_INFO_100
|
||||||
{
|
{
|
||||||
public uint sv100_platform_id;
|
public uint sv100_platform_id;
|
||||||
@@ -154,13 +153,13 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// WIN32 GUID struct declaration.
|
/// WIN32 GUID struct declaration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct GUID
|
private struct GUID
|
||||||
{
|
{
|
||||||
public int Data1;
|
public int Data1;
|
||||||
public short Data2;
|
public short Data2;
|
||||||
public short Data3;
|
public short Data3;
|
||||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst=8)]
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||||
public byte[] Data4;
|
public byte[] Data4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +194,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
private const int VARIANT_NOVALUEPROP = 0x01;
|
private const int VARIANT_NOVALUEPROP = 0x01;
|
||||||
private const int VARIANT_ALPHABOOL = 0x02; // For VT_BOOL to VT_BSTR conversions convert to "True"/"False" instead of
|
private const int VARIANT_ALPHABOOL = 0x02; // For VT_BOOL to VT_BSTR conversions convert to "True"/"False" instead of
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct SOLE_AUTHENTICATION_SERVICE
|
private struct SOLE_AUTHENTICATION_SERVICE
|
||||||
{
|
{
|
||||||
public uint dwAuthnSvc;
|
public uint dwAuthnSvc;
|
||||||
@@ -303,7 +302,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
COINIT_SPEED_OVER_MEMORY = 0x8, //Trade memory for speed
|
COINIT_SPEED_OVER_MEMORY = 0x8, //Trade memory for speed
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct COSERVERINFO
|
private struct COSERVERINFO
|
||||||
{
|
{
|
||||||
public uint dwReserved1;
|
public uint dwReserved1;
|
||||||
@@ -313,7 +312,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
public uint dwReserved2;
|
public uint dwReserved2;
|
||||||
};
|
};
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct COAUTHINFO
|
private struct COAUTHINFO
|
||||||
{
|
{
|
||||||
public uint dwAuthnSvc;
|
public uint dwAuthnSvc;
|
||||||
@@ -325,7 +324,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
public uint dwCapabilities;
|
public uint dwCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct COAUTHIDENTITY
|
private struct COAUTHIDENTITY
|
||||||
{
|
{
|
||||||
public IntPtr User;
|
public IntPtr User;
|
||||||
@@ -337,7 +336,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
public uint Flags;
|
public uint Flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct MULTI_QI
|
private struct MULTI_QI
|
||||||
{
|
{
|
||||||
public IntPtr iid;
|
public IntPtr iid;
|
||||||
@@ -369,7 +368,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
[In, Out]
|
[In, Out]
|
||||||
MULTI_QI[] pResults);
|
MULTI_QI[] pResults);
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||||
private struct LICINFO
|
private struct LICINFO
|
||||||
{
|
{
|
||||||
public int cbLicInfo;
|
public int cbLicInfo;
|
||||||
@@ -415,7 +414,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
bool fLock);
|
bool fLock);
|
||||||
|
|
||||||
void GetLicInfo(
|
void GetLicInfo(
|
||||||
[In,Out] ref LICINFO pLicInfo);
|
[In, Out] ref LICINFO pLicInfo);
|
||||||
|
|
||||||
void RequestLicKey(
|
void RequestLicKey(
|
||||||
int dwReserved,
|
int dwReserved,
|
||||||
@@ -455,7 +454,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
private const int SECURITY_IMPERSONATION = 2;
|
private const int SECURITY_IMPERSONATION = 2;
|
||||||
private const int SECURITY_DELEGATION = 3;
|
private const int SECURITY_DELEGATION = 3;
|
||||||
|
|
||||||
[DllImport("advapi32.dll", SetLastError=true)]
|
[DllImport("advapi32.dll", SetLastError = true)]
|
||||||
private static extern bool LogonUser(
|
private static extern bool LogonUser(
|
||||||
string lpszUsername,
|
string lpszUsername,
|
||||||
string lpszDomain,
|
string lpszDomain,
|
||||||
@@ -464,10 +463,10 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
int dwLogonProvider,
|
int dwLogonProvider,
|
||||||
ref IntPtr phToken);
|
ref IntPtr phToken);
|
||||||
|
|
||||||
[DllImport("kernel32.dll", CharSet=CharSet.Auto)]
|
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
|
||||||
private extern static bool CloseHandle(IntPtr handle);
|
private extern static bool CloseHandle(IntPtr handle);
|
||||||
|
|
||||||
[DllImport("advapi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
|
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||||
private extern static bool DuplicateToken(
|
private extern static bool DuplicateToken(
|
||||||
IntPtr ExistingTokenHandle,
|
IntPtr ExistingTokenHandle,
|
||||||
int SECURITY_IMPERSONATION_LEVEL,
|
int SECURITY_IMPERSONATION_LEVEL,
|
||||||
@@ -510,11 +509,11 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
var authIdentity = new COAUTHIDENTITY();
|
var authIdentity = new COAUTHIDENTITY();
|
||||||
|
|
||||||
authIdentity.User = m_hUserName.AddrOfPinnedObject();
|
authIdentity.User = m_hUserName.AddrOfPinnedObject();
|
||||||
authIdentity.UserLength = (uint)((identity.Username != null)?identity.Username.Length:0);
|
authIdentity.UserLength = (uint)((identity.Username != null) ? identity.Username.Length : 0);
|
||||||
authIdentity.Password = m_hPassword.AddrOfPinnedObject();
|
authIdentity.Password = m_hPassword.AddrOfPinnedObject();
|
||||||
authIdentity.PasswordLength = (uint)((identity.Password != null)?identity.Password.Length:0);
|
authIdentity.PasswordLength = (uint)((identity.Password != null) ? identity.Password.Length : 0);
|
||||||
authIdentity.Domain = m_hDomain.AddrOfPinnedObject();
|
authIdentity.Domain = m_hDomain.AddrOfPinnedObject();
|
||||||
authIdentity.DomainLength = (uint)((identity.Domain != null)?identity.Domain.Length:0);
|
authIdentity.DomainLength = (uint)((identity.Domain != null) ? identity.Domain.Length : 0);
|
||||||
authIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
|
authIdentity.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
|
||||||
|
|
||||||
m_hIdentity = GCHandle.Alloc(authIdentity, GCHandleType.Pinned);
|
m_hIdentity = GCHandle.Alloc(authIdentity, GCHandleType.Pinned);
|
||||||
@@ -697,7 +696,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
// COM impersonation is a nice feature but variations between behavoirs on different
|
// COM impersonation is a nice feature but variations between behavoirs on different
|
||||||
// windows platforms make it virtually impossible to support. This code is left here
|
// windows platforms make it virtually impossible to support. This code is left here
|
||||||
// in case it becomes a critical requirement in the future.
|
// in case it becomes a critical requirement in the future.
|
||||||
#if COM_IMPERSONATION_SUPPORT
|
#if COM_IMPERSONATION_SUPPORT
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the WindowsIdentity associated with a UserIdentity.
|
/// Returns the WindowsIdentity associated with a UserIdentity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -937,7 +936,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -2622,7 +2621,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
error,
|
error,
|
||||||
langId,
|
langId,
|
||||||
buffer,
|
buffer,
|
||||||
MAX_MESSAGE_LENGTH-1,
|
MAX_MESSAGE_LENGTH - 1,
|
||||||
IntPtr.Zero);
|
IntPtr.Zero);
|
||||||
|
|
||||||
if (result > 0)
|
if (result > 0)
|
||||||
|
|||||||
@@ -23,9 +23,8 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -22,16 +22,13 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading;
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
|
||||||
|
|
||||||
using Technosoftware.OpcRcw.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
||||||
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
|
using Technosoftware.OpcRcw.Da;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Da;
|
using Technosoftware.DaAeHdaClient.Com.Da;
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
|
||||||
|
|
||||||
using Technosoftware.OpcRcw.Da;
|
|
||||||
using Technosoftware.OpcRcw.Comn;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
||||||
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
|
using Technosoftware.OpcRcw.Comn;
|
||||||
|
using Technosoftware.OpcRcw.Da;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -23,13 +23,10 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Da;
|
using Technosoftware.DaAeHdaClient.Com.Da;
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
|
||||||
|
|
||||||
using Technosoftware.OpcRcw.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
||||||
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
|
using Technosoftware.OpcRcw.Da;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Com.Da20
|
namespace Technosoftware.DaAeHdaClient.Com.Da20
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// create buffer.
|
// create buffer.
|
||||||
var buffer = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(IntPtr))*count);
|
var buffer = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(IntPtr)) * count);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,14 +22,9 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Xml;
|
|
||||||
using System.Net;
|
|
||||||
using System.Text;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Runtime.Serialization;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,9 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Hda;
|
using Technosoftware.DaAeHdaClient.Hda;
|
||||||
using Technosoftware.OpcRcw.Hda;
|
|
||||||
using Technosoftware.OpcRcw.Comn;
|
using Technosoftware.OpcRcw.Comn;
|
||||||
|
using Technosoftware.OpcRcw.Hda;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Com.Hda
|
namespace Technosoftware.DaAeHdaClient.Com.Hda
|
||||||
@@ -141,7 +140,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
var branchPath = (itemID != null && itemID.ItemName != null)?itemID.ItemName:"";
|
var branchPath = (itemID != null && itemID.ItemName != null) ? itemID.ItemName : "";
|
||||||
|
|
||||||
// move to the correct position in the server's address space.
|
// move to the correct position in the server's address space.
|
||||||
try
|
try
|
||||||
@@ -171,7 +170,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
// browse for items
|
// browse for items
|
||||||
enumerator = GetEnumerator(false);
|
enumerator = GetEnumerator(false);
|
||||||
|
|
||||||
var items = FetchElements(enumerator, maxElements-elements.Count, false);
|
var items = FetchElements(enumerator, maxElements - elements.Count, false);
|
||||||
|
|
||||||
if (items != null)
|
if (items != null)
|
||||||
{
|
{
|
||||||
@@ -252,7 +251,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fetch next set of items.
|
// fetch next set of items.
|
||||||
var items = FetchElements(pos.Enumerator, maxElements-elements.Count, false);
|
var items = FetchElements(pos.Enumerator, maxElements - elements.Count, false);
|
||||||
|
|
||||||
if (items != null)
|
if (items != null)
|
||||||
{
|
{
|
||||||
@@ -282,7 +281,7 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var browseType = (isBranch)?OPCHDA_BROWSETYPE.OPCHDA_BRANCH:OPCHDA_BROWSETYPE.OPCHDA_LEAF;
|
var browseType = (isBranch) ? OPCHDA_BROWSETYPE.OPCHDA_BRANCH : OPCHDA_BROWSETYPE.OPCHDA_LEAF;
|
||||||
|
|
||||||
IEnumString pEnumerator = null;
|
IEnumString pEnumerator = null;
|
||||||
m_browser.GetEnum(browseType, out pEnumerator);
|
m_browser.GetEnum(browseType, out pEnumerator);
|
||||||
|
|||||||
@@ -39,15 +39,15 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the object with the containing subscription object.
|
/// Initializes the object with the containing subscription object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DataCallback() {}
|
public DataCallback() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fired when an exception occurs during callback processing.
|
/// Fired when an exception occurs during callback processing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event TsCHdaCallbackExceptionEventHandler CallbackExceptionEvent
|
public event TsCHdaCallbackExceptionEventHandler CallbackExceptionEvent
|
||||||
{
|
{
|
||||||
add {lock (this) { _callbackExceptionEvent += value; }}
|
add { lock (this) { _callbackExceptionEvent += value; } }
|
||||||
remove {lock (this) { _callbackExceptionEvent -= value; }}
|
remove { lock (this) { _callbackExceptionEvent -= value; } }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
{
|
{
|
||||||
var output = new OpcRcw.Hda.OPCHDA_FILETIME();
|
var output = new OpcRcw.Hda.OPCHDA_FILETIME();
|
||||||
|
|
||||||
output.dwHighDateTime = (int)((((ulong)(input*10000000)) & 0xFFFFFFFF00000000)>>32);
|
output.dwHighDateTime = (int)((((ulong)(input * 10000000)) & 0xFFFFFFFF00000000) >> 32);
|
||||||
output.dwLowDateTime = (int)((((ulong)(input*10000000)) & 0x00000000FFFFFFFF));
|
output.dwLowDateTime = (int)((((ulong)(input * 10000000)) & 0x00000000FFFFFFFF));
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
@@ -102,8 +102,8 @@ namespace Technosoftware.DaAeHdaClient.Com.Hda
|
|||||||
if (input != null)
|
if (input != null)
|
||||||
{
|
{
|
||||||
output.ftTime = Convert(Technosoftware.DaAeHdaClient.Com.Interop.GetFILETIME(input.AbsoluteTime));
|
output.ftTime = Convert(Technosoftware.DaAeHdaClient.Com.Interop.GetFILETIME(input.AbsoluteTime));
|
||||||
output.szTime = (input.IsRelative)?input.ToString():"";
|
output.szTime = (input.IsRelative) ? input.ToString() : "";
|
||||||
output.bString = (input.IsRelative)?1:0;
|
output.bString = (input.IsRelative) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a null value for a time structure.
|
// create a null value for a time structure.
|
||||||
|
|||||||
@@ -22,12 +22,11 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
|
||||||
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
using Technosoftware.DaAeHdaClient.Com.Utilities;
|
||||||
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#pragma warning disable 0618
|
#pragma warning disable 0618
|
||||||
@@ -859,7 +858,8 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// This flag suppresses the conversion to local time done during marshalling.
|
/// This flag suppresses the conversion to local time done during marshalling.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool PreserveUtc {
|
public static bool PreserveUtc
|
||||||
|
{
|
||||||
get { lock (typeof(Interop)) { return DaAeHdaClient.ApplicationInstance.TimeAsUtc; } }
|
get { lock (typeof(Interop)) { return DaAeHdaClient.ApplicationInstance.TimeAsUtc; } }
|
||||||
set { lock (typeof(Interop)) { DaAeHdaClient.ApplicationInstance.TimeAsUtc = value; } }
|
set { lock (typeof(Interop)) { DaAeHdaClient.ApplicationInstance.TimeAsUtc = value; } }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,12 +23,11 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.Net;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -22,14 +22,12 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.OpcRcw.Comn;
|
|
||||||
using Technosoftware.DaAeHdaClient.Ae;
|
using Technosoftware.DaAeHdaClient.Ae;
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
using Technosoftware.DaAeHdaClient.Hda;
|
using Technosoftware.DaAeHdaClient.Hda;
|
||||||
|
using Technosoftware.OpcRcw.Comn;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Com
|
namespace Technosoftware.DaAeHdaClient.Com
|
||||||
@@ -45,7 +43,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Frees all unmanaged resources
|
/// Frees all unmanaged resources
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dispose() {}
|
public void Dispose() { }
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
// IDiscovery
|
// IDiscovery
|
||||||
@@ -73,7 +71,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
{
|
{
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
var credentials = (connectData != null)?connectData.GetCredential(null, null):null;
|
var credentials = (connectData != null) ? connectData.GetCredential(null, null) : null;
|
||||||
|
|
||||||
// connect to the server.
|
// connect to the server.
|
||||||
m_server = (IOPCServerList2)Interop.CreateInstance(CLSID, host, credentials, connectData?.UseConnectSecurity ?? false);
|
m_server = (IOPCServerList2)Interop.CreateInstance(CLSID, host, credentials, connectData?.UseConnectSecurity ?? false);
|
||||||
@@ -160,7 +158,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
{
|
{
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
var credentials = (connectData != null)?connectData.GetCredential(null, null):null;
|
var credentials = (connectData != null) ? connectData.GetCredential(null, null) : null;
|
||||||
|
|
||||||
// connect to the server.
|
// connect to the server.
|
||||||
m_server = (IOPCServerList2)Interop.CreateInstance(CLSID, host, credentials, connectData?.UseConnectSecurity ?? false);
|
m_server = (IOPCServerList2)Interop.CreateInstance(CLSID, host, credentials, connectData?.UseConnectSecurity ?? false);
|
||||||
@@ -223,7 +221,7 @@ namespace Technosoftware.DaAeHdaClient.Com
|
|||||||
var count = 10;
|
var count = 10;
|
||||||
|
|
||||||
// create buffer.
|
// create buffer.
|
||||||
var buffer = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(Guid))*count);
|
var buffer = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(Guid)) * count);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
|
|||||||
@@ -22,10 +22,9 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -85,11 +85,11 @@ namespace Technosoftware.DaAeHdaClient.Ae
|
|||||||
protected virtual void Dispose(bool disposing)
|
protected virtual void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
// Check to see if Dispose has already been called.
|
// Check to see if Dispose has already been called.
|
||||||
if(!disposed_)
|
if (!disposed_)
|
||||||
{
|
{
|
||||||
// If disposing equals true, dispose all managed
|
// If disposing equals true, dispose all managed
|
||||||
// and unmanaged resources.
|
// and unmanaged resources.
|
||||||
if(disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
// Release unmanaged resources. If disposing is false,
|
// Release unmanaged resources. If disposing is false,
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ namespace Technosoftware.DaAeHdaClient.Ae
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the object with default values.
|
/// Initializes the object with default values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TsCAeItemUrl() {}
|
public TsCAeItemUrl() { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the object with an ItemIdentifier object.
|
/// Initializes the object with an ItemIdentifier object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TsCAeItemUrl(OpcItem item) : base(item) {}
|
public TsCAeItemUrl(OpcItem item) : base(item) { }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the object with an ItemIdentifier object and url.
|
/// Initializes the object with an ItemIdentifier object and url.
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -268,11 +268,11 @@ namespace Technosoftware.DaAeHdaClient.Ae
|
|||||||
protected virtual void Dispose(bool disposing)
|
protected virtual void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
// Check to see if Dispose has already been called.
|
// Check to see if Dispose has already been called.
|
||||||
if(!disposed_)
|
if (!disposed_)
|
||||||
{
|
{
|
||||||
// If disposing equals true, dispose all managed
|
// If disposing equals true, dispose all managed
|
||||||
// and unmanaged resources.
|
// and unmanaged resources.
|
||||||
if(disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
if (subscription_ != null)
|
if (subscription_ != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#endregion Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved
|
#endregion Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved
|
||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,8 @@
|
|||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Xml;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
using Technosoftware.DaAeHdaClient.Da;
|
using Technosoftware.DaAeHdaClient.Da;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Xml;
|
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using System.Xml;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Da
|
namespace Technosoftware.DaAeHdaClient.Da
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ namespace Technosoftware.DaAeHdaClient.Da
|
|||||||
/// <summary>A device failure has been detected.</summary>
|
/// <summary>A device failure has been detected.</summary>
|
||||||
BadDeviceFailure = 0x0000000c,
|
BadDeviceFailure = 0x0000000c,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A sensor failure had been detected (the ’Limits’ field can provide additional
|
/// A sensor failure had been detected (the ’Limits?field can provide additional
|
||||||
/// diagnostic information in some situations).
|
/// diagnostic information in some situations).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BadSensorFailure = 0x00000010,
|
BadSensorFailure = 0x00000010,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Communications have failed. However, the last known value is available. Note that
|
/// Communications have failed. However, the last known value is available. Note that
|
||||||
/// the ‘age’ of the value may be determined from the time stamp in the item state.
|
/// the ‘age?of the value may be determined from the time stamp in the item state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
BadLastKnownValue = 0x00000014,
|
BadLastKnownValue = 0x00000014,
|
||||||
/// <summary>Communications have failed. There is no last known value is available.</summary>
|
/// <summary>Communications have failed. There is no last known value is available.</summary>
|
||||||
@@ -83,16 +83,16 @@ namespace Technosoftware.DaAeHdaClient.Da
|
|||||||
Uncertain = 0x00000040,
|
Uncertain = 0x00000040,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whatever was writing this value has stopped doing so. The returned value should
|
/// Whatever was writing this value has stopped doing so. The returned value should
|
||||||
/// be regarded as ‘stale’. Note that this differs from a BAD value with sub-status
|
/// be regarded as ‘stale? Note that this differs from a BAD value with sub-status
|
||||||
/// badLastKnownValue (Last Known Value). That status is associated specifically with a
|
/// badLastKnownValue (Last Known Value). That status is associated specifically with a
|
||||||
/// detectable communications error on a ‘fetched’ value. This error is associated with the
|
/// detectable communications error on a ‘fetched?value. This error is associated with the
|
||||||
/// failure of some external source to ‘put’ something into the value within an acceptable
|
/// failure of some external source to ‘put?something into the value within an acceptable
|
||||||
/// period of time. Note that the ‘age’ of the value can be determined from the time stamp
|
/// period of time. Note that the ‘age?of the value can be determined from the time stamp
|
||||||
/// in the item state.
|
/// in the item state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UncertainLastUsableValue = 0x00000044,
|
UncertainLastUsableValue = 0x00000044,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Either the value has ‘pegged’ at one of the sensor limits (in which case the
|
/// Either the value has ‘pegged?at one of the sensor limits (in which case the
|
||||||
/// limit field should be set to low or high) or the sensor is otherwise known to be out of
|
/// limit field should be set to low or high) or the sensor is otherwise known to be out of
|
||||||
/// calibration via some form of internal diagnostics (in which case the limit field should
|
/// calibration via some form of internal diagnostics (in which case the limit field should
|
||||||
/// be none).
|
/// be none).
|
||||||
@@ -100,7 +100,7 @@ namespace Technosoftware.DaAeHdaClient.Da
|
|||||||
UncertainSensorNotAccurate = 0x00000050,
|
UncertainSensorNotAccurate = 0x00000050,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The returned value is outside the limits defined for this parameter. Note that in
|
/// The returned value is outside the limits defined for this parameter. Note that in
|
||||||
/// this case (per the Field-bus Specification) the ‘Limits’ field indicates which limit has
|
/// this case (per the Field-bus Specification) the ‘Limits?field indicates which limit has
|
||||||
/// been exceeded but does NOT necessarily imply that the value cannot move farther out of
|
/// been exceeded but does NOT necessarily imply that the value cannot move farther out of
|
||||||
/// range.
|
/// range.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.Serialization;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Da
|
namespace Technosoftware.DaAeHdaClient.Da
|
||||||
|
|||||||
@@ -210,8 +210,10 @@ namespace Technosoftware.DaAeHdaClient.Da
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The items belonging to the subscription.
|
/// The items belonging to the subscription.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TsCDaItem[] Items {
|
public TsCDaItem[] Items
|
||||||
get {
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
if (daItems_ == null) return new TsCDaItem[0];
|
if (daItems_ == null) return new TsCDaItem[0];
|
||||||
var items = new TsCDaItem[daItems_.Length];
|
var items = new TsCDaItem[daItems_.Length];
|
||||||
for (var ii = 0; ii < daItems_.Length; ii++) items[ii] = (TsCDaItem)daItems_[ii].Clone();
|
for (var ii = 0; ii < daItems_.Length; ii++) items[ii] = (TsCDaItem)daItems_[ii].Clone();
|
||||||
@@ -562,7 +564,8 @@ namespace Technosoftware.DaAeHdaClient.Da
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An event to receive data change updates.
|
/// An event to receive data change updates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event TsCDaDataChangedEventHandler DataChangedEvent {
|
public event TsCDaDataChangedEventHandler DataChangedEvent
|
||||||
|
{
|
||||||
add => Subscription.DataChangedEvent += value;
|
add => Subscription.DataChangedEvent += value;
|
||||||
remove => Subscription.DataChangedEvent -= value;
|
remove => Subscription.DataChangedEvent -= value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Text;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient.Hda
|
namespace Technosoftware.DaAeHdaClient.Hda
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using static System.String;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Technosoftware.DaAeHdaClient.Utilities;
|
using Technosoftware.DaAeHdaClient.Utilities;
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Xml;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Xml;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient
|
namespace Technosoftware.DaAeHdaClient
|
||||||
@@ -161,7 +161,7 @@ namespace Technosoftware.DaAeHdaClient
|
|||||||
// convert scalar value to an array type.
|
// convert scalar value to an array type.
|
||||||
if (!type.IsArray && newType.IsArray)
|
if (!type.IsArray && newType.IsArray)
|
||||||
{
|
{
|
||||||
var array = new ArrayList(1) {ChangeType(source, newType.GetElementType())};
|
var array = new ArrayList(1) { ChangeType(source, newType.GetElementType()) };
|
||||||
return array.ToArray(newType.GetElementType() ?? throw new InvalidOperationException());
|
return array.ToArray(newType.GetElementType() ?? throw new InvalidOperationException());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Xml;
|
|
||||||
using System.Runtime.Serialization;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.Xml;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient
|
namespace Technosoftware.DaAeHdaClient
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Resources;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace Technosoftware.DaAeHdaClient
|
namespace Technosoftware.DaAeHdaClient
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Technosoftware.DaAeHdaClient.Utilities
|
|||||||
return DateTime.UtcNow;
|
return DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ticks = (counter - s_Default.m_baseline)*s_Default.m_ratio;
|
var ticks = (counter - s_Default.m_baseline) * s_Default.m_ratio;
|
||||||
|
|
||||||
return new DateTime((long)ticks + s_Default.m_offset);
|
return new DateTime((long)ticks + s_Default.m_offset);
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ namespace Technosoftware.DaAeHdaClient.Utilities
|
|||||||
m_baseline = m_offset;
|
m_baseline = m_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ratio = ((decimal)TimeSpan.TicksPerSecond)/m_frequency;
|
m_ratio = ((decimal)TimeSpan.TicksPerSecond) / m_frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
// ReSharper disable UnusedMember.Global
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -24,7 +22,7 @@ namespace Technosoftware.OpcRcw.Ae
|
|||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("58E13251-AC87-11d1-84D5-00608CB8A7E9")]
|
[GuidAttribute("58E13251-AC87-11d1-84D5-00608CB8A7E9")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_OPCAEServer10 {}
|
public interface CATID_OPCAEServer10 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
public enum OPCAEBROWSEDIRECTION
|
public enum OPCAEBROWSEDIRECTION
|
||||||
@@ -61,7 +59,7 @@ namespace Technosoftware.OpcRcw.Ae
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct ONEVENTSTRUCT
|
public struct ONEVENTSTRUCT
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I2)]
|
[MarshalAs(UnmanagedType.I2)]
|
||||||
@@ -100,7 +98,7 @@ namespace Technosoftware.OpcRcw.Ae
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCEVENTSERVERSTATUS
|
public struct OPCEVENTSERVERSTATUS
|
||||||
{
|
{
|
||||||
public FILETIME ftStartTime;
|
public FILETIME ftStartTime;
|
||||||
@@ -120,7 +118,7 @@ namespace Technosoftware.OpcRcw.Ae
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCCONDITIONSTATE
|
public struct OPCCONDITIONSTATE
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I2)]
|
[MarshalAs(UnmanagedType.I2)]
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
/* Unmerged change from project 'Technosoftware.OpcRcw (net472)'
|
/* Unmerged change from project 'Technosoftware.OpcRcw (net472)'
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -24,25 +22,25 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("63D5F430-CFE4-11d1-B2C8-0060083BA1FB")]
|
[GuidAttribute("63D5F430-CFE4-11d1-B2C8-0060083BA1FB")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_OPCDAServer10 {}
|
public interface CATID_OPCDAServer10 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("63D5F432-CFE4-11d1-B2C8-0060083BA1FB")]
|
[GuidAttribute("63D5F432-CFE4-11d1-B2C8-0060083BA1FB")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_OPCDAServer20 {}
|
public interface CATID_OPCDAServer20 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("CC603642-66D7-48f1-B69A-B625E73652D7")]
|
[GuidAttribute("CC603642-66D7-48f1-B69A-B625E73652D7")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_OPCDAServer30 {}
|
public interface CATID_OPCDAServer30 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("3098EDA4-A006-48b2-A27F-247453959408")]
|
[GuidAttribute("3098EDA4-A006-48b2-A27F-247453959408")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_XMLDAServer10 {}
|
public interface CATID_XMLDAServer10 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
@@ -113,7 +111,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCGROUPHEADER
|
public struct OPCGROUPHEADER
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -129,7 +127,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMHEADER1
|
public struct OPCITEMHEADER1
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -144,7 +142,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMHEADER2
|
public struct OPCITEMHEADER2
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -158,7 +156,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCGROUPHEADERWRITE
|
public struct OPCGROUPHEADERWRITE
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -172,7 +170,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMHEADERWRITE
|
public struct OPCITEMHEADERWRITE
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -182,7 +180,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMSTATE
|
public struct OPCITEMSTATE
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -197,7 +195,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCSERVERSTATUS
|
public struct OPCSERVERSTATUS
|
||||||
{
|
{
|
||||||
public FILETIME ftStartTime;
|
public FILETIME ftStartTime;
|
||||||
@@ -221,7 +219,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMDEF
|
public struct OPCITEMDEF
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
[MarshalAs(UnmanagedType.LPWStr)]
|
||||||
@@ -242,7 +240,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMATTRIBUTES
|
public struct OPCITEMATTRIBUTES
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
[MarshalAs(UnmanagedType.LPWStr)]
|
||||||
@@ -270,7 +268,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMRESULT
|
public struct OPCITEMRESULT
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -287,7 +285,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMPROPERTY
|
public struct OPCITEMPROPERTY
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I2)]
|
[MarshalAs(UnmanagedType.I2)]
|
||||||
@@ -309,7 +307,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMPROPERTIES
|
public struct OPCITEMPROPERTIES
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -322,7 +320,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCBROWSEELEMENT
|
public struct OPCBROWSEELEMENT
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
[MarshalAs(UnmanagedType.LPWStr)]
|
||||||
@@ -337,7 +335,7 @@ namespace Technosoftware.OpcRcw.Da
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCITEMVQT
|
public struct OPCITEMVQT
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.Struct)]
|
[MarshalAs(UnmanagedType.Struct)]
|
||||||
|
|||||||
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
#region Using Directives
|
#region Using Directives
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -25,7 +23,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
[ComImport]
|
[ComImport]
|
||||||
[GuidAttribute("7DE5B060-E089-11d2-A5E6-000086339399")]
|
[GuidAttribute("7DE5B060-E089-11d2-A5E6-000086339399")]
|
||||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||||
public interface CATID_OPCHDAServer10 {}
|
public interface CATID_OPCHDAServer10 { }
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
@@ -128,7 +126,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCHDA_ANNOTATION
|
public struct OPCHDA_ANNOTATION
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -142,7 +140,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCHDA_MODIFIEDITEM
|
public struct OPCHDA_MODIFIEDITEM
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -158,7 +156,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCHDA_ATTRIBUTE
|
public struct OPCHDA_ATTRIBUTE
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -172,7 +170,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCHDA_TIME
|
public struct OPCHDA_TIME
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -183,7 +181,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <exclude />
|
/// <exclude />
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||||
public struct OPCHDA_ITEM
|
public struct OPCHDA_ITEM
|
||||||
{
|
{
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -886,7 +884,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
||||||
int[] phrErrors);
|
int[] phrErrors);
|
||||||
|
|
||||||
void OnInsertAnnotations (
|
void OnInsertAnnotations(
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
int dwTransactionID,
|
int dwTransactionID,
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -898,7 +896,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
||||||
int[] phrErrors);
|
int[] phrErrors);
|
||||||
|
|
||||||
void OnPlayback (
|
void OnPlayback(
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
int dwTransactionID,
|
int dwTransactionID,
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
@@ -909,7 +907,7 @@ namespace Technosoftware.OpcRcw.Hda
|
|||||||
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.I4, SizeParamIndex=2)]
|
||||||
int[] phrErrors);
|
int[] phrErrors);
|
||||||
|
|
||||||
void OnUpdateComplete (
|
void OnUpdateComplete(
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
int dwTransactionID,
|
int dwTransactionID,
|
||||||
[MarshalAs(UnmanagedType.I4)]
|
[MarshalAs(UnmanagedType.I4)]
|
||||||
|
|||||||
Reference in New Issue
Block a user