This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1 @@
12

View File

@@ -0,0 +1 @@
12

View File

@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DASFactory")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DASFactory")]
[assembly: AssemblyCopyright("Copyright © 2008")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("16aa1a8c-fcb8-4e68-b49c-91b5a486d990")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,204 @@
using System;
using System.Collections.Generic;
using DTS.Common.DAS.Concepts;
using DTS.Common.Enums.DASFactory;
using DTS.Common.ICommunication;
using DTS.Common.Interface.DASFactory;
using DTS.Common.Utilities.Logging;
using DTS.DASLib.Command.Ribeye;
using DTS.DASLib.Service;
namespace DTS.DASLib.DASFactory
{
internal class RibeyeHandling : IDeviceSetup
{
static readonly float AAFilterDivider = 5.0F;
static readonly Dictionary<uint, float> Samplerate2AAFilterDict = new Dictionary<uint, float>
{
{500, 500.0F/AAFilterDivider},
{1000, 1000.0F/AAFilterDivider},
{2500, 2500.0F/AAFilterDivider},
{5000, 5000.0F/AAFilterDivider},
{10000, 10000.0F/AAFilterDivider},
{20000, 20000.0F/AAFilterDivider},
{25000, 25000.0F/AAFilterDivider},
{50000, 50000.0F/AAFilterDivider},
{100000, 100000.0F/AAFilterDivider}
};
public RibeyeHandling(bool _utilMode)
{
}
public bool QueryInformation(ConnectedDevice dev)
{
if (!(dev.Dev is IConnectedDAS))
{
return false;
}
var DASCommDev = ((IConnectedDAS)dev.Dev).DASComm;
if (!(DASCommDev is ICommunication))
{
return false;
}
var CommDev = DASCommDev as ICommunication;
try
{
var dasInfo = new InfoResult { MaxNumberOfModules = 10 };
string SerialNumber;
uint NumberOfLEDs;
// Need to bootstrap protocol version ...
CommDev.ProtocolVersion = 1;
// Above left in place for future use.
var Status = new QueryArmAndTriggerStatus(CommDev);
try
{
Status.SyncExecute();
}
catch
{
// The ribeye will always fail this command on the first boot up (problably because
// their CRC is not inited right.
//
// Silently retry.
Status.SyncExecute();
}
if (Status.IsArmed)
{
SerialNumber = "Ribeye";
NumberOfLEDs = 18; // Would be nice to have a better fall back
}
else
{
var SerialNumberQuery = new QuerySerialNumber(CommDev);
SerialNumberQuery.SyncExecute();
SerialNumber = SerialNumberQuery.SerialNumber;
var LEDQuery = new QueryNumberOfLEDs(CommDev);
LEDQuery.SyncExecute();
NumberOfLEDs = LEDQuery.NumberOfLEDs;
}
dasInfo.Modules = new InfoResult.Module[NumberOfLEDs];
CommDev.FirmwareVersion = "0000";
DASCommDev.SerialNumber = SerialNumber;
var serialNumbers = new string[NumberOfLEDs + 1];
var firmwareVersions = new string[NumberOfLEDs + 1];
serialNumbers[0] = DASCommDev.SerialNumber;
firmwareVersions[0] = CommDev.FirmwareVersion;
for (var Index = 0; Index < NumberOfLEDs; Index++)
{
var module = new InfoResult.Module
{
ModuleArrayIndex = Index,
MaxRecordingSamples = 300000,
NumberOfChannels = 3,
SerialNumber = DASCommDev.SerialNumber + "-" + Index,
SupportedModes = new[]
{
DFConstantsAndEnums.RecordingMode.CircularBuffer,
DFConstantsAndEnums.RecordingMode.RecorderMode
},
SupportedSampleRates = new uint[1]
};
// this should be adjusted to real-life
//module.SerialNumber = (dev as IDASCommunication).SerialNumber + "-" + Index.ToString();
module.SupportedSampleRates[0] = 10000;
module.TypeOfModule = DFConstantsAndEnums.ModuleType.RibeyeLED; // for now
module.SampleRate2AAFrequency = Samplerate2AAFilterDict;
dasInfo.Modules[Index] = module;
serialNumbers[Index + 1] = module.SerialNumber;
firmwareVersions[Index + 1] = "0000";
}
//these are from the ribeye protocol specifications pdf, specifically
// "30 second flash memory" which by default is supporting 6 ribs sensing in 3 directions
// at 10k samples/sec.
dasInfo.MaxEventStorageSpaceInBytes = 30 * 10000 * 6 * 3;
//note this could be inaccurate if we dropped into here already armed, the code
//above will just constant it to 18 and so our calculations might be off.
dasInfo.NumberOfBytesPerSampleClock = NumberOfLEDs;
var icomm_dasinfo = new Communication_DASInfo { SerialNumbers = new string[1] };
icomm_dasinfo.SerialNumbers[0] = SerialNumber;
icomm_dasinfo.FirmwareVersions = firmwareVersions;
CommDev.DASInfo = icomm_dasinfo;
DASCommDev.SetDASInfo(dasInfo);
try
{
if (dev.Dev is IConnectedDAS idas)
{
idas.DASComm?.ReadFirstUseDate();
}
}
catch (Exception ex) { APILogger.Log(ex); }
return true;
}
catch (Exception)
{
var dasInfo = new InfoResult
{
MaxNumberOfModules = 10,
Modules = new InfoResult.Module[0]
};
DASCommDev.SetDASInfo(dasInfo);
dev.InUpdateMode = true;
return false;
}
}
public ICommunication GetICommunication()
{
return new EthernetRibeye();
}
public ICommunication GetICommunication(ConnectedDevice dev)
{
return (dev.Dev as ConnectedEthernetRibeye).Comm;
}
public IConnectedDevice GetIConnectedDevice(DTS.Common.Interface.DASFactory.ICommunication comm)
{
return new ConnectedEthernetRibeye(comm as EthernetRibeye);
}
public bool IsCorrectType(ConnectedDevice dev)
{
return dev.Dev is ConnectedEthernetRibeye;
}
public DFConstantsAndEnums.DASType GetDASType()
{
return DFConstantsAndEnums.DASType.ETHERNET_RIBEYE;
}
public Guid GetGuid()
{
return Guid.Empty;
}
public int GetProductId()
{
return 0;
}
public string GetProductIdString()
{
return string.Empty;
}
public void SetHandler(DeviceHandling handler)
{
}
}
}

View File

@@ -0,0 +1,898 @@
<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph DataVirtualized="True" FilterState="InheritsFrom,CodeSchema_FieldWrite,CodeSchema_ReturnTypeLink,CodeSchema_AttributeUse,CodeMap_ExternalReference,UncategorizedRelationship,Implements,CodeSchema_Calls,CodeSchema_FunctionPointer,CodeSchema_FieldRead,References" Layout="Sugiyama" ZoomLevel="-1" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="@10" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5.2\System.Core.dll" Group="Collapsed" Label="System.Core.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@12" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5.2\System.Drawing.dll" Group="Collapsed" Label="System.Drawing.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@14" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:20" Bounds="83.1828496437946,14.5923031703089,154.2,25" CodeSchemaProperty_StrongName="HIDFramework, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(30f9a58b-6808-4c93-a294-7267c3d2e7eb.OutputPath)" Group="Collapsed" Label="HIDFramework.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@16" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5.2\System.dll" Group="Collapsed" Label="System.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@18" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:25" Bounds="757.914516310461,14.5923031703089,162.736666666667,25" CodeSchemaProperty_StrongName="ICommunication, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(f57b954e-a49a-4110-b36c-b5abab3e230b.OutputPath)" Group="Collapsed" Label="ICommunication.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@2" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5.2\mscorlib.dll" Group="Collapsed" Label="mscorlib.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@20" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:21" Bounds="227.777849643795,-40.4076968296911,181.01,25" CodeSchemaProperty_StrongName="WINUSBConnection, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(3a40c700-1d50-4524-affb-0d59f0f0f9cb.OutputPath)" Group="Collapsed" Label="WINUSBConnection.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@22" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:18" Bounds="769.619516310461,69.5923031703089,139.326666666667,25" CodeSchemaProperty_StrongName="IConnection, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(884cc30c-2b57-4e06-9650-f55152a9f062.OutputPath)" Group="Collapsed" Label="IConnection.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@24" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:20" Bounds="1095.96118297713,14.5923031703088,180.643333333333,25" CodeSchemaProperty_StrongName="EthernetConnection, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(e08382c1-f0b4-44c4-9676-c32fd442228a.OutputPath)" Group="Collapsed" Label="EthernetConnection.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@26" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:27" Bounds="640.056182977128,-95.407696829691,174.453333333333,25" CodeSchemaProperty_StrongName="Ribeye Commands, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(53abd0f3-7d8d-43cd-99d7-06c45246d93e.OutputPath)" Group="Collapsed" Label="Ribeye Commands.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@28" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:27" Bounds="907.797849643794,-95.4076968296912,174.97,25" CodeSchemaProperty_StrongName="SliceDBCommands, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(dea48a0b-999e-48e8-8601-cb05b6b765de.OutputPath)" Group="Collapsed" Label="SliceDBCommands.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@30" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:26" Bounds="1176.08951631046,-95.4076968296912,164.386666666666,25" CodeSchemaProperty_StrongName="SLICECommands, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(d015f93d-9507-4484-977b-4cf1bdc0b30e.OutputPath)" Group="Collapsed" Label="SLICECommands.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@32" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:27" Bounds="445.187849643794,-95.4076968296911,164.190000000001,25" CodeSchemaProperty_StrongName="TDASCommands, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(14b4a79f-a4b5-4c4c-a041-0105eed82782.OutputPath)" Group="Collapsed" Label="TDASCommands.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@34" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:19" Bounds="467.406182977127,69.5923031703089,137.753333333334,25" CodeSchemaProperty_StrongName="DTS.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(d6da1b74-c711-43c2-91b1-1908a8d04dbf.OutputPath)" Group="Collapsed" Label="DTS.Utilities.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@36" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(FxReferenceAssemblies)\.NETFramework\v4.5.2\System.Windows.Forms.dll" Group="Collapsed" Label="System.Windows.Forms.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@38" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:25" Bounds="51.0345163104611,-95.4076968296911,172.496666666667,25" CodeSchemaProperty_StrongName="DTS.DAS.Concepts, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(ae3987f7-c4c6-40fb-a353-1a2dadef7a9a.OutputPath)" Group="Collapsed" Label="DTS.DAS.Concepts.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@4" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:25" Bounds="928.397849643794,-40.4076968296912,133.77,25" CodeSchemaProperty_StrongName="ICommand, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(58e70872-8acc-4957-bb8e-d3746bcc536d.OutputPath)" Group="Collapsed" Label="ICommand.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@40" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 20:32:55" Bounds="639.709053243345,-354.681037662087,135.89,25" CodeSchemaProperty_StrongName="DASFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPath)" Group="Collapsed" Label="DASFactory.dll" UseManualLocation="True" />
<Node Id="@6" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:38" Bounds="356.297849643795,-150.407696829691,115.97,25" CodeSchemaProperty_StrongName="IService, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(c9c45b72-05a3-4962-bc13-a78b1f4b1925.OutputPath)" Group="Collapsed" Label="IService.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="@8" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 19:07:18" Bounds="939.421182977128,69.5923031703088,145.723333333333,25" CodeSchemaProperty_StrongName="DASResource, Version=1.6.81.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(f621ce48-bb4b-4cfc-a325-9410b721cc44.OutputPath)" Group="Collapsed" Label="DASResource.dll" UseManualLocation="True">
<Category Ref="FileSystem.Category.FileOfType.dll" />
</Node>
<Node Id="_standardGraphExternalsGroup" Category="Externals" Bounds="-12.7171503562055,124.592303170309,86.9899999999998,25" Group="Collapsed" Label="Externals" LayoutSettings="List" UseManualLocation="True" />
</Nodes>
<Links>
<Link Source="@14" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@14" Target="@16" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@14" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="269">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
</Link>
<Link Source="@14" Target="@34" Category="CodeSchema_Calls" Bounds="235.893672302879,38.1524768010731,223.264990574772,32.6583833912591" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@14" Target="@36" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@18" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@18" Target="@16" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@18" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="373">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@18" Target="@22" Category="References" Bounds="839.282849643794,39.5923231703088,0,21.0001" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="27">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@18" Target="@34" Category="CodeSchema_Calls" Bounds="611.208667765868,39.5923231703088,159.210520472959,28.8995889168393" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@18" Target="@36" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@18" Target="@8" Category="CodeSchema_Calls" Bounds="878.600959974503,39.5923231703088,85.7867978767401,27.2733090283265" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@20" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@20" Target="@14" Category="References" Bounds="204.691618762677,-15.4076968296911,77.6822052611645,27.0413231492694" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldWrite" />
</Link>
<Link Source="@20" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="38">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@20" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="644">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
</Link>
<Link Source="@20" Target="@22" Category="Implements" Bounds="377.487330511634,-15.4076968296911,393.785168073055,83.1409131329294" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="14">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@20" Target="@34" Category="CodeSchema_Calls" Bounds="343.055576916522,-15.4076968296911,160.419497946221,80.9456182297448" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="15">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@20" Target="@36" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@20" Target="@8" Category="CodeSchema_Calls" Bounds="397.146399974467,-15.4076968296911,535.107953623816,84.8154742241703" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@22" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@22" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@22" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="61">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@24" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@24" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="50">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@24" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="174">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
</Link>
<Link Source="@24" Target="@22" Category="Implements" Bounds="916.556802322359,39.5923031703088,190.86258302354,30.2520604317136" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@24" Target="@34" Category="CodeSchema_Calls" Bounds="614.127469359678,34.7347340441189,481.835742684543,40.7707166886921" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@24" Target="@8" Category="CodeSchema_Calls" Bounds="1060.40971449464,39.5923031703088,86.3277668845046,27.287572057355" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="17">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@26" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@26" Target="@16" Category="CodeMap_ExternalReference" />
<Link Source="@26" Target="@18" Category="References" Bounds="740.010120057018,-70.407696829691,80.1244263012815,78.693647282406" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="30">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@26" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="274">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@26" Target="@34" Category="CodeSchema_Calls" Bounds="557.563151851199,-70.407696829691,155.250000822899,134.116492857478" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@26" Target="@4" Category="References" Bounds="788.192029148056,-70.407696829691,137.365382243644,28.190615799141" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="93">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@26" Target="@8" Category="CodeSchema_Calls" Bounds="756.399291992188,-70.4076995849609,236.244995117188,133.792484283447" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@28" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@28" Target="@16" Category="CodeMap_ExternalReference" />
<Link Source="@28" Target="@18" Category="References" Bounds="862.864318847656,-70.4078750610352,111.959045410156,79.5487699508667" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="178">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@28" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="836">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@28" Target="@4" Category="InheritsFrom" Bounds="995.282849643794,-70.4078768296912,0,21.0001" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="375">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@30" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@30" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="50">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@30" Target="@18" Category="References" Bounds="929.619018554688,-70.4076995849609,294.267700195313,90.3710823059082" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="409">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@30" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4056">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@30" Target="@34" Category="References" Bounds="580.784362792969,-75.0848846435547,595.315612792969,141.725044250488" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="148">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@30" Target="@4" Category="References" Bounds="1063.86509229375,-70.4076968296912,134.644943135044,28.1576467712241" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1719">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_FunctionPointer" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@30" Target="@8" Category="CodeSchema_Calls" Bounds="1030.08605957031,-70.4076995849609,203.277221679688,133.419734954834" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@32" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="21">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@32" Target="@16" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="27">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@32" Target="@18" Category="References" Bounds="562.737404767764,-70.4076468296911,232.602972483868,82.007435881847" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="159">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@32" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4566">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@32" Target="@34" Category="References" Bounds="527.964668032224,-70.4076468296911,7.14618263660248,131.0133086367" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="16">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldWrite" />
</Link>
<Link Source="@32" Target="@4" Category="References" Bounds="608.918294508263,-73.3137603875161,310.553965403033,36.4966404383574" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="442">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_FunctionPointer" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@34" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="62">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
</Link>
<Link Source="@34" Target="@12" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="35">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@34" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="109">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@34" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3328">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@34" Target="@36" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="256">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@38" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@38" Target="@16" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="36">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@38" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1010">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
</Link>
<Link Source="@38" Target="@34" Category="References" Bounds="150.22184753418,-70.4077987670898,331.791519165039,137.620277404785" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="105">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@4" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@4" Target="@16" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@4" Target="@18" Category="References" Bounds="883.225245941701,-15.4077768296912,76.6031227102411,27.0075603165098" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="51">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@4" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="757">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@4" Target="@22" Category="CodeSchema_Calls" Bounds="883.106811523438,-15.4077768325806,101.791198730469,81.9989786148071" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@4" Target="@34" Category="CodeSchema_Calls" Bounds="578.78515625,-19.1812114715576,349.765502929688,85.6722240447998" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@4" Target="@8" Category="CodeSchema_Calls" Bounds="997.214664313222,-15.4077768296912,11.7617827089631,76.1057911966158" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="277">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@40" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="57">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@40" Target="@12" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@40" Target="@14" Category="References" Bounds="179.000045776367,-329.681030273438,503.777053833008,337.879665374756" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="11">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldWrite" />
</Link>
<Link Source="@40" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="65">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@40" Target="@18" Category="References" Bounds="713.879089355469,-329.681030273438,123.138610839844,335.32311964035" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="262">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@40" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2255">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@40" Target="@20" Category="References" Bounds="346.002136230469,-329.681030273438,348.226806640625,284.518028259277" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@40" Target="@22" Category="CodeMap_ProjectReference" Bounds="713.321899414063,-329.681030273438,111.894226074219,396.801300048828" />
<Link Source="@40" Target="@24" Category="References" Bounds="728.004028320313,-329.681030273438,444.297119140625,336.914263248444" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@40" Target="@26" Category="CodeSchema_Calls" Bounds="708.600390241271,-329.681037662087,17.0567040421854,225.299022435503" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_FieldRead" />
</Link>
<Link Source="@40" Target="@28" Category="CodeSchema_Calls" Bounds="721.521126655273,-329.681037662087,253.209710649498,228.247250814728" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@40" Target="@30" Category="References" Bounds="734.200785479325,-329.681037662087,489.392840664393,230.439304315342" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="159">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@40" Target="@32" Category="CodeSchema_Calls" Bounds="541.118561230698,-329.681037662087,157.83949726457,226.885338936485" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="30">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@40" Target="@34" Category="References" Bounds="546.453369140625,-329.681030273438,157.054382324219,391.205795288086" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="174">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@40" Target="@36" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="53">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@40" Target="@38" Category="CodeMap_ProjectReference" Bounds="172.97463153534,-329.681037662087,507.180864502083,230.548852392546" />
<Link Source="@40" Target="@4" Category="References" Bounds="716.681030273438,-329.681030273438,227.432250976563,286.735664367676" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="94">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@40" Target="@6" Category="References" Bounds="439.620892357381,-329.681037662087,250.081033958105,174.13050481642" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="531">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@40" Target="@8" Category="CodeSchema_Calls" Bounds="715.700317382813,-329.681030273438,276.943969726563,393.065814971924" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="14">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@10" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="160">
<Category Ref="CodeMap_ExternalReference" />
</Link>
<Link Source="@6" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="62">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
</Link>
<Link Source="@6" Target="@18" Category="References" Bounds="472.003936767578,-128.804779052734,327.471954345703,140.071155548096" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="408">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@6" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="15727">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@6" Target="@20" Category="References" Bounds="335.109742286463,-125.407746829691,68.2640214069163,78.2192267496027" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="14">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@22" Category="CodeSchema_Calls" Bounds="417.627166748047,-125.407745361328,377.674652099609,192.010452270508" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@24" Category="References" Bounds="472.267852783203,-133.421508789063,688.196868896484,142.987835884094" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="27">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@26" Category="References" Bounds="471.559983197773,-127.843065649737,175.722377640396,30.8777621608329" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="39">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
</Link>
<Link Source="@6" Target="@28" Category="CodeSchema_Calls" Bounds="472.267849643795,-132.418646206714,426.630634950104,40.3866255770623" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="50">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@30" Category="References" Bounds="472.267852783203,-134.580657958984,696.321868896484,39.9675064086914" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2084">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_FieldWrite" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@6" Target="@32" Category="References" Bounds="439.964621131483,-125.407746829691,53.5441055937274,26.0613377173945" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="675">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@6" Target="@34" Category="CodeSchema_Calls" Bounds="417.627166748047,-125.407745361328,106.234771728516,187.337341308594" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="439">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@6" Target="@36" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="35">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@6" Target="@38" Category="References" Bounds="209.065121652754,-126.7174135201,148.859088996702,29.5568319561882" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="98">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="Implements" />
</Link>
<Link Source="@6" Target="@4" Category="References" Bounds="472.267852783203,-133.421508789063,487.655853271484,89.2535400390625" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="923">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_FieldRead" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="@6" Target="@8" Category="CodeSchema_Calls" Bounds="472.267852783203,-133.421508789063,521.246124267578,196.630668640137" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="138">
<Category Ref="CodeMap_ProjectReference" />
</Link>
<Link Source="@8" Target="@10" Category="CodeMap_ExternalReference" />
<Link Source="@8" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="16">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
<Category Ref="InheritsFrom" />
</Link>
<Link Source="@8" Target="@2" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="487">
<Category Ref="CodeMap_ExternalReference" />
<Category Ref="CodeSchema_AttributeUse" />
<Category Ref="CodeSchema_Calls" />
<Category Ref="CodeSchema_ReturnTypeLink" />
</Link>
<Link Source="_standardGraphExternalsGroup" Target="@10" Category="Contains" />
<Link Source="_standardGraphExternalsGroup" Target="@12" Category="Contains" />
<Link Source="_standardGraphExternalsGroup" Target="@16" Category="Contains" />
<Link Source="_standardGraphExternalsGroup" Target="@2" Category="Contains" />
<Link Source="_standardGraphExternalsGroup" Target="@36" Category="Contains" />
</Links>
<Categories>
<Category Id="CodeMap_ExternalReference" Label="External Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
<Category Id="CodeMap_ProjectReference" Label="Project Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
<Category Id="CodeSchema_Assembly" Label="Assembly" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="Assemblies" />
<Category Id="CodeSchema_AttributeUse" Label="Uses Attribute" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Used by" OutgoingActionLabel="Uses Attribute" />
<Category Id="CodeSchema_Calls" Label="Calls" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Called By" OutgoingActionLabel="Calls" />
<Category Id="CodeSchema_FieldRead" Label="Field Read" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Read By" OutgoingActionLabel="Reads Fields" />
<Category Id="CodeSchema_FieldReference" Label="Field Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References Fields" />
<Category Id="CodeSchema_FieldWrite" Label="Field Write" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Written By" OutgoingActionLabel="Writes Fields" />
<Category Id="CodeSchema_FunctionPointer" Label="Function Pointer" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Function Pointers" OutgoingActionLabel="Function Pointers" />
<Category Id="CodeSchema_ReturnTypeLink" Label="Return" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Return types" OutgoingActionLabel="Return types" />
<Category Id="Contains" Label="Contains" Description="Whether the source of the link contains the target object" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Contained By" IsContainment="True" OutgoingActionLabel="Contains" />
<Category Id="Externals" Label="Externals" CanBeDataDriven="True" IsProviderRoot="False" NavigationActionLabel="Externals" />
<Category Id="File" Label="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="Files" />
<Category Id="FileSystem.Category.FileOfType.dll" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" />
<Category Id="Implements" Label="Implements" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Implemented by" OutgoingActionLabel="Implements" />
<Category Id="InheritsFrom" Label="Inherits From" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Inherited By" OutgoingActionLabel="Inherits From" />
<Category Id="References" Label="References" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
</Categories>
<Properties>
<Property Id="AssemblyTimestamp" DataType="System.DateTime" />
<Property Id="Bounds" DataType="System.Windows.Rect" />
<Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
<Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
<Property Id="CodeSchemaProperty_IsExternal" Label="Is External" Description="Flag indicating whether this node is considered external" DataType="System.Boolean" />
<Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" />
<Property Id="DataVirtualized" Label="Data Virtualized" Description="If true, the graph can contain nodes and links that represent data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
<Property Id="DelayedChildNodesState" Label="Delayed Child Nodes State" Description="Unspecified if the delayed child nodes state is not specified. NotFetched if the group contains child nodes that are not fetched into the graph yet. Fetched if the group has all its delayed child nodes already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
<Property Id="DelayedCrossGroupLinksState" Label="Delayed Cross-Group Links State" Description="Unspecified if the delayed cross-group links state is not specified. NotFetched if delayed cross-group links on this node are not fetched into the graph yet. Fetched if all delayed cross-group links have already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
<Property Id="Expression" DataType="System.String" />
<Property Id="FilePath" Label="File Path" Description="File Path" DataType="System.String" />
<Property Id="FilterState" DataType="System.String" />
<Property Id="Group" Label="Group" Description="Display the node as a group" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
<Property Id="GroupLabel" DataType="System.String" />
<Property Id="Icon" Label="Icon" Description="Icon" DataType="System.String" />
<Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
<Property Id="IsContainment" DataType="System.Boolean" />
<Property Id="IsEnabled" DataType="System.Boolean" />
<Property Id="IsProviderRoot" Label="IsProviderRoot" Description="IsProviderRoot" DataType="System.Boolean" />
<Property Id="IsSourceVirtualized" Label="Link Source Virtualized" Description="If true, the link source end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="IsTargetVirtualized" Label="Link Target Virtualized" Description="If true, the link target end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
<Property Id="Layout" DataType="System.String" />
<Property Id="LayoutSettings" DataType="Microsoft.VisualStudio.Diagrams.View.GroupLayoutStyle" />
<Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
<Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
<Property Id="TargetType" DataType="System.Type" />
<Property Id="UseManualLocation" DataType="System.Boolean" />
<Property Id="Value" DataType="System.String" />
<Property Id="ValueLabel" DataType="System.String" />
<Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
<Property Id="Weight" Label="Weight" Description="Weight" DataType="System.Double" />
<Property Id="ZoomLevel" DataType="System.String" />
</Properties>
<QualifiedNames>
<Name Id="Assembly" Label="Assembly" ValueType="Uri" />
</QualifiedNames>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5.2/mscorlib.dll" />
<Alias n="2" Id="(@1)" />
<Alias n="3" Uri="Assembly=$(58e70872-8acc-4957-bb8e-d3746bcc536d.OutputPathUri)" />
<Alias n="4" Id="(@3)" />
<Alias n="5" Uri="Assembly=$(c9c45b72-05a3-4962-bc13-a78b1f4b1925.OutputPathUri)" />
<Alias n="6" Id="(@5)" />
<Alias n="7" Uri="Assembly=$(f621ce48-bb4b-4cfc-a325-9410b721cc44.OutputPathUri)" />
<Alias n="8" Id="(@7)" />
<Alias n="9" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5.2/System.Core.dll" />
<Alias n="10" Id="(@9)" />
<Alias n="11" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5.2/System.Drawing.dll" />
<Alias n="12" Id="(@11)" />
<Alias n="13" Uri="Assembly=$(30f9a58b-6808-4c93-a294-7267c3d2e7eb.OutputPathUri)" />
<Alias n="14" Id="(@13)" />
<Alias n="15" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5.2/System.dll" />
<Alias n="16" Id="(@15)" />
<Alias n="17" Uri="Assembly=$(f57b954e-a49a-4110-b36c-b5abab3e230b.OutputPathUri)" />
<Alias n="18" Id="(@17)" />
<Alias n="19" Uri="Assembly=$(3a40c700-1d50-4524-affb-0d59f0f0f9cb.OutputPathUri)" />
<Alias n="20" Id="(@19)" />
<Alias n="21" Uri="Assembly=$(884cc30c-2b57-4e06-9650-f55152a9f062.OutputPathUri)" />
<Alias n="22" Id="(@21)" />
<Alias n="23" Uri="Assembly=$(e08382c1-f0b4-44c4-9676-c32fd442228a.OutputPathUri)" />
<Alias n="24" Id="(@23)" />
<Alias n="25" Uri="Assembly=$(53abd0f3-7d8d-43cd-99d7-06c45246d93e.OutputPathUri)" />
<Alias n="26" Id="(@25)" />
<Alias n="27" Uri="Assembly=$(dea48a0b-999e-48e8-8601-cb05b6b765de.OutputPathUri)" />
<Alias n="28" Id="(@27)" />
<Alias n="29" Uri="Assembly=$(d015f93d-9507-4484-977b-4cf1bdc0b30e.OutputPathUri)" />
<Alias n="30" Id="(@29)" />
<Alias n="31" Uri="Assembly=$(14b4a79f-a4b5-4c4c-a041-0105eed82782.OutputPathUri)" />
<Alias n="32" Id="(@31)" />
<Alias n="33" Uri="Assembly=$(d6da1b74-c711-43c2-91b1-1908a8d04dbf.OutputPathUri)" />
<Alias n="34" Id="(@33)" />
<Alias n="35" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5.2/System.Windows.Forms.dll" />
<Alias n="36" Id="(@35)" />
<Alias n="37" Uri="Assembly=$(ae3987f7-c4c6-40fb-a353-1a2dadef7a9a.OutputPathUri)" />
<Alias n="38" Id="(@37)" />
<Alias n="39" Uri="Assembly=$(02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPathUri)" />
<Alias n="40" Id="(@39)" />
</IdentifierAliases>
<Styles>
<Style TargetType="Node" GroupLabel="Results" ValueLabel="True">
<Condition Expression="HasCategory('QueryResult')" />
<Setter Property="Background" Value="#FFBCFFBE" />
</Style>
<Style TargetType="Node" GroupLabel="Test Project" ValueLabel="Test Project">
<Condition Expression="HasCategory('CodeMap_TestProject')" />
<Setter Property="Icon" Value="CodeMap_TestProject" />
<Setter Property="Background" Value="#FF307A69" />
</Style>
<Style TargetType="Node" GroupLabel="Web Project" ValueLabel="Web Project">
<Condition Expression="HasCategory('CodeMap_WebProject')" />
<Setter Property="Icon" Value="CodeMap_WebProject" />
</Style>
<Style TargetType="Node" GroupLabel="Windows Store Project" ValueLabel="Windows Store Project">
<Condition Expression="HasCategory('CodeMap_WindowsStoreProject')" />
<Setter Property="Icon" Value="CodeMap_WindowsStoreProject" />
</Style>
<Style TargetType="Node" GroupLabel="Phone Project" ValueLabel="Phone Project">
<Condition Expression="HasCategory('CodeMap_PhoneProject')" />
<Setter Property="Icon" Value="CodeMap_PhoneProject" />
</Style>
<Style TargetType="Node" GroupLabel="Portable Library" ValueLabel="Portable Library">
<Condition Expression="HasCategory('CodeMap_PortableLibraryProject')" />
<Setter Property="Icon" Value="CodeMap_PortableLibraryProject" />
</Style>
<Style TargetType="Node" GroupLabel="WPF Project" ValueLabel="WPF Project">
<Condition Expression="HasCategory('CodeMap_WpfProject')" />
<Setter Property="Icon" Value="CodeMap_WpfProject" />
</Style>
<Style TargetType="Node" GroupLabel="VSIX Project" ValueLabel="VSIX Project">
<Condition Expression="HasCategory('CodeMap_VsixProject')" />
<Setter Property="Icon" Value="CodeMap_VsixProject" />
</Style>
<Style TargetType="Node" GroupLabel="Modeling Project" ValueLabel="Modeling Project">
<Condition Expression="HasCategory('CodeMap_ModelingProject')" />
<Setter Property="Icon" Value="CodeMap_ModelingProject" />
</Style>
<Style TargetType="Node" GroupLabel="Assembly" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Assembly')" />
<Setter Property="Background" Value="#FF094167" />
<Setter Property="Stroke" Value="#FF094167" />
<Setter Property="Icon" Value="CodeSchema_Assembly" />
</Style>
<Style TargetType="Node" GroupLabel="Namespace" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Namespace')" />
<Setter Property="Background" Value="#FF0E619A" />
<Setter Property="Stroke" Value="#FF0E619A" />
<Setter Property="Icon" Value="CodeSchema_Namespace" />
</Style>
<Style TargetType="Node" GroupLabel="Interface" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Interface')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Interface" />
</Style>
<Style TargetType="Node" GroupLabel="Struct" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Struct')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Struct" />
</Style>
<Style TargetType="Node" GroupLabel="Enumeration" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Enum')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Enum" />
<Setter Property="LayoutSettings" Value="List" />
</Style>
<Style TargetType="Node" GroupLabel="Delegate" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Delegate')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Delegate" />
</Style>
<Style TargetType="Node" GroupLabel="Class" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Type')" />
<Setter Property="Background" Value="#FF0E70C0" />
<Setter Property="Stroke" Value="#FF0E70C0" />
<Setter Property="Icon" Value="CodeSchema_Class" />
</Style>
<Style TargetType="Node" GroupLabel="Property" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Property')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Property" />
</Style>
<Style TargetType="Node" GroupLabel="Method" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Method" />
<Setter Property="LayoutSettings" Value="List" />
</Style>
<Style TargetType="Node" GroupLabel="Event" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Event')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Event" />
</Style>
<Style TargetType="Node" GroupLabel="Field" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Field')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Field" />
</Style>
<Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="Has category">
<Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
<Setter Property="Icon" Value="CodeSchema_OutParameter" />
</Style>
<Style TargetType="Node" GroupLabel="Parameter" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Parameter')" />
<Setter Property="Icon" Value="CodeSchema_Parameter" />
</Style>
<Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
<Setter Property="Icon" Value="CodeSchema_LocalExpression" />
</Style>
<Style TargetType="Node" GroupLabel="Externals" ValueLabel="Has category">
<Condition Expression="HasCategory('Externals')" />
<Setter Property="Background" Value="#FF424242" />
<Setter Property="Stroke" Value="#FF424242" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Inherits From" ValueLabel="True">
<Condition Expression="HasCategory('InheritsFrom')" />
<Setter Property="Stroke" Value="#FF00A600" />
<Setter Property="StrokeDashArray" Value="2 0" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Implements" ValueLabel="True">
<Condition Expression="HasCategory('Implements')" />
<Setter Property="Stroke" Value="#8000A600" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Calls" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_Calls')" />
<Setter Property="Stroke" Value="#FFFF00FF" />
<Setter Property="StrokeDashArray" Value="2 0" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Function Pointer" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FunctionPointer')" />
<Setter Property="Stroke" Value="#FFFF00FF" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Field Read" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FieldRead')" />
<Setter Property="Stroke" Value="#FF00AEEF" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Field Write" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FieldWrite')" />
<Setter Property="Stroke" Value="#FF00AEEF" />
<Setter Property="DrawArrow" Value="true" />
<Setter Property="IsHidden" Value="false" />
</Style>
<Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
<Setter Property="TargetDecorator" Value="OpenArrow" />
</Style>
<Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
<Setter Property="TargetDecorator" Value="OpenArrow" />
</Style>
<Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
<Condition Expression="Source.HasCategory('Comment')" />
<Setter Property="Stroke" Value="#FFE5C365" />
</Style>
<Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsCursorLocation" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="DisabledBreakpointCount" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="EnabledBreakpointCount" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsInstructionPointerLocation" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsCurrentCallstackFrame" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Return" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeSchema_ReturnTypeLink')" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="References" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('References')" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="Uses Attribute" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeSchema_AttributeUse')" />
</Style>
<Style TargetType="Node" GroupLabel="Solution Folder" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeMap_SolutionFolder')" />
<Setter Property="Background" Value="#FFDEBA83" />
</Style>
<Style TargetType="Link" GroupLabel="Project Reference" ValueLabel="Project Reference">
<Condition Expression="HasCategory('CodeMap_ProjectReference')" />
<Setter Property="Stroke" Value="#9A9A9A" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" IsEnabled="false" GroupLabel="External Reference" ValueLabel="External Reference">
<Condition Expression="HasCategory('CodeMap_ExternalReference')" />
<Setter Property="Stroke" Value="#9A9A9A" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
</Styles>
<Paths>
<Path Id="02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\DASFactory\bin\Debug\DASFactory.dll" />
<Path Id="02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/DASFactory/bin/Debug/DASFactory.dll" />
<Path Id="14b4a79f-a4b5-4c4c-a041-0105eed82782.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\TDASCommands\bin\Debug\TDASCommands.dll" />
<Path Id="14b4a79f-a4b5-4c4c-a041-0105eed82782.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/TDASCommands/bin/Debug/TDASCommands.dll" />
<Path Id="30f9a58b-6808-4c93-a294-7267c3d2e7eb.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.IConnection\USBConnection\USBFramework\bin\x86\Debug\HIDFramework.dll" />
<Path Id="30f9a58b-6808-4c93-a294-7267c3d2e7eb.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.IConnection/USBConnection/USBFramework/bin/x86/Debug/HIDFramework.dll" />
<Path Id="3a40c700-1d50-4524-affb-0d59f0f0f9cb.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.IConnection\USBConnection\WINUSBConnection\bin\x86\Debug\WINUSBConnection.dll" />
<Path Id="3a40c700-1d50-4524-affb-0d59f0f0f9cb.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.IConnection/USBConnection/WINUSBConnection/bin/x86/Debug/WINUSBConnection.dll" />
<Path Id="53abd0f3-7d8d-43cd-99d7-06c45246d93e.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\RibeyeCommands\bin\Debug\Ribeye Commands.dll" />
<Path Id="53abd0f3-7d8d-43cd-99d7-06c45246d93e.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/RibeyeCommands/bin/Debug/Ribeye Commands.dll" />
<Path Id="58e70872-8acc-4957-bb8e-d3746bcc536d.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\ICommand\bin\Debug\ICommand.dll" />
<Path Id="58e70872-8acc-4957-bb8e-d3746bcc536d.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/ICommand/bin/Debug/ICommand.dll" />
<Path Id="884cc30c-2b57-4e06-9650-f55152a9f062.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.IConnection\bin\x86\Debug\IConnection.dll" />
<Path Id="884cc30c-2b57-4e06-9650-f55152a9f062.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.IConnection/bin/x86/Debug/IConnection.dll" />
<Path Id="ae3987f7-c4c6-40fb-a353-1a2dadef7a9a.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.DAS.Concepts\bin\x86\Debug\DTS.DAS.Concepts.dll" />
<Path Id="ae3987f7-c4c6-40fb-a353-1a2dadef7a9a.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.DAS.Concepts/bin/x86/Debug/DTS.DAS.Concepts.dll" />
<Path Id="c9c45b72-05a3-4962-bc13-a78b1f4b1925.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\IService\bin\Debug\IService.dll" />
<Path Id="c9c45b72-05a3-4962-bc13-a78b1f4b1925.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/IService/bin/Debug/IService.dll" />
<Path Id="d015f93d-9507-4484-977b-4cf1bdc0b30e.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\SLICECommands\bin\Debug\SLICECommands.dll" />
<Path Id="d015f93d-9507-4484-977b-4cf1bdc0b30e.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/SLICECommands/bin/Debug/SLICECommands.dll" />
<Path Id="d6da1b74-c711-43c2-91b1-1908a8d04dbf.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.Utilities\bin\x86\Debug\DTS.Utilities.dll" />
<Path Id="d6da1b74-c711-43c2-91b1-1908a8d04dbf.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.Utilities/bin/x86/Debug/DTS.Utilities.dll" />
<Path Id="dea48a0b-999e-48e8-8601-cb05b6b765de.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\SLICEDBCommands\bin\Debug\SliceDBCommands.dll" />
<Path Id="dea48a0b-999e-48e8-8601-cb05b6b765de.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/SLICEDBCommands/bin/Debug/SliceDBCommands.dll" />
<Path Id="e08382c1-f0b4-44c4-9676-c32fd442228a.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.IConnection\EthernetConnection\bin\x86\Debug\EthernetConnection.dll" />
<Path Id="e08382c1-f0b4-44c4-9676-c32fd442228a.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.IConnection/EthernetConnection/bin/x86/Debug/EthernetConnection.dll" />
<Path Id="f57b954e-a49a-4110-b36c-b5abab3e230b.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.ICommunication\bin\x86\Debug\ICommunication.dll" />
<Path Id="f57b954e-a49a-4110-b36c-b5abab3e230b.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.ICommunication/bin/x86/Debug/ICommunication.dll" />
<Path Id="f621ce48-bb4b-4cfc-a325-9410b721cc44.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\Common\DTS.Common.DASResource\bin\x86\Debug\DASResource.dll" />
<Path Id="f621ce48-bb4b-4cfc-a325-9410b721cc44.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/Common/DTS.Common.DASResource/bin/x86/Debug/DASResource.dll" />
<Path Id="FxReferenceAssemblies" Value="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework" />
<Path Id="FxReferenceAssembliesUri" Value="file:///C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework" />
</Paths>
</DirectedGraph>

View File

@@ -0,0 +1,286 @@
<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph DataVirtualized="True" Layout="Sugiyama" ZoomLevel="-1" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="(@1)" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 20:39:04" Bounds="-30.9869480142855,-29.2059180261902,129.18,25" CodeSchemaProperty_StrongName="DataPRO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(8baa9433-8034-4fde-822c-537c59d3a7ec.OutputPath)" Group="Collapsed" Label="DataPRO.exe">
<Category Ref="CodeMap_WpfProject" />
<Category Ref="FileSystem.Category.FileOfType.exe" />
</Node>
<Node Id="(@2)" Category="CodeSchema_Assembly" AssemblyTimestamp="12/14/2018 20:38:52" Bounds="4.34194801428541,41.7059180261902,135.89,25" CodeSchemaProperty_StrongName="DASFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPath)" Group="Collapsed" Label="DASFactory.dll" />
</Nodes>
<Links>
<Link Source="(@1)" Target="(@2)" Category="References" Bounds="40.4206779634028,-4.21125706709477,20.738974897069,38.0214539779601" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="62">
<Category Ref="CodeMap_ProjectReference" />
<Category Ref="CodeSchema_Calls" />
</Link>
</Links>
<Categories>
<Category Id="CodeMap_ProjectReference" Label="Project Reference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
<Category Id="CodeMap_WpfProject" Label="WPF Project" CanBeDataDriven="True" IsProviderRoot="False" NavigationActionLabel="WPF Projects" />
<Category Id="CodeSchema_Assembly" Label="Assembly" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="Assemblies" />
<Category Id="CodeSchema_Calls" Label="Calls" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Called By" OutgoingActionLabel="Calls" />
<Category Id="File" Label="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="Files" />
<Category Id="FileSystem.Category.FileOfType.exe" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" />
<Category Id="References" Label="References" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Referenced By" OutgoingActionLabel="References" />
</Categories>
<Properties>
<Property Id="AssemblyTimestamp" DataType="System.DateTime" />
<Property Id="Bounds" DataType="System.Windows.Rect" />
<Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
<Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
<Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" />
<Property Id="DataVirtualized" Label="Data Virtualized" Description="If true, the graph can contain nodes and links that represent data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
<Property Id="DelayedChildNodesState" Label="Delayed Child Nodes State" Description="Unspecified if the delayed child nodes state is not specified. NotFetched if the group contains child nodes that are not fetched into the graph yet. Fetched if the group has all its delayed child nodes already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
<Property Id="DelayedCrossGroupLinksState" Label="Delayed Cross-Group Links State" Description="Unspecified if the delayed cross-group links state is not specified. NotFetched if delayed cross-group links on this node are not fetched into the graph yet. Fetched if all delayed cross-group links have already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
<Property Id="Expression" DataType="System.String" />
<Property Id="FilePath" Label="File Path" Description="File Path" DataType="System.String" />
<Property Id="Group" Label="Group" Description="Display the node as a group" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
<Property Id="GroupLabel" DataType="System.String" />
<Property Id="Icon" Label="Icon" Description="Icon" DataType="System.String" />
<Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
<Property Id="IsEnabled" DataType="System.Boolean" />
<Property Id="IsProviderRoot" Label="IsProviderRoot" Description="IsProviderRoot" DataType="System.Boolean" />
<Property Id="IsSourceVirtualized" Label="Link Source Virtualized" Description="If true, the link source end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="IsTargetVirtualized" Label="Link Target Virtualized" Description="If true, the link target end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
<Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
<Property Id="Layout" DataType="System.String" />
<Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
<Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
<Property Id="TargetType" DataType="System.Type" />
<Property Id="Value" DataType="System.String" />
<Property Id="ValueLabel" DataType="System.String" />
<Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
<Property Id="Weight" Label="Weight" Description="Weight" DataType="System.Double" />
<Property Id="ZoomLevel" DataType="System.String" />
</Properties>
<QualifiedNames>
<Name Id="Assembly" Label="Assembly" ValueType="Uri" />
</QualifiedNames>
<IdentifierAliases>
<Alias n="1" Uri="Assembly=$(8baa9433-8034-4fde-822c-537c59d3a7ec.OutputPathUri)" />
<Alias n="2" Uri="Assembly=$(02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPathUri)" />
</IdentifierAliases>
<Styles>
<Style TargetType="Node" GroupLabel="Results" ValueLabel="True">
<Condition Expression="HasCategory('QueryResult')" />
<Setter Property="Background" Value="#FFBCFFBE" />
</Style>
<Style TargetType="Node" GroupLabel="Test Project" ValueLabel="Test Project">
<Condition Expression="HasCategory('CodeMap_TestProject')" />
<Setter Property="Icon" Value="CodeMap_TestProject" />
<Setter Property="Background" Value="#FF307A69" />
</Style>
<Style TargetType="Node" GroupLabel="Web Project" ValueLabel="Web Project">
<Condition Expression="HasCategory('CodeMap_WebProject')" />
<Setter Property="Icon" Value="CodeMap_WebProject" />
</Style>
<Style TargetType="Node" GroupLabel="Windows Store Project" ValueLabel="Windows Store Project">
<Condition Expression="HasCategory('CodeMap_WindowsStoreProject')" />
<Setter Property="Icon" Value="CodeMap_WindowsStoreProject" />
</Style>
<Style TargetType="Node" GroupLabel="Phone Project" ValueLabel="Phone Project">
<Condition Expression="HasCategory('CodeMap_PhoneProject')" />
<Setter Property="Icon" Value="CodeMap_PhoneProject" />
</Style>
<Style TargetType="Node" GroupLabel="Portable Library" ValueLabel="Portable Library">
<Condition Expression="HasCategory('CodeMap_PortableLibraryProject')" />
<Setter Property="Icon" Value="CodeMap_PortableLibraryProject" />
</Style>
<Style TargetType="Node" GroupLabel="WPF Project" ValueLabel="WPF Project">
<Condition Expression="HasCategory('CodeMap_WpfProject')" />
<Setter Property="Icon" Value="CodeMap_WpfProject" />
</Style>
<Style TargetType="Node" GroupLabel="VSIX Project" ValueLabel="VSIX Project">
<Condition Expression="HasCategory('CodeMap_VsixProject')" />
<Setter Property="Icon" Value="CodeMap_VsixProject" />
</Style>
<Style TargetType="Node" GroupLabel="Modeling Project" ValueLabel="Modeling Project">
<Condition Expression="HasCategory('CodeMap_ModelingProject')" />
<Setter Property="Icon" Value="CodeMap_ModelingProject" />
</Style>
<Style TargetType="Node" GroupLabel="Assembly" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Assembly')" />
<Setter Property="Background" Value="#FF094167" />
<Setter Property="Stroke" Value="#FF094167" />
<Setter Property="Icon" Value="CodeSchema_Assembly" />
</Style>
<Style TargetType="Node" GroupLabel="Namespace" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Namespace')" />
<Setter Property="Background" Value="#FF0E619A" />
<Setter Property="Stroke" Value="#FF0E619A" />
<Setter Property="Icon" Value="CodeSchema_Namespace" />
</Style>
<Style TargetType="Node" GroupLabel="Interface" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Interface')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Interface" />
</Style>
<Style TargetType="Node" GroupLabel="Struct" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Struct')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Struct" />
</Style>
<Style TargetType="Node" GroupLabel="Enumeration" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Enum')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Enum" />
<Setter Property="LayoutSettings" Value="List" />
</Style>
<Style TargetType="Node" GroupLabel="Delegate" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Delegate')" />
<Setter Property="Background" Value="#FF1382CE" />
<Setter Property="Stroke" Value="#FF1382CE" />
<Setter Property="Icon" Value="CodeSchema_Delegate" />
</Style>
<Style TargetType="Node" GroupLabel="Class" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Type')" />
<Setter Property="Background" Value="#FF0E70C0" />
<Setter Property="Stroke" Value="#FF0E70C0" />
<Setter Property="Icon" Value="CodeSchema_Class" />
</Style>
<Style TargetType="Node" GroupLabel="Property" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Property')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Property" />
</Style>
<Style TargetType="Node" GroupLabel="Method" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Method" />
<Setter Property="LayoutSettings" Value="List" />
</Style>
<Style TargetType="Node" GroupLabel="Event" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Event')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Event" />
</Style>
<Style TargetType="Node" GroupLabel="Field" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Field')" />
<Setter Property="Background" Value="#FFE0E0E0" />
<Setter Property="Stroke" Value="#FFE0E0E0" />
<Setter Property="Icon" Value="CodeSchema_Field" />
</Style>
<Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="Has category">
<Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
<Setter Property="Icon" Value="CodeSchema_OutParameter" />
</Style>
<Style TargetType="Node" GroupLabel="Parameter" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_Parameter')" />
<Setter Property="Icon" Value="CodeSchema_Parameter" />
</Style>
<Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="Has category">
<Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
<Setter Property="Icon" Value="CodeSchema_LocalExpression" />
</Style>
<Style TargetType="Node" GroupLabel="Externals" ValueLabel="Has category">
<Condition Expression="HasCategory('Externals')" />
<Setter Property="Background" Value="#FF424242" />
<Setter Property="Stroke" Value="#FF424242" />
</Style>
<Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True">
<Condition Expression="HasCategory('InheritsFrom')" />
<Setter Property="Stroke" Value="#FF00A600" />
<Setter Property="StrokeDashArray" Value="2 0" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="Implements" ValueLabel="True">
<Condition Expression="HasCategory('Implements')" />
<Setter Property="Stroke" Value="#8000A600" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="Calls" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_Calls')" />
<Setter Property="Stroke" Value="#FFFF00FF" />
<Setter Property="StrokeDashArray" Value="2 0" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="Function Pointer" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FunctionPointer')" />
<Setter Property="Stroke" Value="#FFFF00FF" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="Field Read" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FieldRead')" />
<Setter Property="Stroke" Value="#FF00AEEF" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="Field Write" ValueLabel="True">
<Condition Expression="HasCategory('CodeSchema_FieldWrite')" />
<Setter Property="Stroke" Value="#FF00AEEF" />
<Setter Property="DrawArrow" Value="true" />
<Setter Property="IsHidden" Value="false" />
</Style>
<Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
<Setter Property="TargetDecorator" Value="OpenArrow" />
</Style>
<Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
<Setter Property="TargetDecorator" Value="OpenArrow" />
</Style>
<Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
<Condition Expression="Source.HasCategory('Comment')" />
<Setter Property="Stroke" Value="#FFE5C365" />
</Style>
<Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsCursorLocation" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="DisabledBreakpointCount" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="EnabledBreakpointCount" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsInstructionPointerLocation" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="True" Visibility="Hidden">
<Condition Expression="IsCurrentCallstackFrame" />
<Setter Property="IndicatorWest" Value="WestIndicator" />
</Style>
<Style TargetType="Link" GroupLabel="Return" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeSchema_ReturnTypeLink')" />
</Style>
<Style TargetType="Link" GroupLabel="References" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('References')" />
</Style>
<Style TargetType="Link" GroupLabel="Uses Attribute" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeSchema_AttributeUse')" />
</Style>
<Style TargetType="Node" GroupLabel="Solution Folder" ValueLabel="True" Visibility="Hidden">
<Condition Expression="HasCategory('CodeMap_SolutionFolder')" />
<Setter Property="Background" Value="#FFDEBA83" />
</Style>
<Style TargetType="Link" GroupLabel="Project Reference" ValueLabel="Project Reference">
<Condition Expression="HasCategory('CodeMap_ProjectReference')" />
<Setter Property="Stroke" Value="#9A9A9A" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
<Style TargetType="Link" GroupLabel="External Reference" ValueLabel="External Reference">
<Condition Expression="HasCategory('CodeMap_ExternalReference')" />
<Setter Property="Stroke" Value="#9A9A9A" />
<Setter Property="StrokeDashArray" Value="2 2" />
<Setter Property="DrawArrow" Value="true" />
</Style>
</Styles>
<Paths>
<Path Id="02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\DASFactory\bin\Debug\DASFactory.dll" />
<Path Id="02eeba8c-7b22-4bc3-bf3a-8de23eaf2e61.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/DASFactory/bin/Debug/DASFactory.dll" />
<Path Id="8baa9433-8034-4fde-822c-537c59d3a7ec.OutputPath" Value="C:\Users\robert.nelsen\Desktop\DataPro\SourceCode\DataPro_Diagraming\DataPRO\DataPRO\bin\Debug\DataPRO.exe" />
<Path Id="8baa9433-8034-4fde-822c-537c59d3a7ec.OutputPathUri" Value="file:///C:/Users/robert.nelsen/Desktop/DataPro/SourceCode/DataPro_Diagraming/DataPRO/DataPRO/bin/Debug/DataPRO.exe" />
</Paths>
</DirectedGraph>

View File

@@ -0,0 +1,424 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using DTS.DASLib.Connection;
using DTS.DASLib.Service;
using DTS.DASLib.Connection.USBFramework;
using DTS.DASLib.Communication;
using DTS.DASLib.Command.SLICE;
using DTS.DASLib.Command;
using DTS.DASLib.DASResource;
using DTS.DAS.Concepts;
namespace DTS.DASLib.DASFactory
{
internal class HIDHandling: WindowsNotification
{
/// <summary>
/// Timeout in milliseconds to connect an HID device
/// </summary>
public int ConnectHIDTimeout { get; set; }
private IDeviceSetup deviceHandler { get; set; }
#region Registry handling
protected List<String> RegKeys = new List<string>();
protected void ReadRegKeys()
{
try
{
RegKeys.Clear();
ReadHIDRegKeys();
}
catch(System.Exception)
{
// we don't care what is was, an empty list is fine
}
}
protected void ReadHIDRegKeys()
{
// HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\VID_1CB9&PID_0003\6&29dd55fe&0&0000
//RegKeys.Clear();
var ourKey = Microsoft.Win32.Registry.LocalMachine;
var ourName = @"SYSTEM\CurrentControlSet\Enum\HID\" + DTS_VENDOR_ID_STR + "&" + deviceHandler.GetProductIDString();
ourKey = ourKey.OpenSubKey(ourName);
//if ourKey is null, this will throw an exception, but since nothing is done in the current
//exception handler, the old code was just bypassing this code anyhow (when there's an exception)
//6/8/2010 - dtm
if (null != ourKey)
{
foreach (var subKey in ourKey.GetSubKeyNames())
{
RegKeys.Add(subKey);
}
}
}
#endregion
public HIDHandling(DASFactory _factory, UpdateFinishedEventHandler _SerialUpdateFinished, IDeviceSetup _deviceHandler)
: base(_factory, _SerialUpdateFinished, _deviceHandler.GetGuid())
{
deviceHandler = _deviceHandler;
ReadRegKeys();
ConnectHIDTimeout = 1000; // 1000 ms
}
#region HID WinProc's
protected override void NotificationDeviceArrived(ref System.Windows.Forms.Message m)
{
try
{
DTS.Utilities.Logging.APILogger.LogString("HIDArrived: A device has been connected");
// this can either be a HEADS or a SLICE device being connected
// \\?\hid#vid_1cb9&pid_0002#6&29dd55fe&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
var bcdi = (DeviceManagementDeclarations.DEV_BROADCAST_DEVICEINTERFACE)Marshal.PtrToStructure(m.LParam, typeof(DeviceManagementDeclarations.DEV_BROADCAST_DEVICEINTERFACE));
var devNameArr = bcdi.dbcc_name.Split('#');
var foundKey = RegKeys.Find(delegate(String ss) { return ss == devNameArr[2]; });
if(foundKey != null)
{
SerialUpdateActionQueue.EnqueueConnect();
}
else
{
ReadRegKeys();
}
}
catch(System.Exception ex)
{
DTS.Utilities.Logging.APILogger.LogString("HIDArrived caught an exception: " + ex.Message + " " + ex.StackTrace);
MessageBox.Show("HIDArrived caught an exception: " + ex.Message + " " + ex.StackTrace, "Error");
}
finally
{
DTS.Utilities.Logging.APILogger.LogString("HIDArrived: Exit");
}
}
protected override void NotificationDeviceRemoved(ref System.Windows.Forms.Message m)
{
try
{
DTS.Utilities.Logging.APILogger.LogString("HIDRemoved: A device has been disconnected");
//var bcdi2 = (DeviceManagementDeclarations.DEV_BROADCAST_DEVICEINTERFACE)Marshal.PtrToStructure(m.LParam, typeof(DeviceManagementDeclarations.DEV_BROADCAST_DEVICEINTERFACE));
SerialUpdateActionQueue.EnqueueDisconnect();
}
catch(System.Exception ex)
{
DTS.Utilities.Logging.APILogger.LogString("HIDRemoved caught an exception: " + ex.Message + " " + ex.StackTrace);
MessageBox.Show("HIDRemoved caught an exception: " + ex.Message + " " + ex.StackTrace, "Error");
}
finally
{
DTS.Utilities.Logging.APILogger.LogString("HIDRemoved: Exit");
}
}
#endregion
protected override void UpdateDisconnectedDevices()
{
ConnectNewDevices(new GetDeviceStrings(delegate() { return GetListOfConnectedHIDDevices(); }),
new GetDeviceStrings(delegate() { return GetConnectedStrings(); }),
new GetICommunication(delegate() { return deviceHandler.GetICommunication(); }),
new GetIConnectedDevice(delegate(ICommunication comm) { return deviceHandler.GetIConnectedDevice(comm); }),
deviceHandler.GetDASType(),
deviceHandler,
ConnectHIDTimeout);
}
protected override void UpdateConnectedDevices()
{
DisconnectRemovedDevices(new GetDeviceStrings(delegate()
{
return GetListOfConnectedHIDDevices();
}),
new DASTypeFilter(delegate(ConnectedDevice dev)
{
return deviceHandler.IsCorrectType(dev);
}),
new ConnectedDevice2Communication(delegate(ConnectedDevice dev)
{
return deviceHandler.GetICommunication(dev);
}),
deviceHandler.GetDASType(),
ConnectHIDTimeout);
}
#region Connection functions
private List<string> GetAllHIDDevices()
{
string[] AllHIDDevicePathNames = new string[128];
try
{
// Fill an array with the device path names of all attached HIDs.
if(!MyDeviceManagement.FindDeviceFromGuid(deviceHandler.GetGuid(), ref AllHIDDevicePathNames))
{
return null;
}
}
catch
{
return null;
}
// loop thru the array and copy the new ones (that actually contain something)
// over to the list newNames
List<string> newNames = new List<string>();
for(int i = 0; i < AllHIDDevicePathNames.Length; i++)
{
if(string.IsNullOrEmpty(AllHIDDevicePathNames[i]))
continue;
// protect against windows giving us more than one of the same
if(newNames.Find(delegate(String str) { return str.Equals(AllHIDDevicePathNames[i], StringComparison.OrdinalIgnoreCase); }) == null)
{
// no, we haven't added it yet so do it now
newNames.Add(AllHIDDevicePathNames[i]);
}
}
return newNames;
}
private int OpenDevicePath(string devicePath)
{
int devHandle;
try
{
devHandle = FileIODeclarations.CreateFile(devicePath,
0,
FileIODeclarations.FILE_SHARE_READ | FileIODeclarations.FILE_SHARE_WRITE,
ref Security,
FileIODeclarations.OPEN_EXISTING,
0,
0);
}
catch
{
return FileIODeclarations.INVALID_HANDLE_VALUE;
}
return devHandle;
}
private List<string> FilterHIDDeviceList(List<string> newNames, int vid, int pid)
{
if(newNames == null || newNames.Count == 0)
{
return null;
}
// now we have a list of new unique devices, make a new list containing only the ones that are of the right type
List<string> newRecorderNames = new List<string>();
foreach(string devicePath in newNames)
{
try
{
int devHandle = OpenDevicePath(devicePath);
if(devHandle == FileIODeclarations.INVALID_HANDLE_VALUE)
{
continue;
}
HIDevice deviceHID = new HIDevice();
// Set the Size property of DeviceAttributes to the number of bytes in the structure.
deviceHID.DeviceAttributes.Size = Marshal.SizeOf(deviceHID.DeviceAttributes);
int Result = HIDDeclarations.HidD_GetAttributes(devHandle, ref deviceHID.DeviceAttributes);
if(Result == 0)
{
// There was a problem in retrieving the information.
FileIODeclarations.CloseHandle(devHandle);
continue;
}
// Find out if the device matches the one we're looking for.
if(deviceHID.DeviceAttributes.VendorID != vid ||
deviceHID.DeviceAttributes.ProductID != pid)
{
// It's not a match, so close the handle.
FileIODeclarations.CloseHandle(devHandle);
continue;
}
// we don't need this handle anymore
FileIODeclarations.CloseHandle(devHandle);
// it's a new one
newRecorderNames.Add(devicePath);
}
catch
{
// ignore it, try the next one
}
}
return newRecorderNames;
}
private List<string> GetListOfConnectedHIDDevices()
{
var newNames = GetAllHIDDevices();
if(newNames == null || newNames.Count == 0)
{
return null;
}
// now we have a list of new unique devices, make a new list containing only the ones that are of the right type
List<string> newRecorderNames;
try
{
newRecorderNames = FilterHIDDeviceList(newNames, DTS_VENDOR_ID, deviceHandler.GetProductID());
}
catch
{
return null;
}
return newRecorderNames;
}
#endregion
/*
#region HID update (not updated yet to separate callbacks)
private bool UpdateConnectedHID()
{
bool devicesFound = false;
try
{
DTS.Utilities.Logging.APILogger.LogString("UpdateConnectedHID: Enter");
// get a list of SLICE units currently connected thru HID
var ConnectedHIDSlices = GetListOfConnectedHIDSlices();
devicesFound = (null != ConnectedHIDSlices && ConnectedHIDSlices.Count > 0);
if(devicesFound)
{
// subtract the ones we already know about
var NewHIDSlices = ConnectedHIDSlices.Except(GetConnectedStrings());
// add the new ones
foreach(var devPath in NewHIDSlices)
{
var newHIDSlice = new HIDUSBSlice();
var newConnectedHIDSlice = new ConnectedHIDSlice(newHIDSlice);
// try to connect it
newHIDSlice.Connect(devPath,
ConnectHIDCallback,
new DeviceAndWaitTuple(newConnectedHIDSlice, null),
ConnectHIDTimeout);
}
// now see if we have to remove any
IEnumerable<ConnectedDevice> DevicesToRemove;
lock(ConnectedDevicesLock)
{
DevicesToRemove = from dev in ConnectedDevices
where !ConnectedHIDSlices.Contains(dev.dev.ConnectString)
select dev;
}
// each one in this list must be disconnected
foreach(var dev in DevicesToRemove)
{
// this is one of those places where we need to get to the ICommunication part
((dev.dev as IConnectedDAS).Comm as ICommunication).Disconnect(false,
ConnectHIDCallback,
new DeviceAndWaitTuple(dev, null),
ConnectHIDTimeout);
}
}
return devicesFound;
}
catch(System.Exception ex)
{
DTS.Utilities.Logging.APILogger.LogString(string.Format("DASFactory.UpdateConnectedHID: Exception {0} at {1}", ex.Message, ex.StackTrace));
MessageBox.Show(string.Format("DASFactory.UpdateConnectedHID: Exception {0} at {1}", ex.Message, ex.StackTrace));
return false;
}
finally
{
DTS.Utilities.Logging.APILogger.LogString("UpdateConnectedWinUSB: Exit");
}
return devicesFound;
}
// this is our callback for both connect and disconnect
private bool ConnectHIDCallback(ICommunicationReport report)
{
Debug.Assert(report.UserState is DeviceAndWaitTuple);
var DeviceParameter = (report.UserState as DeviceAndWaitTuple).Device;
var newHidUSB = DeviceParameter as ConnectedDevice;
ConnectedDevice newDev;
if(null != newHidUSB)
{
newDev = newHidUSB;
}
else
{
newDev = new ConnectedDevice();
newDev.dev = DeviceParameter as IConnectedDevice;
newDev.dastype = ConnectedDevice.DASType.HID_SLICE;
// assume not in update mode
newDev.InUpdateMode = false;
}
if(report.Result == CommunicationResult.ConnectOK)
{
// fill the DASInfo
var SliceInfoOK = sliceHandler.QueryInformation(newDev);
// add it to our list
lock(ConnectedDevicesLock)
{
ConnectedDevices.Add(newDev);
}
// notify our subscribers
if(!SliceInfoOK)
{
factory.ReportFailed();
}
else
{
factory.ReportArrived();
}
}
else if(report.Result == CommunicationResult.DisconnectOK)
{
// first dispose of it
newDev.Dispose();
// remove it from our list
lock(ConnectedDevicesLock)
{
ConnectedDevices.Remove(newDev);
}
// notify our subscribers
factory.ReportRemoved();
}
else
{
// first dispose of it
newDev.Dispose();
factory.ReportFailed();
}
return true;
}
#endregion
*/
}
}

View File

@@ -0,0 +1,208 @@
using System;
using System.Collections.Concurrent;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using DTS.Common.USBFramework;
using DTS.Common.Utilities.Logging;
namespace DTS.DASLib.DASFactory
{
internal abstract class WindowsNotification : DeviceHandling
{
protected FileIODeclarations.SECURITY_ATTRIBUTES Security;
protected DeviceManagement MyDeviceManagement;
protected Guid DeviceGuid = Guid.Empty;
/// <summary>
/// Handle of the window which receives messages from Windows. This will be a form.
/// </summary>
protected IntPtr RecipientHandle;
protected IntPtr DeviceNotifyHandle;
protected NotificationForm NotificationWindow;
protected WindowsNotification(DASFactory _factory,
UpdateFinishedEventHandler _SerialUpdateFinished,
Guid _guid,
BlockingCollection<Tuple<QueueActions, DeviceHandling>> queueActionPerDevice
)
: base(_factory, _SerialUpdateFinished, queueActionPerDevice)
{
MyDeviceManagement = new DeviceManagement();
Security = new FileIODeclarations.SECURITY_ATTRIBUTES
{
lpSecurityDescriptor = 0,
bInheritHandle = Convert.ToInt32(true)
};
Security.nLength = Marshal.SizeOf(Security);
DeviceGuid = _guid;
NotificationWindow = new NotificationForm(NotificationWndProc);
NotificationWindow.Show(); // will be hidden immediately
DeviceNotifyHandle = IntPtr.Zero;
RecipientHandle = NotificationWindow.Handle;
if (!MyDeviceManagement.RegisterForDeviceNotifications(RecipientHandle,
DeviceGuid,
ref DeviceNotifyHandle))
{
throw new Exception("DASFactory.WindowsNotification: Unable to register device");
}
}
public override void Dispose()
{
if (DeviceNotifyHandle != IntPtr.Zero)
{
MyDeviceManagement.StopReceivingDeviceNotifications(DeviceNotifyHandle);
}
try
{
/*if (null != NotificationWindow)
{
if (NotificationWindow.InvokeRequired)
{
NotificationWindow.Invoke(new Action(() =>
{
if (NotificationWindow.IsHandleCreated)
{
NotificationWindow.Close();
NotificationWindow.Dispose();
NotificationWindow = null;
}
}));
}
else
{
if (NotificationWindow.IsHandleCreated)
{
NotificationWindow.Close();
NotificationWindow.Dispose();
NotificationWindow = null;
}
}
}*/
/* Cross-thread operation not valid: Control 'NotificationForm' accessed from a thread other than the thread it was created on. */
//NotificationWindow.Close();
}
catch (Exception ex) { APILogger.Log(ex.Message); }
base.Dispose();
}
/// <summary>
/// This gets called whenever anything happens to WinUSB devices
/// </summary>
/// <param name="m">The windows message</param>
protected virtual void NotificationWndProc(ref Message m)
{
//we detect the media arrival event
if (m.Msg != DeviceManagementDeclarations.WM_DEVICECHANGE)
{
return;
}
if (m.WParam.ToInt32() == DeviceManagementDeclarations.DBT_DEVICEARRIVAL)
{
if (Marshal.ReadInt32(m.LParam, 4) == DeviceManagementDeclarations.DBT_DEVTYP_DEVICEINTERFACE)
{
NotificationDeviceArrived(ref m);
}
}
else
{
if (m.WParam.ToInt32() == DeviceManagementDeclarations.DBT_DEVICEREMOVECOMPLETE)
{
if (Marshal.ReadInt32(m.LParam, 4) == DeviceManagementDeclarations.DBT_DEVTYP_DEVICEINTERFACE)
{
NotificationDeviceRemoved(ref m);
}
}
}
}
protected abstract void NotificationDeviceArrived(ref Message m);
protected abstract void NotificationDeviceRemoved(ref Message m);
/// <summary>
/// Hidden Form which we use to receive Windows messages
/// </summary>
internal class NotificationForm : Form
{
public delegate void WinMsgProc(ref Message m);
private Label label1;
private readonly WinMsgProc mDetector;
/// <summary>
/// Set up the hidden form.
/// </summary>
/// <param name="detector">DriveDetector object which will receive notification about USB drives, see WndProc</param>
public NotificationForm(WinMsgProc detector)
{
mDetector = detector;
MinimizeBox = false;
MaximizeBox = false;
ShowInTaskbar = false;
ShowIcon = false;
FormBorderStyle = FormBorderStyle.FixedToolWindow;
Load += Load_Form;
Activated += Form_Activated;
}
private void Load_Form(object sender, EventArgs e)
{
// We don't really need this, just to display the label in designer ...
InitializeComponent();
// Create really small form, invisible anyway.
Size = new Size(5, 5);
}
private void Form_Activated(object sender, EventArgs e)
{
//this.Visible = false;
}
/// <summary>
/// This function receives all the windows messages for this window (form).
/// We call the DASFactory from here so that is can pick up the messages
/// </summary>
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (mDetector != null)
{
mDetector(ref m);
}
}
private void InitializeComponent()
{
label1 = new Label();
SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(13, 30);
label1.Name = "label1";
label1.Size = new Size(314, 13);
label1.TabIndex = 0;
label1.Text = @"This is an invisible form.";
//
// DetectorForm
//
ClientSize = new Size(360, 80);
Controls.Add(label1);
Name = "NotificationForm";
Opacity = 0;
ResumeLayout(false);
PerformLayout();
}
}
}
}

View File

@@ -0,0 +1,126 @@
using DTS.Common.Enums.DASFactory;
using DTS.Common.Interface.DASFactory;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace DTS.DASLib.DASFactory
{
internal class AutoDiscovery
{
private readonly IDASFactory _dasFactory;
/// <summary>
/// this is the task that is actively looking for UDP devices
/// </summary>
private Task _scanTask = null;
/// <summary>
/// this is the cancellation token source for the cancel token used by the scan task
/// </summary>
private CancellationTokenSource tokenSource = new CancellationTokenSource();
/// <summary>
/// this is a lock used to make start/stop and Get thread safe
/// </summary>
private static readonly object _multicastLock = new object();
/// <summary>
/// starts a background discovery process
/// </summary>
public void StartMulticastAutoDiscovery()
{
lock (_multicastLock)
{
//start scanning (unless we are already scanning)
if (null == _scanTask || _scanTask.IsCompleted)
{
if (tokenSource.IsCancellationRequested)
{
tokenSource.Dispose();
// token has been cancelled. no "reset" other than creating a new token source
tokenSource = new CancellationTokenSource();
}
_scanTask = Task.Run(() => DiscoveryWork(null, tokenSource.Token, false));
}
}
}
/// <summary>
/// stops a background discovery process
/// </summary>
public void StopMulticastAutoDiscovery()
{
lock (_multicastLock)
{
//stop scanning (unless it's not currently scanning)
if (null == _scanTask || _scanTask.IsCompleted) { return; }
if (tokenSource.Token.CanBeCanceled)
{
tokenSource.Cancel();
}
}
_scanTask.Wait();
_scanTask = null;
}
/// <summary>
/// list of any discovered devices since discovery started
/// </summary>
private readonly List<IDiscoveredDevice> _discoveredDevices = new List<IDiscoveredDevice>();
/// <summary>
/// this is the actual discovery thread
/// </summary>
/// <param name="deviceFilter"></param>
/// <param name="ct"></param>
/// <param name="discoverParents"></param>
private void DiscoveryWork(DFConstantsAndEnums.MultiCastDeviceClasses[] deviceFilter, CancellationToken ct, bool discoverParents = true)
{
var keepGoing = !ct.IsCancellationRequested;
ClearDiscoveredDevices();
while (keepGoing)
{
var discoveries = _dasFactory.AutoDiscoverMulticast(ct, discoverParents).ToArray();
var filteredDiscoveries = deviceFilter?.Count() > 0 ? discoveries.Where(x => deviceFilter.Contains(x.DevClass)).ToArray() : discoveries;
UpdateDevices(filteredDiscoveries);
ct.WaitHandle.WaitOne(1000);
keepGoing = !ct.IsCancellationRequested;
}
}
/// <summary>
/// adds any new devices to list of devices
/// does not change any existing entries
/// </summary>
/// <param name="devices"></param>
private void UpdateDevices(IDiscoveredDevice[] devices)
{
lock (_multicastLock)
{
foreach (var device in devices)
{
if (!_discoveredDevices.Exists(x => x.Serial == device.Serial))
{
_discoveredDevices.Add(device);
}
}
}
}
/// <summary>
/// clears any discovered devices
/// </summary>
private void ClearDiscoveredDevices()
{
lock (_multicastLock) { _discoveredDevices.Clear(); }
}
/// <summary>
/// retrieves all discovered devices
/// </summary>
/// <returns></returns>
public IDiscoveredDevice[] GetDiscoveredDevices()
{
lock (_multicastLock) { return _discoveredDevices.ToArray(); }
}
public AutoDiscovery(IDASFactory dasFactory)
{
_dasFactory = dasFactory;
}
}
}

View File

@@ -0,0 +1,169 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DTS.Common.DASResource;
using DTS.Common.Utilities.Logging;
namespace DTS.DASLib.DASFactory
{
internal class WinUSBHandling : WindowsNotification
{
/// <summary>
/// Timeout in milliseconds to connect an WinUSB device
/// </summary>
public int ConnectWinUSBTimeout { get; set; }
private IDeviceSetup deviceHandler { get; set; }
public WinUSBHandling(DASFactory _factory, UpdateFinishedEventHandler _SerialUpdateFinished, IDeviceSetup _deviceHandler, BlockingCollection<Tuple<QueueActions, DeviceHandling>> queueActionPerDevice)
: base(_factory, _SerialUpdateFinished, _deviceHandler.GetGuid(), queueActionPerDevice)
{
deviceHandler = _deviceHandler;
ConnectWinUSBTimeout = 60000; // 1000 ms
}
#region WinUSB WinProc's
/// <summary>
/// This gets called whenever a WinUSB devices connects
/// </summary>
/// <param name="m">The windows message</param>
protected override void NotificationDeviceArrived(ref Message m)
{
try
{
// \\?\hid#vid_1cb9&pid_0002#6&29dd55fe&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
APILogger.LogString("WinUSBArrived: A device has been connected");
EnqueueConnect();
}
catch (Exception ex)
{
APILogger.Log("MessageBox", Strings.DASFactory_WinUSBArrivedFailed, ex);
}
finally
{
APILogger.LogString("WinUSBArrived: Exit");
}
}
/// <summary>
/// This gets called whenever a WinUSB devices disconnectes
/// </summary>
/// <param name="m">The windows message</param>
protected override void NotificationDeviceRemoved(ref Message m)
{
try
{
APILogger.LogString("WinUSBRemoved: A device has been disconnected");
EnqueueDisconnect();
}
catch (Exception ex)
{
APILogger.Log("MessageBox", Strings.DASFactory_WinUSBRemovedFailed, ex);
}
finally
{
APILogger.LogString("WinUSBRemoved: Exit");
}
}
#endregion
#region Connect
/// <summary>
/// Throw an exception if currently connected WinUSB devices contains duplicate dev paths.
/// </summary>
private void CheckForConnectedWinUSBDups()
{
// get a list of units currently connected thru WINUSB
var ConnectedWinUSBDevices = GetListOfConnectedDevices();
if (ConnectedWinUSBDevices.Count != ConnectedWinUSBDevices.Distinct().Count())
{
var dupList = new StringBuilder();
foreach (var s in ConnectedWinUSBDevices)
{
dupList.AppendLine(s);
}
var msg = "CheckForConnectedWinUSBDups: Connected WinUSB contain duplicates" + Environment.NewLine + dupList;
APILogger.LogString(msg);
throw new Exception("CheckForConnectedWinUSBDups: Connected WinUSB contain duplicates");
}
}
private List<string> GetListOfConnectedDevices()
{
var newNames = new List<string>();
var AllWinUSBDevicePathNames = new string[128];
try
{
// Fill an array with the device path names of all attached HIDs.
if (!MyDeviceManagement.FindDeviceFromGuid(deviceHandler.GetGuid(), ref AllWinUSBDevicePathNames))
{
return newNames;
}
}
catch
{
return newNames;
}
// loop thru the array and copy the new ones (that actually contain something)
// over to the list newNames
foreach (var t in AllWinUSBDevicePathNames)
{
if (string.IsNullOrEmpty(t))
continue;
// protect against windows giving us more than one of the same
if (newNames.Find(str => str.Equals(t, StringComparison.OrdinalIgnoreCase)) == null)
{
// no, we haven't added it yet so do it now
newNames.Add(t);
}
}
return newNames;
}
public override void UpdateConnectedDevices()
{
ConnectNewDevices(delegate
{
// make sure the connected ones are OK
CheckForConnectedWinUSBDups();
// get a list of units currently connected thru WINUSB
return GetListOfConnectedDevices();
},
GetConnectedStrings,
() => deviceHandler.GetICommunication(),
comm => deviceHandler.GetIConnectedDevice(comm),
deviceHandler.GetDASType(),
deviceHandler,
ConnectWinUSBTimeout);
}
#endregion
#region Disconnect
public override void UpdateDisconnectedDevices()
{
DisconnectRemovedDevices(GetListOfConnectedDevices,
dev => deviceHandler.IsCorrectType(dev),
dev => deviceHandler.GetICommunication(dev),
deviceHandler.GetDASType(),
ConnectWinUSBTimeout);
}
#endregion
public override void UpdateDeviceSetups()
{
deviceHandler.SetHandler(this);
}
}
}

View File

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{02EEBA8C-7B22-4BC3-BF3A-8DE23EAF2E61}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DASFactory</RootNamespace>
<AssemblyName>DASFactory</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Prism">
<HintPath>..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DASFactory.SPFD.cs" />
<Compile Include="DASFactory.AutoDiscovery.cs" />
<Compile Include="DASFactory.CDCUSB.cs" />
<Compile Include="DASFactory.Basic.cs" />
<Compile Include="DASFactory.cs">
</Compile>
<Compile Include="DASFactory.Ethernet.cs" />
<Compile Include="DASFactory.Ribeye.cs" />
<Compile Include="DASFactory.SerialTDAS.cs" />
<Compile Include="DASFactory.Slice.cs" />
<Compile Include="DASFactory.TDAS.cs" />
<Compile Include="DASFactory.WindowsNotification.cs" />
<Compile Include="DASFactory.WinUSB.cs" />
<Compile Include="DistributorSocket.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\DTS.Common.DAS.Concepts\DTS.Common.DAS.Concepts.csproj">
<Project>{ae3987f7-c4c6-40fb-a353-1a2dadef7a9a}</Project>
<Name>DTS.Common.DAS.Concepts</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.DASResource\DTS.Common.DASResource.csproj">
<Project>{f621ce48-bb4b-4cfc-a325-9410b721cc44}</Project>
<Name>DTS.Common.DASResource</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.ICommunication\DTS.Common.ICommunication.csproj">
<Project>{f57b954e-a49a-4110-b36c-b5abab3e230b}</Project>
<Name>DTS.Common.ICommunication</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\EthernetConnection\DTS.Common.EthernetConnection.csproj">
<Project>{e08382c1-f0b4-44c4-9676-c32fd442228a}</Project>
<Name>DTS.Common.EthernetConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\SerialConnection\DTS.Common.SerialConnection.csproj">
<Project>{d485515c-366a-4d14-83da-585fc4007461}</Project>
<Name>DTS.Common.SerialConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\USBConnection\USBFramework\DTS.Common.USBFramework.csproj">
<Project>{30f9a58b-6808-4c93-a294-7267c3d2e7eb}</Project>
<Name>DTS.Common.USBFramework</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\USBConnection\WINUSBConnection\DTS.Common.WINUSBConnection.csproj">
<Project>{3a40c700-1d50-4524-affb-0d59f0f0f9cb}</Project>
<Name>DTS.Common.WINUSBConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.SharedResource\DTS.Common.SharedResource.csproj">
<Project>{C01E723F-86E2-403A-864C-9F56BDB60B8D}</Project>
<Name>DTS.Common.SharedResource</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
<Project>{d6da1b74-c711-43c2-91b1-1908a8d04dbf}</Project>
<Name>DTS.Common.Utilities</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common\DTS.Common.csproj">
<Project>{F7A0804F-61A4-40AE-83D0-F1137622B592}</Project>
<Name>DTS.Common</Name>
</ProjectReference>
<ProjectReference Include="..\CANFDApiProxy\CANFDApiProxy.csproj">
<Project>{0A42EE20-660C-468D-9511-C32C9037CB15}</Project>
<Name>CANFDApiProxy</Name>
</ProjectReference>
<ProjectReference Include="..\DASFactoryDb\DASFactoryDb.csproj">
<Project>{49c60032-9c8a-4ea5-9e26-2f1663555759}</Project>
<Name>DASFactoryDb</Name>
</ProjectReference>
<ProjectReference Include="..\ICommand\ICommand.csproj">
<Project>{58e70872-8acc-4957-bb8e-d3746bcc536d}</Project>
<Name>ICommand</Name>
</ProjectReference>
<ProjectReference Include="..\IService\IService.csproj">
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
<Name>IService</Name>
</ProjectReference>
<ProjectReference Include="..\RibeyeCommands\RibeyeCommands.csproj">
<Project>{53abd0f3-7d8d-43cd-99d7-06c45246d93e}</Project>
<Name>RibeyeCommands</Name>
</ProjectReference>
<ProjectReference Include="..\SLICECommands\SLICECommands.csproj">
<Project>{d015f93d-9507-4484-977b-4cf1bdc0b30e}</Project>
<Name>SLICECommands</Name>
</ProjectReference>
<ProjectReference Include="..\SLICEDBCommands\SliceDBCommands.csproj">
<Project>{dea48a0b-999e-48e8-8601-cb05b6b765de}</Project>
<Name>SliceDBCommands</Name>
</ProjectReference>
<ProjectReference Include="..\TDASCommands\TDASCommands.csproj">
<Project>{14b4a79f-a4b5-4c4c-a041-0105eed82782}</Project>
<Name>TDASCommands</Name>
</ProjectReference>
<ProjectReference Include="..\TiltMIF\TiltMIF.csproj">
<Project>{774C0FAA-9491-43D8-9709-C6076F913629}</Project>
<Name>TiltMIF</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="Design\ClassDiagram_DasFactory.cd" />
<None Include="Design\Graph_ProjectReferences.dgml" />
<None Include="Design\Graph_ReferencesThisProject.dgml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,306 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="DTS.DASLib.DASFactory.ConnectedBaseDevice" Collapsed="true">
<Position X="14" Y="0.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAACAAAgAEAAAAIAAAAAAAAAAEAAAAAABAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedWinUSBSlice" Collapsed="true">
<Position X="10.75" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedCDCUSBSlice" Collapsed="true">
<Position X="15.25" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedWinUSBSlice1_5" Collapsed="true">
<Position X="19.75" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedWinUSBSlice6" Collapsed="true">
<Position X="24.25" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSlice" Collapsed="true">
<Position X="1.75" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSlice2" Collapsed="true">
<Position X="6.25" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSlice1_5" Collapsed="true">
<Position X="8.5" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSlice6" Collapsed="true">
<Position X="13" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSlice6DB" Collapsed="true">
<Position X="17.5" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetSDB" Collapsed="true">
<Position X="22" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetTDAS" Collapsed="true">
<Position X="26.5" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedEthernetRibeye" Collapsed="true">
<Position X="4" Y="1.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedWinUSBTSR2" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="30.75" Y="0.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAACAAAgAEAAAAIAAAAAAAAAAAAAAAAABAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="DTS.DASLib.DASFactory.ConnectedDevice" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="29" Y="0.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAACAAAASEACAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="DTS.DASLib.DASFactory.DeviceHandling" Collapsed="true">
<Position X="4" Y="7.5" Width="2" />
<TypeIdentifier>
<HashCode>FAAAAAAAASQAAAQAIAGEQAUAwCJAAAAAcBAYAQAACAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.CDCUSBHandling" Collapsed="true">
<Position X="5.25" Y="10.25" Width="2" />
<TypeIdentifier>
<HashCode>DIAAAAABAgAAAAAAAAAAAAACgBAAAAAAAAAQAAAAAAA=</HashCode>
<FileName>DASFactory.CDCUSB.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.DASFactoryEventArgs" Collapsed="true">
<Position X="29" Y="1.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.SingletonFaultException" Collapsed="true">
<Position X="29" Y="2.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.DASFactory" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="32.5" Y="0.5" Width="2" />
<TypeIdentifier>
<HashCode>oQAKSAAMiCxAICQBgAAAhiCJAMAIgAAEQBACb2BAAQQ=</HashCode>
<FileName>DASFactory.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetHandling" Collapsed="true">
<Position X="0.75" Y="8.75" Width="2" />
<TypeIdentifier>
<HashCode>ZQEIDAgGACAgCEUCGAABAAAQsAhgAUmQYRQQIBAkIEA=</HashCode>
<FileName>DASFactory.Ethernet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.RibeyeHandling" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="32.5" Y="1.5" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAABEAAAAAKAAAAAAAAACAAAAAAAAAASAAAAAABE=</HashCode>
<FileName>DASFactory.Ribeye.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="DTS.DASLib.DASFactory.SliceHandling" Collapsed="true">
<Position X="7.75" Y="3.5" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAABEAAAAAKAAAAEIAAACgAoAAAIAgASAEAACgBE=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DTS.DASLib.DASFactory.WinUSBSliceHandling" Collapsed="true">
<Position X="14.5" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAAACAAAAAAAAACAAAAAAAEAAQAAAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.WinUSBSlice2Handling" Collapsed="true">
<Position X="1" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAAACAAAAAAAAAGAAgAAAAAAgSACAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.WinUSBSlice6Handling" Collapsed="true">
<Position X="4.5" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAACCAAAAAAAAACAAgAAAAAIASACAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.WinUSBSlice1_5Handling" Collapsed="true">
<Position X="7.75" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAABAAAACAAAAAAAAACAAgAAAAAAASACAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetSliceHandling" Collapsed="true">
<Position X="10" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKBAAAAAAAAAACAAAAAAAAACAAAAAAAAAAQAAAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetSlice2Handling" Collapsed="true">
<Position X="12.25" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AKBAAAAAAAAAACAAAAAAAAACAAgAAAAAAASAAAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetSlice6Handling" Collapsed="true">
<Position X="3.25" Y="6.25" Width="2" />
<TypeIdentifier>
<HashCode>AKBIAAAAAAAAACAAAAAAAAACAAgAAAAAAASACAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetSlice6DBHandling" Collapsed="true">
<Position X="5.5" Y="6.25" Width="2" />
<TypeIdentifier>
<HashCode>AKBAAAAAAAAAACAAAAAAAAAiAAgAAAAAAASACAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetSlice1_5Handling" Collapsed="true">
<Position X="7.75" Y="6.25" Width="2" />
<TypeIdentifier>
<HashCode>AKBAAAAAAAAAACAAAAAAAAACAAgAAAAAAASAAAAAAAA=</HashCode>
<FileName>DASFactory.Slice.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.TDASSetup" Collapsed="true">
<Position X="0.5" Y="10.5" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAAAKAAAAEAAAICgAgAAAIAggSABAAAgBE=</HashCode>
<FileName>DASFactory.TDAS.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DTS.DASLib.DASFactory.TDASEthernetSetup" Collapsed="true">
<Position X="0.5" Y="11.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAAACAAAAAAAAACAAAAAABAAAQAAAAAAAA=</HashCode>
<FileName>DASFactory.TDAS.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.EthernetTDASHandling" Collapsed="true">
<Position X="3" Y="8.75" Width="2" />
<TypeIdentifier>
<HashCode>BGAIgAgCECBgASAAAAABACAigABUAAFCIhAQQAADCAI=</HashCode>
<FileName>DASFactory.TDAS.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.WindowsNotification" Collapsed="true">
<Position X="6.25" Y="8.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAiAAAAAAAAAAAAACQAAAAAAABIAEgAAAAAY=</HashCode>
<FileName>DASFactory.WindowsNotification.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.WinUSBHandling" Collapsed="true">
<Position X="7.5" Y="10.25" Width="2" />
<TypeIdentifier>
<HashCode>BAAAAAABAgAAAAAAAAAAAAACgRAAAAAAAAAQAACAAAA=</HashCode>
<FileName>DASFactory.WinUSB.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DTS.DASLib.DASFactory.DistributorSocket" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="30.75" Y="1.5" Width="2" />
<TypeIdentifier>
<HashCode>QAVAAgAEACBAAABACBAAAAIAIBgAAAAAAAQAEAAAAIQ=</HashCode>
<FileName>DistributorSocket.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Interface Name="DTS.DASLib.DASFactory.IConnectedDevice" Collapsed="true">
<Position X="10.5" Y="6.5" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAABAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="DTS.DASLib.DASFactory.IConnectedDAS" Collapsed="true">
<Position X="10.5" Y="8" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="DTS.DASLib.DASFactory.IDeviceSetup" Collapsed="true">
<Position X="29" Y="3.75" Width="2" />
<TypeIdentifier>
<HashCode>AKAAAAAAAAAAAKAAAAAAAAACAAAAAAAAAASAAAAAABE=</HashCode>
<FileName>DASFactory.Basic.cs</FileName>
</TypeIdentifier>
</Interface>
<Delegate Name="DTS.DASLib.DASFactory.DASFactoryEventHandler" Collapsed="true">
<Position X="29" Y="4.75" Width="2" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAACAAAAAAAAAAQAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DASFactory.cs</FileName>
</TypeIdentifier>
</Delegate>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{02EEBA8C-7B22-4BC3-BF3A-8DE23EAF2E61}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DASFactory</RootNamespace>
<AssemblyName>DASFactory</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile />
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Prism">
<HintPath>..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DASFactory.AutoDiscovery.cs" />
<Compile Include="DASFactory.CDCUSB.cs" />
<Compile Include="DASFactory.Basic.cs" />
<Compile Include="DASFactory.cs">
</Compile>
<Compile Include="DASFactory.Ethernet.cs" />
<Compile Include="DASFactory.Ribeye.cs" />
<Compile Include="DASFactory.SerialTDAS.cs" />
<Compile Include="DASFactory.Slice.cs" />
<Compile Include="DASFactory.TDAS.cs" />
<Compile Include="DASFactory.WindowsNotification.cs" />
<Compile Include="DASFactory.WinUSB.cs" />
<Compile Include="DistributorSocket.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Common\DTS.Common.DAS.Concepts\DTS.Common.DAS.Concepts.csproj">
<Project>{ae3987f7-c4c6-40fb-a353-1a2dadef7a9a}</Project>
<Name>DTS.Common.DAS.Concepts</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.DASResource\DTS.Common.DASResource.csproj">
<Project>{f621ce48-bb4b-4cfc-a325-9410b721cc44}</Project>
<Name>DTS.Common.DASResource</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.ICommunication\DTS.Common.ICommunication.csproj">
<Project>{f57b954e-a49a-4110-b36c-b5abab3e230b}</Project>
<Name>DTS.Common.ICommunication</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\EthernetConnection\DTS.Common.EthernetConnection.csproj">
<Project>{e08382c1-f0b4-44c4-9676-c32fd442228a}</Project>
<Name>DTS.Common.EthernetConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\SerialConnection\DTS.Common.SerialConnection.csproj">
<Project>{d485515c-366a-4d14-83da-585fc4007461}</Project>
<Name>DTS.Common.SerialConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\USBConnection\USBFramework\DTS.Common.USBFramework.csproj">
<Project>{30f9a58b-6808-4c93-a294-7267c3d2e7eb}</Project>
<Name>DTS.Common.USBFramework</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.IConnection\USBConnection\WINUSBConnection\DTS.Common.WINUSBConnection.csproj">
<Project>{3a40c700-1d50-4524-affb-0d59f0f0f9cb}</Project>
<Name>DTS.Common.WINUSBConnection</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.SharedResource\DTS.Common.SharedResource.csproj">
<Project>{C01E723F-86E2-403A-864C-9F56BDB60B8D}</Project>
<Name>DTS.Common.SharedResource</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
<Project>{d6da1b74-c711-43c2-91b1-1908a8d04dbf}</Project>
<Name>DTS.Common.Utilities</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\DTS.Common\DTS.Common.csproj">
<Project>{F7A0804F-61A4-40AE-83D0-F1137622B592}</Project>
<Name>DTS.Common</Name>
</ProjectReference>
<ProjectReference Include="..\DASFactoryDb\DASFactoryDb.csproj">
<Project>{49c60032-9c8a-4ea5-9e26-2f1663555759}</Project>
<Name>DASFactoryDb</Name>
</ProjectReference>
<ProjectReference Include="..\ICommand\ICommand.csproj">
<Project>{58e70872-8acc-4957-bb8e-d3746bcc536d}</Project>
<Name>ICommand</Name>
</ProjectReference>
<ProjectReference Include="..\IService\IService.csproj">
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
<Name>IService</Name>
</ProjectReference>
<ProjectReference Include="..\RibeyeCommands\RibeyeCommands.csproj">
<Project>{53abd0f3-7d8d-43cd-99d7-06c45246d93e}</Project>
<Name>RibeyeCommands</Name>
</ProjectReference>
<ProjectReference Include="..\SLICECommands\SLICECommands.csproj">
<Project>{d015f93d-9507-4484-977b-4cf1bdc0b30e}</Project>
<Name>SLICECommands</Name>
</ProjectReference>
<ProjectReference Include="..\SLICEDBCommands\SliceDBCommands.csproj">
<Project>{dea48a0b-999e-48e8-8601-cb05b6b765de}</Project>
<Name>SliceDBCommands</Name>
</ProjectReference>
<ProjectReference Include="..\TDASCommands\TDASCommands.csproj">
<Project>{14b4a79f-a4b5-4c4c-a041-0105eed82782}</Project>
<Name>TDASCommands</Name>
</ProjectReference>
<ProjectReference Include="..\TiltMIF\TiltMIF.csproj">
<Project>{774C0FAA-9491-43D8-9709-C6076F913629}</Project>
<Name>TiltMIF</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="Design\ClassDiagram_DasFactory.cd" />
<None Include="Design\Graph_ProjectReferences.dgml" />
<None Include="Design\Graph_ReferencesThisProject.dgml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,591 @@
using CANFDApiProxy;
using CANFDApiProxy.Messages;
using DTS.Common;
using DTS.Common.Enums.DASFactory;
using DTS.Common.Events;
using DTS.Common.ICommunication;
using DTS.Common.Interface.DASFactory;
using DTS.Common.Interface.DASFactory.Config;
using DTS.Common.SharedResource.Strings;
using DTS.Common.Strings;
using DTS.Common.Utilities.Logging;
using DTS.DASLib.Command;
using DTS.DASLib.Command.TDAS;
using DTS.DASLib.Service;
using DTS.DASLib.Service.Classes.CAN;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing.Text;
using System.Linq;
using System.Net.Sockets;
using System.Threading;
using static DTS.DASLib.DASFactory.EthernetTDASHandling;
namespace DTS.DASLib.DASFactory
{
internal abstract class SPFDSetup : IDeviceSetup
{
protected SPFDSetup()
{
}
private static string GetSerialNumber(ConnectedDevice das)
{
using (var source = new CancellationTokenSource())
{
source.CancelAfter(100);
var t = CANFD.API.GetSerial(das.Dev.ConnectString, source.Token);
t.Wait();
if (t.IsCompleted) { return t.Result.Serial; }
return null;
}
}
private static decimal? GetBattery(string ip)
{
try
{
using (var source = new CancellationTokenSource())
{
var task = CANFD.API.GetBattery(ip, source.Token);
task.Wait();
if (task.IsCompleted)
{
return task.Result.LoadV;
}
}
}
catch (Exception)
{
//right now we expect exceptions here by nature of sending a connect to ip addresses
//just discard them for now
}
return null;
}
private static string GetFirmwareVersion(ConnectedDevice dev)
{
try
{
using (var cancelSource = new CancellationTokenSource())
{
var t = CANFD.API.GetDeviceInfo(dev.Dev.ConnectString, cancelSource.Token);
t.Wait();
if (t.IsCompleted)
{
var res = t.Result;
return res.Version_number;
}
}
}
catch (Exception ex)
{
APILogger.Log(ex);
}
return null;
}
private static int GetNumberOfChannels(ConnectedDevice dev)
{
try
{
using (var cancelSource = new CancellationTokenSource())
{
var t = CANFD.API.GetCANInfo(dev.Dev.ConnectString, cancelSource.Token);
t.Wait();
if (t.IsCompleted)
{
var res = t.Result;
return res.CANInfoList.Count;
}
}
}
catch (Exception ex)
{
APILogger.Log(ex);
}
return 0;
}
public bool QueryInformation(ConnectedDevice dev)
{
try
{
APILogger.Log("DasFactory.SPFD::SetupDASInfo enter");
// shortcut
dev.Dev.Comm.SerialNumber = GetSerialNumber(dev);
dev.Dev.Comm.FirmwareVersion = GetFirmwareVersion(dev) ?? string.Empty;
var numChannels = (uint)GetNumberOfChannels(dev);
// get the stack contents
var idas = (IDASCommunication)dev.Dev.Comm;
//taking values roughly from here
//http://build:8080/svn/ProductDevelopment/SLICE%20PRO/Controller%20Area%20Network%20(CAN)%20Recorder/SPDBR/Documents/Reviews/PDR/
//LED POWER BLUE means chargin 50-90%, GREEn is >90% PURPLE is 20% <50%, <20% is fault or red
idas.MaximumValidBatteryVoltage = 10;
idas.MinimumValidBatteryVoltage = 1;
idas.BatteryHighVoltage = 5;
idas.BatteryLowVoltage = 3.6F;
idas.BatteryMediumVoltage = 4F;
var serialNumber = new string[1] { dev.Dev.Comm.SerialNumber };
var firmwareVersion = new string[1] { dev.Dev.Comm.FirmwareVersion };
dev.Dev.Comm.DASInfo = new Communication_DASInfo(serialNumber, firmwareVersion);
var ir = new InfoResult
{
NumberOfBridgeChannels = 0,
MaxNumberOfModules = 1,
OwningDAS = idas,
NumberOfBytesPerSampleClock = 1,
MaxEventStorageSpaceInBytes = 16 * 1024 * 1024
};
ir.Modules = new IInfoResultModule[1];
ir.Modules[0] = new InfoResult.Module() { ModuleArrayIndex = 0, SerialNumber = serialNumber[0], NumberOfChannels = numChannels };
idas.SetDASInfo(ir);
idas.ConfigData = new ConfigurationData() { Modules = new DASModule[1] };
idas.ConfigData.Modules[0] = new DASModule() { OwningDAS = idas };
var canInfo = GetChannels(dev);
var channels = new List<DASChannel>();
var channelNum = 0;
foreach (var channel in canInfo)
{
channels.Add(new CANInputDASChannel()
{
UserChannelName = channel.Name,
ModuleChannelNumber = channelNum,
HardwareChannelName = channel.Name,
OwningModule = (DASModule)idas.ConfigData.Modules[0]
});
channelNum++;
}
idas.ConfigData.Modules[0].Channels = channels.ToArray();
GetVoltageInfo(dev);
return true;
}
catch (Exception ex)
{
APILogger.Log(ex.ToString());
return false;
}
}
private static List<CANInfo> GetChannels(ConnectedDevice dev)
{
if ((dev == null) || (dev.Dev == null) || (dev.Dev.Comm == null)) { return new List<CANInfo>(); }
try
{
var t = CANFD.API.GetCANInfo(dev.Dev.ConnectString, CancellationToken.None);
t.Wait();
if (t.IsCompleted) { return t.Result.CANInfoList; }
}
catch (Exception ex)
{
var msg = string.Format(StringResources.Warning_FailedToRetrieveCanChannels, dev.Dev.ConnectString, dev.Dev.Comm.SerialNumber);
SurfaceApplicationError(msg);
APILogger.Log(msg, ex);
}
return new List<CANInfo>();
}
private static void SurfaceApplicationError(string msg)
{
try
{
PageErrorEvent.SurfaceApplicationError(msg);
}
catch (Exception ex)
{
APILogger.Log(ex);
}
}
private static void GetVoltageInfo(ConnectedDevice dev)
{
var batteryVoltage = GetBattery(dev.Dev.ConnectString);
var inputValues = new BaseInputValues();
var idas = (IDASCommunication)dev.Dev.Comm;
idas.BaseInput = inputValues;
if (null == batteryVoltage)
{
return;
}
var voltage = Convert.ToDouble(batteryVoltage.Value);
if (voltage < idas.MinimumValidBatteryVoltage) { voltage = 0D; }
if (voltage > idas.MaximumValidBatteryVoltage) { voltage = 0D; }
inputValues.BatteryVoltage = voltage;
inputValues.BatteryMilliVolts = 1000D * voltage;
inputValues.BatteryVoltageStatusColor = RESTSliceProFD.ConvertBatteryVoltage2Color(voltage, idas);
//StatusDisplayBattery
inputValues.StatusDisplayBattery = ((voltage < idas.MinimumValidBatteryVoltage) || (voltage > idas.MaximumValidBatteryVoltage)) ?
"---" :
$"{voltage:0.00} V";
inputValues.BatteryVoltageStatus = inputValues.StatusDisplayBattery;
}
public abstract ICommunication GetICommunication();
public abstract ICommunication GetICommunication(ConnectedDevice dev);
public abstract IConnectedDevice GetIConnectedDevice(ICommunication comm);
public abstract bool IsCorrectType(ConnectedDevice dev);
public abstract DFConstantsAndEnums.DASType GetDASType();
public abstract Guid GetGuid();
public virtual int GetProductId()
{
return 0;
}
public virtual string GetProductIdString()
{
return string.Empty;
}
protected DeviceHandling _handler;
public virtual void SetHandler(DeviceHandling handler)
{
_handler = handler;
}
}
internal class SPFDRESTSetup : SPFDSetup
{
public override ICommunication GetICommunication()
{
var et = new RESTSliceProFD();
et.OnDisconnected += et_OnDisconnected;
return et;
}
void et_OnDisconnected(object sender, EventArgs e)
{
_handler.ReportDisconnect(sender);
}
public override ICommunication GetICommunication(ConnectedDevice dev)
{
return (dev.Dev as ConnectedRESTSPFD).Comm;
}
public override IConnectedDevice GetIConnectedDevice(ICommunication comm)
{
return new ConnectedRESTSPFD(comm as RESTSliceProFD);
}
public override bool IsCorrectType(ConnectedDevice dev)
{
return dev.Dev is ConnectedRESTSPFD;
}
public override DFConstantsAndEnums.DASType GetDASType()
{
return DFConstantsAndEnums.DASType.REST_SPFD;
}
public override Guid GetGuid()
{
return Guid.Empty;
}
public SPFDRESTSetup()
: base()
{
}
}
internal class RESTSPFDHandling : DeviceHandling
{
private static readonly object SPFDHOSTSLOCK = new object();
private readonly ManualResetEvent SPFDSignalEvent = new ManualResetEvent(false);
private string[] _SPFDHostNames;
public string[] SPFDHostNames
{
get { lock (SPFDHOSTSLOCK) { return _SPFDHostNames; } }
set
{
if (SPFDListenerThread == null)
{
// SLICEDBListenerThread is not running
if (null == value || value.Length < 1 || string.Empty == value[0])
{
// no-op
return;
}
}
else
{
// it's already running, we need to stop it
SPFDSignalEvent.Reset();
_bKeepGoing = false;
//setting interrupt here signals anny connection attempts to stop
Interrupt();
// this will signal when the listen thread is done executing
SPFDSignalEvent.WaitOne(3000, false);
}
lock (SPFDHOSTSLOCK) { _SPFDHostNames = value; }
// start it up
SPFDSignalEvent.Reset();
_interrupt.Reset();
SPFDListenerThread = new Thread(SPFDEventListenerTask) { IsBackground = true };
SPFDListenerThread.Start();
// wait for it to start
SPFDSignalEvent.WaitOne();
}
}
private void OnSPFDConnected(string s)
{
lock (_ConnectedDASLock)
{
if (!_connectedSPFD.Contains(s))
{
APILogger.Log($"Added to connected devices {s} [SPFD]");
_connectedSPFD.Add(s);
}
}
UpdateConnectedDevices();
}
private void SPFDEventListenerTask()
{
lock (_ConnectedDASLock)
{
_connectedSPFD.Clear();
}
// signal that we're alive
_bKeepGoing = true;
SPFDSignalEvent.Set();
try
{
if (null == _SPFDHostNames || _SPFDHostNames.Length < 1) { return; }
while (_bKeepGoing)
{
var hosts = (string [])SPFDHostNames.Clone();
foreach (var host in hosts)
{
if (_connectedSPFD.Contains(host)) { continue; }
using (var source = new CancellationTokenSource())
{
try
{
source.CancelAfter(100);
var task = CANFD.API.GetSerial(host, source.Token);
task.Wait();
if ( task.IsCompleted)
{
OnSPFDConnected(host);
}
}
catch( Exception ex)
{
APILogger.Log($"Failed to connect to {host}", ex);
}
}
}
Thread.Sleep(RECONNECT_SPIN_MS);
}
}
catch (ThreadInterruptedException)
{
//don't log
}
catch (ThreadAbortException)
{
// we must exit
}
catch (Exception)
{
// don't care
}
finally
{
_bKeepGoing = false;
//signal that the thread is done and any connection attempts should stop
_interrupt.Set();
RemoveAll();
SPFDListenerThread = null;
_SPFDHostNames = null;
// signal that thread is done executing
SPFDSignalEvent.Set();
}
}
private const int RECONNECT_SPIN_MS = 200;
private volatile bool _bKeepGoing;
private readonly ManualResetEvent _interrupt = new ManualResetEvent(false);
public void Interrupt() { _interrupt.Set(); }
private void RemoveAll()
{
EnqueueDisconnect();
lock (_ConnectedDASLock)
{
_connectedSPFD.Clear();
}
}
public RESTSPFDHandling(DASFactory _factory,
UpdateFinishedEventHandler _SerialUpdateFinished,
IDeviceSetup deviceSetup,
BlockingCollection<Tuple<QueueActions, DeviceHandling>> queueActionPerDevice
)
: base(_factory, _SerialUpdateFinished, queueActionPerDevice)
{
factory = _factory;
_spfdSetup = deviceSetup;
}
private static DASFactory factory { get; set; }
internal override bool DetachAllDevices()
{
var bDevicesRemoved = false;
SPFDHostNames = new string[0];
lock (ConnectedDevicesLock)
{
foreach (var dev in ConnectedDevices)
{
dev.Dispose();
bDevicesRemoved = true;
}
ConnectedDevices.Clear();
_connectedSPFD.Clear();
}
return bDevicesRemoved;
}
private Thread SPFDListenerThread;
public override void Dispose()
{
try { if (null != SPFDListenerThread) { SPFDListenerThread.Abort(); } }
catch (Exception) { }
base.Dispose();
}
internal void OnSPFDConnect(string s)
{
lock (_ConnectedDASLock)
{
if (!_connectedSPFD.Contains(s))
{
APILogger.Log($"Added to connected devices {s} [SPFD]");
_connectedSPFD.Add(s);
}
}
UpdateConnectedDevices();
}
internal void OnSPFDDisconnect(string s)
{
var updated = false;
lock (_ConnectedDASLock)
{
if (_connectedSPFD.Contains(s))
{
updated = true;
_connectedSPFD.Remove(s);
APILogger.Log($"Removed from connected devices {s} [SPFD]");
}
}
if (updated) { UpdateDisconnectedDevices(); }
}
private readonly List<string> _connectedSPFD = new List<string>();
private readonly object _ConnectedDASLock = new object();
private List<string> GetConnectedEthernetDeviceString()
{
var list = new List<string>();
lock (_ConnectedDASLock)
{
if (null == _connectedSPFD || _connectedSPFD.Count < 1) { return list; }
list.AddRange(_connectedSPFD);
}
return list;
}
private List<string> GetActiveConnectedEthernetDeviceStrings()
{
var list = new List<string>();
lock (_ConnectedDASLock)
{
if (null == _connectedSPFD || _connectedSPFD.Count < 1) { return list; }
}
var devs = ConnectedDevices.ToArray();
foreach (var dev in devs)
{
list.Add(dev.Dev.ConnectString);
}
return list;
}
private IDeviceSetup _spfdSetup { get; set; }
private List<string> GetConnectedDeviceStrings()
{
return GetConnectedEthernetDeviceString();
}
private List<string> GetAllActiveDeviceStrings()
{
return GetActiveConnectedEthernetDeviceStrings();
}
private new ICommunication GetICommunication()
{
return _spfdSetup.GetICommunication();
}
private new IConnectedDevice GetIConnectedDevice(ICommunication com)
{
return _spfdSetup.GetIConnectedDevice(com);
}
private const int CONNECT_TIMEOUT_MS = 3000;
private void UpdateConnectedSPFD()
{
ConnectNewDevices(GetConnectedDeviceStrings,
GetAllActiveDeviceStrings,
GetICommunication,
GetIConnectedDevice,
_spfdSetup.GetDASType(),
_spfdSetup,
CONNECT_TIMEOUT_MS
);
}
public override void UpdateConnectedDevices()
{
UpdateConnectedSPFD();
}
private bool IsCorrectType(ConnectedDevice dev)
{
return _spfdSetup.IsCorrectType(dev);
}
private new ICommunication ConnectedDevice2Communication(ConnectedDevice dev)
{
return _spfdSetup.GetICommunication(dev);
}
private void UpdateDisconnectedSPFD()
{
DisconnectRemovedDevices(GetConnectedDeviceStrings,
IsCorrectType,
ConnectedDevice2Communication,
_spfdSetup.GetDASType(),
CONNECT_TIMEOUT_MS);
}
public override void UpdateDisconnectedDevices()
{
UpdateDisconnectedSPFD();
}
public override void UpdateDeviceSetups()
{
_spfdSetup.SetHandler(this);
}
}
}

View File

@@ -0,0 +1,183 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DTS.Common.DASResource;
using DTS.Common.Utilities.Logging;
using DTS.Common.WINUSBConnection;
namespace DTS.DASLib.DASFactory
{
internal class CDCUSBHandling : WindowsNotification
{
/// <summary>
/// Timeout in milliseconds to connect an CDCUSB device
/// </summary>
public int ConnectCDCUSBTimeout { get; set; }
private IDeviceSetup deviceHandler { get; set; }
public CDCUSBHandling(DASFactory _factory, UpdateFinishedEventHandler _SerialUpdateFinished, IDeviceSetup _deviceHandler, BlockingCollection<Tuple<QueueActions, DeviceHandling>> queueActionPerDevice)
: base(_factory, _SerialUpdateFinished, _deviceHandler.GetGuid(), queueActionPerDevice)
{
deviceHandler = _deviceHandler;
ConnectCDCUSBTimeout = 60000; // 1000 ms
}
#region CDCUSB WinProc's
/// <summary>
/// This gets called whenever a CDCUSB devices connects
/// </summary>
/// <param name="m">The windows message</param>
protected override void NotificationDeviceArrived(ref Message m)
{
try
{
// \\?\hid#vid_1cb9&pid_0002#6&29dd55fe&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
APILogger.LogString("CDCUSBArrived: A device has been connected");
EnqueueConnect();
}
catch (Exception ex)
{
APILogger.Log("MessageBox", Strings.DASFactory_CDCUSBArrivedFailed, ex);
}
finally
{
APILogger.LogString("CDCUSBArrived: Exit");
}
}
/// <summary>
/// This gets called whenever a CDCUSB devices disconnectes
/// </summary>
/// <param name="m">The windows message</param>
protected override void NotificationDeviceRemoved(ref Message m)
{
try
{
APILogger.LogString("CDCUSBRemoved: A device has been disconnected");
EnqueueDisconnect();
}
catch (Exception ex)
{
APILogger.Log("MessageBox", Strings.DASFactory_CDCUSBRemovedFailed, ex);
}
finally
{
APILogger.LogString("CDCUSBRemoved: Exit");
}
}
#endregion
#region Connect
/// <summary>
/// Throw an exception if currently connected CDCUSB devices contains duplicate dev paths.
/// </summary>
private void CheckForConnectedCDCUSBDups()
{
// get a list of units currently connected thru CDCUSB
var ConnectedCDCUSBDevices = GetListOfConnectedDevices();
if (ConnectedCDCUSBDevices.Count != ConnectedCDCUSBDevices.Distinct().Count())
{
var dupList = new StringBuilder();
foreach (var s in ConnectedCDCUSBDevices)
{
dupList.AppendLine(s);
}
var msg = "CheckForConnectedCDCUSBDups: Connected CDCUSB contain duplicates" + Environment.NewLine + dupList;
APILogger.LogString(msg);
throw new Exception("CheckForConnectedCDCUSBDups: Connected CDCUSB contain duplicates");
}
}
private List<string> GetListOfConnectedDevices()
{
var newNames = new List<string>();
var AllCDCUSBDevicePathNames = new string[128];
try
{
// Fill an array with the device path names of all attached HIDs.
if (!MyDeviceManagement.FindDeviceFromGuid(deviceHandler.GetGuid(), ref AllCDCUSBDevicePathNames))
{
return newNames;
}
}
catch
{
return newNames;
}
// loop thru the array and copy the new ones (that actually contain something)
// over to the list newNames
foreach (var t in AllCDCUSBDevicePathNames)
{
var devPath = t;
if (string.IsNullOrEmpty(t))
continue;
var bValid = false;
for (var curKey = 0; curKey < CDCUSBConnection.RegKeys.Count && !bValid; curKey++)
{
var regKey = CDCUSBConnection.RegKeys[curKey];
if (devPath.Contains(regKey.ToLower()))
{
bValid = true;
}
}
if (!bValid) { continue; }
// protect against windows giving us more than one of the same
if (newNames.Find(str => str.Equals(devPath, StringComparison.OrdinalIgnoreCase)) == null)
{
// no, we haven't added it yet so do it now
newNames.Add(devPath);
}
}
return newNames;
}
public override void UpdateConnectedDevices()
{
ConnectNewDevices(delegate
{
// make sure the connected ones are OK
CheckForConnectedCDCUSBDups();
// get a list of units currently connected thru CDCUSB
return GetListOfConnectedDevices();
},
GetConnectedStrings,
() => deviceHandler.GetICommunication(),
comm => deviceHandler.GetIConnectedDevice(comm),
deviceHandler.GetDASType(),
deviceHandler,
ConnectCDCUSBTimeout);
}
#endregion
#region Disconnect
public override void UpdateDisconnectedDevices()
{
DisconnectRemovedDevices(GetListOfConnectedDevices,
dev => deviceHandler.IsCorrectType(dev),
dev => deviceHandler.GetICommunication(dev),
deviceHandler.GetDASType(),
ConnectCDCUSBTimeout);
}
#endregion
public override void UpdateDeviceSetups()
{
deviceHandler.SetHandler(this);
}
}
}

View File

@@ -0,0 +1,326 @@
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using DTS.Common.Enums;
using DTS.Common.Enums.DASFactory;
using DTS.Common.Utilities.Logging;
namespace DTS.DASLib.DASFactory
{
public class DistributorSocket : IDisposable
{
#region constants and enums
private const int SLICE_DB_PORT = 8200;
private const int MAX_LOG_SIZE_BYTES = 1024000;
private const int MAX_CONSECUTIVE_READ_ERRORS = 2;
#endregion
#region properties
private Socket _sock;
private readonly StreamReader _reader;
private readonly StreamWriter _writer;
private readonly TextLogger _logger;
private static volatile bool _bShutDownByNow = false;
#endregion
#region methods
private static void WriteCycleExceptionHandler(Exception ex)
{
try
{
APILogger.Log("exception writing to Hearbeat log", ex);
}
catch (Exception)
{
// ignored - if we have an exception here we've already tried to log it, if we fail to log it, there's not much more to do
}
}
private void Log(string message)
{
if (null == _logger) { return; }
try
{
_logger.LogMessage($"{DateTime.Now.Year:0000}-{DateTime.Now.Month:00}-{DateTime.Now.Day:00} {DateTime.Now.Hour:00}:{DateTime.Now.Minute:00}:{DateTime.Now.Second:00}.{DateTime.Now.Millisecond:0000} {message}\r\n");
}
catch (Exception)
{
// ignored - we just tried to log a problem, but the log failed, not much more we can do
}
}
public bool IsConnected()
{
return null != _sock && _sock.Connected;
}
public void Disconnect()
{
try
{
if (null == _sock) return;
if (_sock.Connected)
{
_sock.Shutdown(SocketShutdown.Both);
_sock.Close();
}
_sock.Dispose();
_sock = null;
_keepAliveEnabled = false;
}
catch (Exception ex)
{
APILogger.Log(ex);
}
}
public bool ReadLine(ref string target, ref bool stopFlag)
{
var consecutiveReadErrors = 0;
string currentMessage;
// retry the reads until stopFlag is true or we get a message or we've tried 10 times
do
{
try
{
currentMessage = _reader.ReadLine();
if (null == currentMessage)
{
currentMessage = string.Empty;
}
else { Log(currentMessage); }
consecutiveReadErrors = 0;
}
catch (IOException)
{
consecutiveReadErrors++;
currentMessage = string.Empty;
}
} while (!stopFlag && string.IsNullOrEmpty(currentMessage) && consecutiveReadErrors < MAX_CONSECUTIVE_READ_ERRORS);
if (stopFlag || consecutiveReadErrors >= MAX_CONSECUTIVE_READ_ERRORS)
{
return false;
}
target = currentMessage;
return true;
}
public void SendAck()
{
Log(@"ACK");
if (_sock.Connected)
{
try
{
_writer.WriteLine(@"ACK");
_writer.Flush();
}
catch (Exception ex)
{
APILogger.Log($"Failed to sendAck - {ex.Message} {_sock.RemoteEndPoint.ToString()}");
}
}
else
{
APILogger.Log($"SendAck not performed, socket is not connected {_sock.RemoteEndPoint.ToString()}");
}
}
private bool _keepAliveEnabled = false;
public bool KeepAliveEnabled()
{
//10477 Heartbeat and Keep-Alive System Attribute
//Keepalive time is the duration between two keepalive transmissions in idle condition. TCP keepalive period is required to be configurable and by default is set to no less than 2 hours.
//Keepalive interval is the duration between two successive keepalive retransmissions, if acknowledgement to the previous keepalive transmission is not received.
//Keepalive retry is the number of retransmissions to be carried out before declaring that remote end is not available.
//if (_keepAliveEnabled) return true;
Log($@"<{DFConstantsAndEnums.RemoteKeepAliveSeconds},{DFConstantsAndEnums.RemoteKeepAliveRetryIntervalSeconds},4>");
_writer.WriteLine($@"<{DFConstantsAndEnums.RemoteKeepAliveSeconds},{DFConstantsAndEnums.RemoteKeepAliveRetryIntervalSeconds},4>");
//System.Diagnostics.Trace.WriteLine($"{(_sock?.RemoteEndPoint as IPEndPoint)?.Address}:{(_sock?.RemoteEndPoint as IPEndPoint)?.Port} Keepalive Message Sent");
var response = "";
while (string.IsNullOrWhiteSpace(response))
{
response = _reader.ReadLine();
}
Log(response);
//if (response.Contains("<ACK>"))
//{
// return true;
//}
SendAck();
//System.Diagnostics.Trace.WriteLine($"{(_sock?.RemoteEndPoint as IPEndPoint)?.Address}:{(_sock?.RemoteEndPoint as IPEndPoint)?.Port} Keepalive Ack Sent");
_keepAliveEnabled = true;
return _keepAliveEnabled;
}
public void SendNak()
{
if (null != _sock && _sock.Connected)
{
try
{
Log(@"NAK");
// Respond with ACK or NAK -- NAK doesn't necessarily mean something bad happened, it
// just means the message received wasn't an in-band message. The SD can send a 0-length
// packet, e.g., as a keep-alive.
_writer.WriteLine(@"NAK");
}
catch (Exception ex)
{
APILogger.Log($"Failed to send nak - {ex.Message} - {_sock?.RemoteEndPoint.ToString()}");
}
}
else
{
if (null == _sock)
{
APILogger.Log($"failed to send nak, no sock");
}
else { APILogger.Log($"Failed to send nak, not connected - {_sock?.RemoteEndPoint.ToString()}"); }
}
}
#endregion
#region constructors and initializers
public DistributorSocket(string hostName, string hostIPAddress, ref bool slicedbCanConnect, ref ManualResetEvent slicedbCanConnectEvent, string logFolder, ManualResetEvent whKillMe)
{
//try
//{
// _logger = new TextLogger(string.Format("{1}\\{0}.log", hostName, logFolder).Replace(":", "_"), WriteCycleExceptionHandler, MAX_LOG_SIZE_BYTES);
//}
//catch (Exception ex) { APILogger.Log("exception setting up heartbeat logger", ex); }
_keepAliveEnabled = false;
_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
_sock.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
_sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
// https://benohead.com/windows-network-connections-timing-quickly-temporary-connectivity-loss/
//KeepAliveTime: default value is 2hr
//KeepAliveInterval: default value is 1s and Detect 5 times
uint dummy = 0; //lenth = 4
var inOptionValues = new byte[System.Runtime.InteropServices.Marshal.SizeOf(dummy) * 3];
var onOff = true;
var keepAliveTimeOutMs = DFConstantsAndEnums.LocalKeepAliveTimeOutMS;
var keepAliveRetryIntervalMs = DFConstantsAndEnums.LocalKeepAliveRetryIntervalMS;
BitConverter.GetBytes((uint)(onOff ? 1 : 0)).CopyTo(inOptionValues, 0);
BitConverter.GetBytes(keepAliveTimeOutMs)
.CopyTo(inOptionValues, System.Runtime.InteropServices.Marshal.SizeOf(dummy));
BitConverter.GetBytes(keepAliveRetryIntervalMs)
.CopyTo(inOptionValues, System.Runtime.InteropServices.Marshal.SizeOf(dummy) * 2);
_sock.IOControl(IOControlCode.KeepAliveValues, inOptionValues, null);
if (!string.IsNullOrEmpty(hostIPAddress))
{
APILogger.Log($"DistributorSocket.DistributorSocket binding to {hostIPAddress}");
_sock.Bind(new IPEndPoint(IPAddress.Parse(hostIPAddress), 0));
}
do
{
try
{
// Wait until we're allowed to connect
while (!slicedbCanConnect)
{
if (whKillMe.WaitOne(10, false)) { return; }
if (_sock.Connected) { _sock.Disconnect(false); _sock.Close(); }
slicedbCanConnectEvent.WaitOne(1000, false);
slicedbCanConnectEvent.Reset();
if (_bShutDownByNow) { return; }
}
if (whKillMe.WaitOne(10, false)) { return; }
if (_bShutDownByNow) { return; }
// Try to connect to a slice db
//sock.Connect(hostName, slice_db_port);
var result = _sock.BeginConnect(hostName, SLICE_DB_PORT, null, null);
result.AsyncWaitHandle.WaitOne(2000, true);
if (_sock.Connected) continue;
_sock.Close(); Thread.Sleep(100);
_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
_sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
// https://benohead.com/windows-network-connections-timing-quickly-temporary-connectivity-loss/
//KeepAliveTime: default value is 2hr
//KeepAliveInterval: default value is 1s and Detect 5 times
dummy = 0; //lenth = 4
inOptionValues = new byte[System.Runtime.InteropServices.Marshal.SizeOf(dummy) * 3];
keepAliveTimeOutMs = DFConstantsAndEnums.LocalKeepAliveTimeOutMS;
keepAliveRetryIntervalMs = DFConstantsAndEnums.LocalKeepAliveRetryIntervalMS;
BitConverter.GetBytes((uint)(onOff ? 1 : 0)).CopyTo(inOptionValues, 0);
BitConverter.GetBytes(keepAliveTimeOutMs)
.CopyTo(inOptionValues, System.Runtime.InteropServices.Marshal.SizeOf(dummy));
BitConverter.GetBytes(keepAliveRetryIntervalMs)
.CopyTo(inOptionValues, System.Runtime.InteropServices.Marshal.SizeOf(dummy) * 2);
_sock.IOControl(IOControlCode.KeepAliveValues, inOptionValues, null);
_sock.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
if (!string.IsNullOrEmpty(hostIPAddress))
{
APILogger.Log($"DistributorSocket.DistributorSocket binding to {hostIPAddress}");
_sock.Bind(new IPEndPoint(IPAddress.Parse(hostIPAddress), 0));
}
}
catch (Exception)
{
// Need to sleep here in so we don't chew up CPU when
// there isn't a network interface available (BUG 1104)
Thread.Sleep(500);
}
} while (!_sock.Connected && !whKillMe.WaitOne(10, false));
if (!_sock.Connected) return;
_sock.ReceiveBufferSize = 1024;
_reader = new StreamReader(new NetworkStream(_sock));
_writer = new StreamWriter(new NetworkStream(_sock)) { AutoFlush = true };
_writer.BaseStream.WriteTimeout = 9000;
_reader.BaseStream.ReadTimeout = 9000;
}
public DistributorSocket(Socket sock, string hostName, string logFolder)
{
_keepAliveEnabled = false;
//try
//{
// _logger = new TextLogger(string.Format("{1}\\{0}.log", hostName, logFolder).Replace(":", "_"), WriteCycleExceptionHandler, MAX_LOG_SIZE_BYTES);
//}
//catch (Exception ex) { APILogger.Log("exception setting up heartbeat logger", ex); }
_sock = sock;
_reader = new StreamReader(new NetworkStream(_sock));
_writer = new StreamWriter(new NetworkStream(_sock)) { AutoFlush = true };
_writer.BaseStream.WriteTimeout = 9000;
_reader.BaseStream.ReadTimeout = 9000;
}
public void Dispose()
{
try
{
if (null == _sock) return;
if (_sock.Connected)
{
_sock.Shutdown(SocketShutdown.Both);
_sock.Close();
}
_sock.Dispose();
_sock = null;
}
catch (Exception)
{
// don't care
}
}
#endregion
}
}

Binary file not shown.

View File