@@ -0,0 +1,8 @@ | |||||
Beetle.JT808/Beetle.JT808.ClientApp/bin/ | |||||
Beetle.JT808/Beetle.JT808.ClientApp/obj/ | |||||
Beetle.JT808/Beetle.JT808.UnitTestProject1/bin/ | |||||
Beetle.JT808/Beetle.JT808.UnitTestProject1/obj/ | |||||
Beetle.JT808/Beetle.JT808/bin/ | |||||
Beetle.JT808/Beetle.JT808/obj/ | |||||
Beetle.JT808/Beetle.TJ808.BaseServer/bin/ | |||||
Beetle.JT808/Beetle.TJ808.BaseServer/obj/ |
@@ -0,0 +1,677 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<DirectedGraph DataVirtualized="True" xmlns="http://schemas.microsoft.com/vs/2009/dgml"> | |||||
<Nodes> | |||||
<Node Id="@10" 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\mscorlib.dll" Group="Collapsed" Label="mscorlib.dll"> | |||||
<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\System.Drawing.dll" Group="Collapsed" Label="System.Drawing.dll"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="@14" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(app)\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" Group="Collapsed" Label="Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"> | |||||
<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\System.dll" Group="Collapsed" Label="System.dll"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="@18" 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\System.Windows.Forms.dll" Group="Collapsed" Label="System.Windows.Forms.dll"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="@2" Category="CodeSchema_Assembly" AssemblyTimestamp="12/26/2016 10:56:08" Bounds="777.077068913142,264.359317735135,213.596666666667,25" CodeSchemaProperty_StrongName="Beetle.JT808.ClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(88c57185-5e00-454e-91e9-6e8aad0e99fc.OutputPath)" Group="Collapsed" Label="Beetle.JT808.ClientApp.exe"> | |||||
<Category Ref="FileSystem.Category.FileOfType.exe" /> | |||||
</Node> | |||||
<Node Id="@20" Category="CodeSchema_Assembly" CodeSchemaProperty_IsExternal="True" CodeSchemaProperty_StrongName="Beetle.Express, Version=1.1.126.37393, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="D:\VisualStudio\Beetle.JT808\Lib\Beetle.Express.dll" Group="Collapsed" Label="Beetle.Express.dll"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="@22" Category="CodeSchema_Namespace" Bounds="-944.456346946981,-122.032839312523,1671.53341586012,436.345782311657" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="25" Group="Expanded" Label="Beetle.JT808" UseManualLocation="True" /> | |||||
<Node Id="@23" Category="CodeSchema_Namespace" Bounds="-212.00855315703,-178.10131139012,187.46,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Beetle.JT808.Messages" /> | |||||
<Node Id="@24" Category="CodeSchema_Namespace" Bounds="-210.250219823697,344.313042999134,183.943333333333,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Beetle.JT808.Serializes" /> | |||||
<Node Id="@25" Category="CodeSchema_Class" Bounds="-295.672555737776,-32.1581987336038,137.02,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ASCIIHandler" /> | |||||
<Node Id="@26" Category="CodeSchema_Class" Bounds="-924.456346946981,78.9101733439933,146.923333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ByteBitHandler" /> | |||||
<Node Id="@27" Category="CodeSchema_Class" Bounds="-413.522713613648,78.9101733439931,131.73,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ByteHandler" /> | |||||
<Node Id="@28" Category="CodeSchema_Class" Bounds="-636.561580916951,23.9100733439932,137.283333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="BytesHandler" /> | |||||
<Node Id="@29" Category="CodeSchema_Class" Bounds="-292.270999625194,22.8419012663962,131.266666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="CBDHandler" /> | |||||
<Node Id="@30" Category="CodeSchema_Class" Bounds="134.231551742595,269.312842999134,88.0500000000002,25" CodeSchemaProperty_IsInternal="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Core" /> | |||||
<Node Id="@31" Category="CodeSchema_Class" Bounds="-124.798887127,3.64810473831176,130.64,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="GBKHandler" /> | |||||
<Node Id="@32" Category="CodeSchema_Interface" Bounds="-648.859478512126,133.910273343993,151.74,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="IBitCustomType" /> | |||||
<Node Id="@33" Category="CodeSchema_Interface" Bounds="-162.112294262903,132.842101266396,115.286666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="IMessage" UseManualLocation="True" /> | |||||
<Node Id="@34" Category="CodeSchema_Interface" Bounds="-128.652455737776,-51.3520952616882,144.473333333333,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="IMessageBody" /> | |||||
<Node Id="@35" Category="CodeSchema_Interface" Bounds="-278.525975122375,191.046766965076,147.66,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="IProtocolBuffer" /> | |||||
<Node Id="@36" Category="CodeSchema_Class" Bounds="-69.4707848764722,70.1208878424036,111.76,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="Message" UseManualLocation="True" /> | |||||
<Node Id="@37" Category="CodeSchema_Class" Bounds="77.1569689131424,64.5156060181496,197.996666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MessageBodyAttributes" UseManualLocation="True" /> | |||||
<Node Id="@38" Category="CodeSchema_Class" Bounds="160.004337573016,-82.0327393125232,153.816666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MessageFactory" /> | |||||
<Node Id="@39" Category="CodeSchema_Class" Bounds="516.117068913142,78.9101733439931,190.96,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="MessageTypeAttribute" /> | |||||
<Node Id="@4" Category="CodeSchema_Assembly" AssemblyTimestamp="12/26/2016 10:56:08" Bounds="265.027867885191,-273.10151139012,219.28,25" CodeSchemaProperty_StrongName="Beetle.TJ808.BaseServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(03eb1725-ec1f-4933-b0e9-e7f48a5b414d.OutputPath)" Group="Collapsed" Label="Beetle.TJ808.BaseServer.exe"> | |||||
<Category Ref="FileSystem.Category.FileOfType.exe" /> | |||||
</Node> | |||||
<Node Id="@40" Category="CodeSchema_Class" Bounds="39.0966087410002,214.31274299827,121.516666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="PacketInfo" /> | |||||
<Node Id="@41" Category="CodeSchema_Class" Bounds="190.613375407667,214.31274299827,144.133333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ProtocolBuffer" /> | |||||
<Node Id="@42" Category="CodeSchema_Class" Bounds="55.7955619353707,135.117264520783,169.93,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ProtocolBufferPool" UseManualLocation="True" /> | |||||
<Node Id="@43" Category="CodeSchema_Class" Bounds="305.153635579809,47.1612572155614,180.963333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ProtocolProcessError" /> | |||||
<Node Id="@44" Category="CodeSchema_Class" Bounds="-467.119378512126,133.910273343993,218.286666666667,25" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="ReadWriteHandlerAttribute" /> | |||||
<Node Id="@45" Category="CodeSchema_Class" Bounds="-557.346146946981,78.9101733439931,113.823333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="TimeBCD" /> | |||||
<Node Id="@46" Category="CodeSchema_Class" Bounds="-747.532913613647,78.910173343993,160.186666666667,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="UInt16BitHandler" /> | |||||
<Node Id="@47" Category="CodeSchema_Class" Bounds="-469.278147583616,23.9101733439931,144.993333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="UInt16Handler" /> | |||||
<Node Id="@48" Category="CodeSchema_Class" Bounds="-251.792613613648,77.8420012663963,146.113333333333,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="UIntBitHandler" /> | |||||
<Node Id="@49" Category="CodeSchema_Class" Bounds="-462.798001569304,-31.0898266560069,130.92,25" CodeSchemaProperty_IsPublic="True" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="UIntHandler" /> | |||||
<Node Id="@6" Category="CodeSchema_Assembly" AssemblyTimestamp="12/26/2016 10:56:08" Bounds="-10.8988987814752,-273.10151139012,245.926666666667,25" CodeSchemaProperty_StrongName="Beetle.JT808.UnitTestProject1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" FilePath="$(5cdbd16d-5d06-4868-a5e8-db2b62ef2182.OutputPath)" Group="Collapsed" Label="Beetle.JT808.UnitTestProject1.dll"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="@8" Category="CodeSchema_Assembly" AssemblyTimestamp="12/26/2016 10:56:07" Bounds="-964.456346946981,-218.10141139012,1711.53341586012,607.414554389254" CodeSchemaProperty_StrongName="Beetle.JT808, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" FetchedChildrenCount="3" FilePath="$(ad6a9116-9faf-475d-8451-4316f2df910f.OutputPath)" Group="Expanded" Label="Beetle.JT808.dll" UseManualLocation="True"> | |||||
<Category Ref="FileSystem.Category.FileOfType.dll" /> | |||||
</Node> | |||||
<Node Id="_standardGraphExternalsGroup" Category="Externals" Bounds="283.884303877021,419.313242999134,64,25" Group="Collapsed" Label="外部" /> | |||||
</Nodes> | |||||
<Links> | |||||
<Link Source="@2" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="31"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@2" Target="@12" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18" /> | |||||
<Link Source="@2" Target="@16" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@2" Target="@18" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="104"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@22" Target="@25" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@26" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@27" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@28" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@29" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@30" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@31" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@32" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@33" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@34" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@35" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@36" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@37" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@38" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@39" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@40" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@41" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@42" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@43" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@44" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@45" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@46" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@47" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@48" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@22" Target="@49" Category="Contains" FetchingParent="@22" /> | |||||
<Link Source="@23" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="722"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@23" Target="@25" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="3" /> | |||||
<Link Source="@23" Target="@27" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="4" /> | |||||
<Link Source="@23" Target="@30" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="66" /> | |||||
<Link Source="@23" Target="@31" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="3" /> | |||||
<Link Source="@23" Target="@32" Category="Implements" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@23" Target="@39" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="8" /> | |||||
<Link Source="@23" Target="@45" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="1" /> | |||||
<Link Source="@23" Target="@47" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="10" /> | |||||
<Link Source="@23" Target="@48" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@23" Target="@49" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@24" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="424"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_FieldRead" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@24" Target="@34" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@24" Target="@35" Category="References" Bounds="-193.227674353068,223.886459024566,67.9011403713016,120.426583974568" IsSourceVirtualized="True" Weight="4" /> | |||||
<Link Source="@24" Target="@39" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@24" Target="@43" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@24" Target="@44" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@25" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="13"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@25" Target="@35" Category="References" Bounds="-302.405212402344,-7.15819883346558,86.7594146728516,190.274287700653" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@25" Target="@44" Category="InheritsFrom" Bounds="-315.751251220703,-7.15819883346558,59.529296875,137.714457988739" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@26" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@26" Target="@32" Category="CodeSchema_Calls" Bounds="-787.811794756427,103.910173343993,142.810553595138,28.2534092125995" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@26" Target="@35" Category="References" Bounds="-820.080383300781,103.910171508789,532.580261230469,93.3479156494141" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@26" Target="@44" Category="InheritsFrom" Bounds="-780.504638671875,103.480255126953,307.091400146484,29.7058715820313" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@27" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@27" Target="@35" Category="References" Bounds="-305.57666015625,103.910171508789,92.0234680175781,78.8573608398438" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@27" Target="@44" Category="InheritsFrom" Bounds="-353.879279713285,103.910173343993,3.87649500768794,20.6629930164829" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@28" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@28" Target="@35" Category="References" Bounds="-515.962768554688,48.9100723266602,302.409576416016,133.857460021973" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@28" Target="@44" Category="InheritsFrom" Bounds="-515.962768554688,48.9100723266602,124.118225097656,80.7614974975586" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@29" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@29" Target="@35" Category="References" Bounds="-261.926818847656,47.8418998718262,46.2810211181641,135.274188995361" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@29" Target="@44" Category="InheritsFrom" Bounds="-324.22265625,47.8418998718262,88.546630859375,81.8489265441895" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@30" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="40"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@31" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@31" Target="@35" Category="References" Bounds="-189.496855996486,28.6481047383118,120.331594493207,155.284616589742" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@31" Target="@44" Category="InheritsFrom" Bounds="-315.750823974609,28.6481056213379,216.941383361816,101.909252166748" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@32" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@33" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@33" Target="@35" Category="References" Bounds="-175.388460655692,157.842101266396,49.3948047146276,28.6849620216748" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@33" Target="@37" Category="References" Bounds="-53.1301167966186,91.6447277832072,169.202042875234,41.197373483189" IsSourceVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@33" Target="@40" Category="References" Bounds="-73.1196462162482,157.842101266396,133.265335341885,53.1372601604492" IsSourceVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@34" Target="@35" Category="References" Bounds="-196.243957519531,-26.3520946502686,109.504112243652,209.079908370972" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@35" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="32"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@36" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="52"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@36" Target="@24" Category="CodeSchema_Calls" Bounds="-110.295785417683,95.1208878424036,91.9324456781481,240.784151036314" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="9" /> | |||||
<Link Source="@36" Target="@30" Category="CodeSchema_Calls" Bounds="-5.27477550506592,95.1208877563477,181.455821037292,165.233757019043" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@36" Target="@33" Category="Implements" Bounds="-78.5387830780506,95.1208878424036,46.8364672115039,32.3250331771864" Weight="1" /> | |||||
<Link Source="@36" Target="@35" Category="References" Bounds="-196.325698852539,95.1208877563477,133.262599945068,87.5736465454102" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="24"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@36" Target="@37" Category="References" Bounds="42.2892151235279,80.2058646762998,25.8716782290367,0.764274246383806" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="12"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@36" Target="@39" Category="CodeSchema_Calls" Bounds="42.2892150878906,90.0776138305664,464.827850341797,1.28141021728516" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@36" Target="@40" Category="References" Bounds="-3.75616845273468,95.1208878424036,88.2114873011138,112.1186169094" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@36" Target="@42" Category="CodeSchema_Calls" Bounds="16.0938211546489,95.1208878424036,86.6875381508041,36.5035744705192" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8" /> | |||||
<Link Source="@36" Target="@43" Category="CodeSchema_Calls" Bounds="22.0922451019287,55.4544143676758,274.062540054321,14.6664733886719" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3" /> | |||||
<Link Source="@37" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="65"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@37" Target="@35" Category="References" Bounds="-136.923675537109,89.5156097412109,278.957122802734,99.3549499511719" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@38" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@38" Target="@24" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3" /> | |||||
<Link Source="@38" Target="@33" Category="References" Bounds="-45.9306488037109,-57.0327377319336,265.705459594727,187.671440124512" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@38" Target="@35" Category="References" Bounds="-150.489059448242,-57.0327377319336,370.263870239258,245.696678161621" IsSourceVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@38" Target="@36" Category="CodeSchema_Calls" Bounds="14.6812677659018,-57.0327393125232,201.651590119645,122.481427501196" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8"> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@38" Target="@39" Category="CodeSchema_Calls" Bounds="266.013393005747,-57.0327393125232,308.213559113313,132.390855311324" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" /> | |||||
<Link Source="@38" Target="@42" Category="CodeSchema_Calls" Bounds="179.560455322266,-57.0327377319336,105.727355957031,188.734428405762" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@38" Target="@43" Category="CodeSchema_Calls" Bounds="252.269676224474,-57.0327393125232,121.028587582572,98.5125233366064" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" /> | |||||
<Link Source="@39" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="19"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@4" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="25"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@4" Target="@20" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="36"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="Implements" /> | |||||
</Link> | |||||
<Link Source="@4" Target="@23" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@4" Target="@24" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" /> | |||||
<Link Source="@4" Target="@33" Category="References" Bounds="-81.370201903088,-216.352595261688,440.032470522029,343.655104068722" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@4" Target="@35" Category="CodeSchema_Calls" Bounds="-182.069168153759,-248.10151139012,541.134160028598,433.521165961299" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3" /> | |||||
<Link Source="@4" Target="@36" Category="References" Bounds="7.29242737010385,-248.10151139012,353.235241127247,312.261545469268" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@4" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@4" Target="@42" Category="CodeSchema_Calls" Bounds="152.397467377085,-248.10151139012,215.107963361877,375.40986219178" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="8" /> | |||||
<Link Source="@40" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="20"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@40" Target="@30" Category="CodeSchema_Calls" Bounds="117.673457328631,239.31274299827,35.396748309959,24.8314378364254" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4" /> | |||||
<Link Source="@40" Target="@35" Category="References" Bounds="-121.892123176148,209.872515226056,160.988731917149,12.2986330590477" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@41" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="85"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_FieldRead" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@41" Target="@30" Category="CodeSchema_Calls" Bounds="204.984567227671,239.31274299827,38.5083528390632,25.0873690331276" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4" /> | |||||
<Link Source="@41" Target="@35" Category="References" Bounds="-121.369705200195,205.882476806641,315.023254394531,8.83036804199219" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="10"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="Implements" /> | |||||
</Link> | |||||
<Link Source="@42" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@42" Target="@35" Category="References" Bounds="-124.127906329075,160.117264520783,187.680438074604,30.3855113278257" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="9"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@42" Target="@41" Category="CodeSchema_Calls" Bounds="160.004002735722,160.117264520783,75.885130207303,49.2928545072856" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" /> | |||||
<Link Source="@43" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@44" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="5"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@44" Target="@35" Category="References" Bounds="-324.442295480889,158.910273343993,77.7794104997027,28.9929590339576" IsSourceVirtualized="True" Weight="2" /> | |||||
<Link Source="@45" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="18"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@45" Target="@35" Category="References" Bounds="-443.820129394531,100.608604431152,230.161636352539,82.2046127319336" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@45" Target="@44" Category="InheritsFrom" Bounds="-468.057622078801,103.910173343993,68.8422863537638,26.5785078362495" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@46" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@46" Target="@32" Category="CodeSchema_Calls" Bounds="-645.973687089168,103.910173343993,43.7408743879914,25.4711474142345" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@46" Target="@35" Category="References" Bounds="-597.746459960938,103.910171508789,310.515930175781,89.5489654541016" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@46" Target="@44" Category="InheritsFrom" Bounds="-597.107086543593,103.910173343993,159.445122354257,28.3377415407585" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@47" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@47" Target="@35" Category="References" Bounds="-348.457763671875,48.9101715087891,132.811965942383,134.205917358398" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@47" Target="@44" Category="InheritsFrom" Bounds="-420.364715576172,48.9101715087891,33.2177734375,80.1400604248047" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@48" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="6"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@48" Target="@32" Category="CodeSchema_Calls" Bounds="-489.31232125257,100.61252213059,238.35747096364,33.8977091230163" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2" /> | |||||
<Link Source="@48" Target="@35" Category="References" Bounds="-199.817828089903,102.842001266396,18.215390936528,79.4324662957812" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@48" Target="@44" Category="InheritsFrom" Bounds="-308.949055287449,102.842001266396,90.2528751305543,28.2320909691802" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@49" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="3"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_ReturnTypeLink" /> | |||||
</Link> | |||||
<Link Source="@49" Target="@35" Category="References" Bounds="-365.210205078125,-6.0898265838623,149.564407348633,189.20591545105" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="4"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@49" Target="@44" Category="InheritsFrom" Bounds="-479.412322998047,-6.0898265838623,87.5677795410156,135.761396408081" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="2"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@6" Target="@10" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="73"> | |||||
<Category Ref="CodeSchema_AttributeUse" /> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
<Category Ref="InheritsFrom" /> | |||||
</Link> | |||||
<Link Source="@6" Target="@14" Category="CodeSchema_AttributeUse" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="55"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@6" Target="@23" Category="References" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="95"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@6" Target="@33" Category="References" Bounds="-92.7279684575433,-216.352595261688,197.559089794032,341.404906561782" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="48"> | |||||
<Category Ref="CodeSchema_Calls" /> | |||||
</Link> | |||||
<Link Source="@6" Target="@35" Category="CodeSchema_Calls" Bounds="-191.092021354364,-248.10151139012,294.625765810894,431.714437106728" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="7" /> | |||||
<Link Source="@6" Target="@38" Category="CodeSchema_Calls" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="21" /> | |||||
<Link Source="@8" Target="@10" Category="CodeSchema_AttributeUse" IsTargetVirtualized="True" Weight="14" /> | |||||
<Link Source="@8" Target="@22" Category="Contains" FetchingParent="@8" /> | |||||
<Link Source="@8" Target="@23" Category="Contains" FetchingParent="@8" /> | |||||
<Link Source="@8" Target="@24" Category="Contains" FetchingParent="@8" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@10" Category="Contains" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@12" Category="Contains" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@14" Category="Contains" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@16" Category="Contains" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@18" Category="Contains" /> | |||||
<Link Source="_standardGraphExternalsGroup" Target="@20" Category="Contains" /> | |||||
</Links> | |||||
<Categories> | |||||
<Category Id="CodeSchema_Assembly" Label="程序集" BasedOn="File" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="CodeSchema_Assembly" NavigationActionLabel="程序集" /> | |||||
<Category Id="CodeSchema_AttributeUse" Label="使用特性" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="使用者" OutgoingActionLabel="使用特性" /> | |||||
<Category Id="CodeSchema_Calls" Label="调用" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="调用者" OutgoingActionLabel="调用" /> | |||||
<Category Id="CodeSchema_Class" Label="类" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="类" /> | |||||
<Category Id="CodeSchema_FieldRead" Label="字段读取" BasedOn="CodeSchema_FieldReference" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="读取方" OutgoingActionLabel="读取字段" /> | |||||
<Category Id="CodeSchema_FieldReference" Label="字段引用" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="引用方" OutgoingActionLabel="引用字段" /> | |||||
<Category Id="CodeSchema_Interface" Label="接口" BasedOn="CodeSchema_Type" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Interface" NavigationActionLabel="接口" /> | |||||
<Category Id="CodeSchema_Namespace" Label="命名空间" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Type" Icon="CodeSchema_Namespace" NavigationActionLabel="命名空间" /> | |||||
<Category Id="CodeSchema_ReturnTypeLink" Label="返回" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="返回类型" OutgoingActionLabel="返回类型" /> | |||||
<Category Id="CodeSchema_Type" Label="类型" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Member" Icon="CodeSchema_Class" NavigationActionLabel="类型" /> | |||||
<Category Id="Contains" Label="包含" Description="链接的源是否包含目标对象" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="包含者" IsContainment="True" OutgoingActionLabel="包含" /> | |||||
<Category Id="Externals" Label="外部" CanBeDataDriven="True" IsProviderRoot="False" NavigationActionLabel="外部" /> | |||||
<Category Id="File" Label="文件" CanBeDataDriven="True" DefaultAction="Microsoft.Contains" Icon="File" NavigationActionLabel="文件" /> | |||||
<Category Id="FileSystem.Category.FileOfType.dll" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" /> | |||||
<Category Id="FileSystem.Category.FileOfType.exe" BasedOn="CodeSchema_Assembly" CanBeDataDriven="True" IsProviderRoot="False" /> | |||||
<Category Id="Implements" Label="实现" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="实现者" OutgoingActionLabel="实现" /> | |||||
<Category Id="InheritsFrom" Label="继承自" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="继承者" OutgoingActionLabel="继承自" /> | |||||
<Category Id="References" Label="引用" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="引用者" OutgoingActionLabel="引用" /> | |||||
</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_IsAbstract" Label="是抽象的" Description="一个标志,用于指示该成员是“抽象”成员且不提供完整实现" DataType="System.Boolean" /> | |||||
<Property Id="CodeSchemaProperty_IsExternal" Label="是外部的" Description="一个标志,用于指示此节点是否被认为是外部的" DataType="System.Boolean" /> | |||||
<Property Id="CodeSchemaProperty_IsInternal" Label="是内部的" Description="一个标志,用于指示该方法是“内部”方法" DataType="System.Boolean" /> | |||||
<Property Id="CodeSchemaProperty_IsPublic" Label="是公共的" Description="一个标志,用于指示该范围是“公共”范围" DataType="System.Boolean" /> | |||||
<Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" /> | |||||
<Property Id="DataVirtualized" Label="已虚拟化数据" Description="如果为 true,则图中可以包含表示虚拟化节点/链接(即,不在图中实际创建)的数据的节点和链接。" DataType="System.Boolean" /> | |||||
<Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" /> | |||||
<Property Id="DelayedChildNodesState" Label="延迟的子节点状态" Description="如果未指定延迟的子节点状态,则为 Unspecified。如果尚未将组包含的子节点提取到关系图中,则为 NotFetched。如果已提取组内的所有延迟的子节点,则为 Fetched。" DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" /> | |||||
<Property Id="DelayedCrossGroupLinksState" Label="延迟的跨组链接状态" Description="如果未指定延迟的跨组链接状态,则为 Unspecified。如果尚未将此节点上延迟的跨组链接提取到关系图中,则为 NotFetched。如果已提取所有延迟的跨组链接,则为 Fetched。" DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" /> | |||||
<Property Id="Expression" DataType="System.String" /> | |||||
<Property Id="FetchedChildrenCount" DataType="System.Int32" /> | |||||
<Property Id="FetchingParent" DataType="Microsoft.VisualStudio.GraphModel.GraphNodeId" /> | |||||
<Property Id="FilePath" Label="文件路径" Description="文件路径" DataType="System.String" /> | |||||
<Property Id="Group" Label="组" Description="将节点显示为组" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" /> | |||||
<Property Id="GroupLabel" DataType="System.String" /> | |||||
<Property Id="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="已虚拟化链接源" Description="如果为 true,则链接源端包含虚拟化节点/链接(即,不在图中实际创建)的数据。" DataType="System.Boolean" /> | |||||
<Property Id="IsTargetVirtualized" Label="已虚拟化链接目标" Description="如果为 true,则链接目标端包含虚拟化节点/链接(即,不在图中实际创建)的数据。" DataType="System.Boolean" /> | |||||
<Property Id="Label" Label="标签" Description="可批注对象的可显示标签" 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="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="粗细" Description="粗细" DataType="System.Double" /> | |||||
</Properties> | |||||
<QualifiedNames> | |||||
<Name Id="Assembly" Label="程序集" ValueType="Uri" /> | |||||
<Name Id="Namespace" Label="命名空间" ValueType="System.String" /> | |||||
<Name Id="Type" Label="类型" ValueType="System.Object" /> | |||||
</QualifiedNames> | |||||
<IdentifierAliases> | |||||
<Alias n="1" Uri="Assembly=$(88c57185-5e00-454e-91e9-6e8aad0e99fc.OutputPathUri)" /> | |||||
<Alias n="2" Id="(@1)" /> | |||||
<Alias n="3" Uri="Assembly=$(03eb1725-ec1f-4933-b0e9-e7f48a5b414d.OutputPathUri)" /> | |||||
<Alias n="4" Id="(@3)" /> | |||||
<Alias n="5" Uri="Assembly=$(5cdbd16d-5d06-4868-a5e8-db2b62ef2182.OutputPathUri)" /> | |||||
<Alias n="6" Id="(@5)" /> | |||||
<Alias n="7" Uri="Assembly=$(ad6a9116-9faf-475d-8451-4316f2df910f.OutputPathUri)" /> | |||||
<Alias n="8" Id="(@7)" /> | |||||
<Alias n="9" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/mscorlib.dll" /> | |||||
<Alias n="10" Id="(@9)" /> | |||||
<Alias n="11" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/System.Drawing.dll" /> | |||||
<Alias n="12" Id="(@11)" /> | |||||
<Alias n="13" Uri="Assembly=$(appUri)/IDE/PublicAssemblies/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" /> | |||||
<Alias n="14" Id="(@13)" /> | |||||
<Alias n="15" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/System.dll" /> | |||||
<Alias n="16" Id="(@15)" /> | |||||
<Alias n="17" Uri="Assembly=$(FxReferenceAssembliesUri)/.NETFramework/v4.5/System.Windows.Forms.dll" /> | |||||
<Alias n="18" Id="(@17)" /> | |||||
<Alias n="19" Uri="Assembly=file:///D:/VisualStudio/Beetle.JT808/Lib/Beetle.Express.dll" /> | |||||
<Alias n="20" Id="(@19)" /> | |||||
<Alias n="21" Id="Namespace=Beetle.JT808" /> | |||||
<Alias n="22" Id="(@7 @21)" /> | |||||
<Alias n="23" Id="(@7 Namespace=Beetle.JT808.Messages)" /> | |||||
<Alias n="24" Id="(@7 Namespace=Beetle.JT808.Serializes)" /> | |||||
<Alias n="25" Id="(@7 @21 Type=ASCIIHandler)" /> | |||||
<Alias n="26" Id="(@7 @21 Type=ByteBitHandler)" /> | |||||
<Alias n="27" Id="(@7 @21 Type=ByteHandler)" /> | |||||
<Alias n="28" Id="(@7 @21 Type=BytesHandler)" /> | |||||
<Alias n="29" Id="(@7 @21 Type=CBDHandler)" /> | |||||
<Alias n="30" Id="(@7 @21 Type=Core)" /> | |||||
<Alias n="31" Id="(@7 @21 Type=GBKHandler)" /> | |||||
<Alias n="32" Id="(@7 @21 Type=IBitCustomType)" /> | |||||
<Alias n="33" Id="(@7 @21 Type=IMessage)" /> | |||||
<Alias n="34" Id="(@7 @21 Type=IMessageBody)" /> | |||||
<Alias n="35" Id="(@7 @21 Type=IProtocolBuffer)" /> | |||||
<Alias n="36" Id="(@7 @21 Type=Message)" /> | |||||
<Alias n="37" Id="(@7 @21 Type=MessageBodyAttributes)" /> | |||||
<Alias n="38" Id="(@7 @21 Type=MessageFactory)" /> | |||||
<Alias n="39" Id="(@7 @21 Type=MessageTypeAttribute)" /> | |||||
<Alias n="40" Id="(@7 @21 Type=PacketInfo)" /> | |||||
<Alias n="41" Id="(@7 @21 Type=ProtocolBuffer)" /> | |||||
<Alias n="42" Id="(@7 @21 Type=ProtocolBufferPool)" /> | |||||
<Alias n="43" Id="(@7 @21 Type=ProtocolProcessError)" /> | |||||
<Alias n="44" Id="(@7 @21 Type=ReadWriteHandlerAttribute)" /> | |||||
<Alias n="45" Id="(@7 @21 Type=TimeBCD)" /> | |||||
<Alias n="46" Id="(@7 @21 Type=UInt16BitHandler)" /> | |||||
<Alias n="47" Id="(@7 @21 Type=UInt16Handler)" /> | |||||
<Alias n="48" Id="(@7 @21 Type=UIntBitHandler)" /> | |||||
<Alias n="49" Id="(@7 @21 Type=UIntHandler)" /> | |||||
</IdentifierAliases> | |||||
<Styles> | |||||
<Style TargetType="Node" GroupLabel="结果" ValueLabel="True"> | |||||
<Condition Expression="HasCategory('QueryResult')" /> | |||||
<Setter Property="Background" Value="#FFBCFFBE" /> | |||||
</Style> | |||||
<Style TargetType="Node" GroupLabel="程序集" ValueLabel="具有类别"> | |||||
<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="命名空间" ValueLabel="具有类别"> | |||||
<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="接口" ValueLabel="具有类别"> | |||||
<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="结构" ValueLabel="具有类别"> | |||||
<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="枚举" ValueLabel="具有类别"> | |||||
<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="委托" ValueLabel="具有类别"> | |||||
<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="类" ValueLabel="具有类别"> | |||||
<Condition Expression="HasCategory('CodeSchema_Type')" /> | |||||
<Setter Property="Background" Value="#FF1382CE" /> | |||||
<Setter Property="Stroke" Value="#FF1382CE" /> | |||||
<Setter Property="Icon" Value="CodeSchema_Class" /> | |||||
</Style> | |||||
<Style TargetType="Node" GroupLabel="属性" ValueLabel="具有类别"> | |||||
<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="方法" ValueLabel="具有类别"> | |||||
<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="事件" ValueLabel="具有类别"> | |||||
<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="字段" ValueLabel="具有类别"> | |||||
<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="True"> | |||||
<Condition Expression="CodeSchemaProperty_IsOut = 'True'" /> | |||||
<Setter Property="Icon" Value="CodeSchema_OutParameter" /> | |||||
</Style> | |||||
<Style TargetType="Node" GroupLabel="Parameter" ValueLabel="True"> | |||||
<Condition Expression="HasCategory('CodeSchema_Parameter')" /> | |||||
<Setter Property="Icon" Value="CodeSchema_Parameter" /> | |||||
</Style> | |||||
<Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="True"> | |||||
<Condition Expression="HasCategory('CodeSchema_LocalExpression')" /> | |||||
<Setter Property="Icon" Value="CodeSchema_LocalExpression" /> | |||||
</Style> | |||||
<Style TargetType="Node" GroupLabel="外部" ValueLabel="具有类别"> | |||||
<Condition Expression="HasCategory('Externals')" /> | |||||
<Setter Property="Background" Value="#FF424242" /> | |||||
<Setter Property="Stroke" Value="#FF424242" /> | |||||
</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="Field Read" ValueLabel="True" Visibility="Hidden"> | |||||
<Condition Expression="Target.HasCategory('CodeSchema_Field') And HasCategory('CodeSchema_FieldRead')" /> | |||||
<Setter Property="StrokeDashArray" Value="2 2" /> | |||||
</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> | |||||
</Styles> | |||||
<Paths> | |||||
<Path Id="03eb1725-ec1f-4933-b0e9-e7f48a5b414d.OutputPath" Value="D:\VisualStudio\Beetle.JT808\Beetle.JT808\Beetle.TJ808.BaseServer\bin\Release\Beetle.TJ808.BaseServer.exe" /> | |||||
<Path Id="03eb1725-ec1f-4933-b0e9-e7f48a5b414d.OutputPathUri" Value="file:///D:/VisualStudio/Beetle.JT808/Beetle.JT808/Beetle.TJ808.BaseServer/bin/Release/Beetle.TJ808.BaseServer.exe" /> | |||||
<Path Id="5cdbd16d-5d06-4868-a5e8-db2b62ef2182.OutputPath" Value="D:\VisualStudio\Beetle.JT808\Beetle.JT808\Beetle.JT808.UnitTestProject1\bin\Release\Beetle.JT808.UnitTestProject1.dll" /> | |||||
<Path Id="5cdbd16d-5d06-4868-a5e8-db2b62ef2182.OutputPathUri" Value="file:///D:/VisualStudio/Beetle.JT808/Beetle.JT808/Beetle.JT808.UnitTestProject1/bin/Release/Beetle.JT808.UnitTestProject1.dll" /> | |||||
<Path Id="88c57185-5e00-454e-91e9-6e8aad0e99fc.OutputPath" Value="D:\VisualStudio\Beetle.JT808\Beetle.JT808\Beetle.JT808.ClientApp\bin\Release\Beetle.JT808.ClientApp.exe" /> | |||||
<Path Id="88c57185-5e00-454e-91e9-6e8aad0e99fc.OutputPathUri" Value="file:///D:/VisualStudio/Beetle.JT808/Beetle.JT808/Beetle.JT808.ClientApp/bin/Release/Beetle.JT808.ClientApp.exe" /> | |||||
<Path Id="ad6a9116-9faf-475d-8451-4316f2df910f.OutputPath" Value="D:\VisualStudio\Beetle.JT808\Beetle.JT808\Beetle.JT808\bin\Release\Beetle.JT808.dll" /> | |||||
<Path Id="ad6a9116-9faf-475d-8451-4316f2df910f.OutputPathUri" Value="file:///D:/VisualStudio/Beetle.JT808/Beetle.JT808/Beetle.JT808/bin/Release/Beetle.JT808.dll" /> | |||||
<Path Id="app" Value="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7" /> | |||||
<Path Id="appUri" Value="file:///C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7" /> | |||||
<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> |
@@ -0,0 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8" ?> | |||||
<configuration> | |||||
<startup> | |||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||||
</startup> | |||||
</configuration> |
@@ -0,0 +1,94 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{88C57185-5E00-454E-91E9-6E8AAD0E99FC}</ProjectGuid> | |||||
<OutputType>WinExe</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>Beetle.JT808.ClientApp</RootNamespace> | |||||
<AssemblyName>Beetle.JT808.ClientApp</AssemblyName> | |||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<PlatformTarget>AnyCPU</PlatformTarget> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<PlatformTarget>AnyCPU</PlatformTarget> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Core" /> | |||||
<Reference Include="System.Xml.Linq" /> | |||||
<Reference Include="System.Data.DataSetExtensions" /> | |||||
<Reference Include="Microsoft.CSharp" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Deployment" /> | |||||
<Reference Include="System.Drawing" /> | |||||
<Reference Include="System.Windows.Forms" /> | |||||
<Reference Include="System.Xml" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="FrmMain.cs"> | |||||
<SubType>Form</SubType> | |||||
</Compile> | |||||
<Compile Include="FrmMain.Designer.cs"> | |||||
<DependentUpon>FrmMain.cs</DependentUpon> | |||||
</Compile> | |||||
<Compile Include="Program.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
<EmbeddedResource Include="FrmMain.resx"> | |||||
<DependentUpon>FrmMain.cs</DependentUpon> | |||||
</EmbeddedResource> | |||||
<EmbeddedResource Include="Properties\Resources.resx"> | |||||
<Generator>ResXFileCodeGenerator</Generator> | |||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | |||||
<SubType>Designer</SubType> | |||||
</EmbeddedResource> | |||||
<Compile Include="Properties\Resources.Designer.cs"> | |||||
<AutoGen>True</AutoGen> | |||||
<DependentUpon>Resources.resx</DependentUpon> | |||||
</Compile> | |||||
<None Include="Properties\Settings.settings"> | |||||
<Generator>SettingsSingleFileGenerator</Generator> | |||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | |||||
</None> | |||||
<Compile Include="Properties\Settings.Designer.cs"> | |||||
<AutoGen>True</AutoGen> | |||||
<DependentUpon>Settings.settings</DependentUpon> | |||||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | |||||
</Compile> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<None Include="App.config" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\Beetle.JT808\Beetle.JT808.csproj"> | |||||
<Project>{ad6a9116-9faf-475d-8451-4316f2df910f}</Project> | |||||
<Name>Beetle.JT808</Name> | |||||
</ProjectReference> | |||||
</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> |
@@ -0,0 +1,159 @@ | |||||
namespace Beetle.JT808.ClientApp | |||||
{ | |||||
partial class FrmMain | |||||
{ | |||||
/// <summary> | |||||
/// 必需的设计器变量。 | |||||
/// </summary> | |||||
private System.ComponentModel.IContainer components = null; | |||||
/// <summary> | |||||
/// 清理所有正在使用的资源。 | |||||
/// </summary> | |||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> | |||||
protected override void Dispose(bool disposing) | |||||
{ | |||||
if (disposing && (components != null)) | |||||
{ | |||||
components.Dispose(); | |||||
} | |||||
base.Dispose(disposing); | |||||
} | |||||
#region Windows 窗体设计器生成的代码 | |||||
/// <summary> | |||||
/// 设计器支持所需的方法 - 不要 | |||||
/// 使用代码编辑器修改此方法的内容。 | |||||
/// </summary> | |||||
private void InitializeComponent() | |||||
{ | |||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip(); | |||||
this.txtConnectionStatus = new System.Windows.Forms.ToolStripStatusLabel(); | |||||
this.txtStatus = new System.Windows.Forms.ToolStripStatusLabel(); | |||||
this.groupBox1 = new System.Windows.Forms.GroupBox(); | |||||
this.groupBox2 = new System.Windows.Forms.GroupBox(); | |||||
this.groupBox3 = new System.Windows.Forms.GroupBox(); | |||||
this.label1 = new System.Windows.Forms.Label(); | |||||
this.textBox1 = new System.Windows.Forms.TextBox(); | |||||
this.label2 = new System.Windows.Forms.Label(); | |||||
this.statusStrip1.SuspendLayout(); | |||||
this.groupBox1.SuspendLayout(); | |||||
this.SuspendLayout(); | |||||
// | |||||
// statusStrip1 | |||||
// | |||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | |||||
this.txtConnectionStatus, | |||||
this.txtStatus}); | |||||
this.statusStrip1.Location = new System.Drawing.Point(3, 712); | |||||
this.statusStrip1.Name = "statusStrip1"; | |||||
this.statusStrip1.Size = new System.Drawing.Size(767, 22); | |||||
this.statusStrip1.TabIndex = 1; | |||||
this.statusStrip1.Text = "statusStrip1"; | |||||
// | |||||
// txtConnectionStatus | |||||
// | |||||
this.txtConnectionStatus.Name = "txtConnectionStatus"; | |||||
this.txtConnectionStatus.Size = new System.Drawing.Size(0, 17); | |||||
// | |||||
// txtStatus | |||||
// | |||||
this.txtStatus.Name = "txtStatus"; | |||||
this.txtStatus.Size = new System.Drawing.Size(0, 17); | |||||
// | |||||
// groupBox1 | |||||
// | |||||
this.groupBox1.Controls.Add(this.label2); | |||||
this.groupBox1.Controls.Add(this.textBox1); | |||||
this.groupBox1.Controls.Add(this.label1); | |||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; | |||||
this.groupBox1.Location = new System.Drawing.Point(3, 3); | |||||
this.groupBox1.Name = "groupBox1"; | |||||
this.groupBox1.Size = new System.Drawing.Size(767, 63); | |||||
this.groupBox1.TabIndex = 2; | |||||
this.groupBox1.TabStop = false; | |||||
this.groupBox1.Text = "服务器信息"; | |||||
// | |||||
// groupBox2 | |||||
// | |||||
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; | |||||
this.groupBox2.Location = new System.Drawing.Point(3, 66); | |||||
this.groupBox2.Name = "groupBox2"; | |||||
this.groupBox2.Size = new System.Drawing.Size(767, 105); | |||||
this.groupBox2.TabIndex = 3; | |||||
this.groupBox2.TabStop = false; | |||||
this.groupBox2.Text = "注册信息"; | |||||
// | |||||
// groupBox3 | |||||
// | |||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top; | |||||
this.groupBox3.Location = new System.Drawing.Point(3, 171); | |||||
this.groupBox3.Name = "groupBox3"; | |||||
this.groupBox3.Size = new System.Drawing.Size(767, 580); | |||||
this.groupBox3.TabIndex = 4; | |||||
this.groupBox3.TabStop = false; | |||||
this.groupBox3.Text = "行驶信息设置"; | |||||
// | |||||
// label1 | |||||
// | |||||
this.label1.AutoSize = true; | |||||
this.label1.Location = new System.Drawing.Point(18, 29); | |||||
this.label1.Name = "label1"; | |||||
this.label1.Size = new System.Drawing.Size(59, 12); | |||||
this.label1.TabIndex = 0; | |||||
this.label1.Text = "服务地址:"; | |||||
// | |||||
// textBox1 | |||||
// | |||||
this.textBox1.Location = new System.Drawing.Point(89, 26); | |||||
this.textBox1.Name = "textBox1"; | |||||
this.textBox1.Size = new System.Drawing.Size(134, 21); | |||||
this.textBox1.TabIndex = 1; | |||||
// | |||||
// label2 | |||||
// | |||||
this.label2.AutoSize = true; | |||||
this.label2.Location = new System.Drawing.Point(258, 29); | |||||
this.label2.Name = "label2"; | |||||
this.label2.Size = new System.Drawing.Size(59, 12); | |||||
this.label2.TabIndex = 2; | |||||
this.label2.Text = "服务端口:"; | |||||
// | |||||
// FrmMain | |||||
// | |||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); | |||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |||||
this.ClientSize = new System.Drawing.Size(773, 737); | |||||
this.Controls.Add(this.groupBox3); | |||||
this.Controls.Add(this.groupBox2); | |||||
this.Controls.Add(this.groupBox1); | |||||
this.Controls.Add(this.statusStrip1); | |||||
this.MaximizeBox = false; | |||||
this.Name = "FrmMain"; | |||||
this.Padding = new System.Windows.Forms.Padding(3); | |||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | |||||
this.Text = "TJ/T 808 emulator"; | |||||
this.statusStrip1.ResumeLayout(false); | |||||
this.statusStrip1.PerformLayout(); | |||||
this.groupBox1.ResumeLayout(false); | |||||
this.groupBox1.PerformLayout(); | |||||
this.ResumeLayout(false); | |||||
this.PerformLayout(); | |||||
} | |||||
#endregion | |||||
private System.Windows.Forms.StatusStrip statusStrip1; | |||||
private System.Windows.Forms.ToolStripStatusLabel txtConnectionStatus; | |||||
private System.Windows.Forms.ToolStripStatusLabel txtStatus; | |||||
private System.Windows.Forms.GroupBox groupBox1; | |||||
private System.Windows.Forms.GroupBox groupBox2; | |||||
private System.Windows.Forms.GroupBox groupBox3; | |||||
private System.Windows.Forms.Label label2; | |||||
private System.Windows.Forms.TextBox textBox1; | |||||
private System.Windows.Forms.Label label1; | |||||
} | |||||
} | |||||
@@ -0,0 +1,20 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.ComponentModel; | |||||
using System.Data; | |||||
using System.Drawing; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using System.Windows.Forms; | |||||
namespace Beetle.JT808.ClientApp | |||||
{ | |||||
public partial class FrmMain : Form | |||||
{ | |||||
public FrmMain() | |||||
{ | |||||
InitializeComponent(); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,123 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<root> | |||||
<!-- | |||||
Microsoft ResX Schema | |||||
Version 2.0 | |||||
The primary goals of this format is to allow a simple XML format | |||||
that is mostly human readable. The generation and parsing of the | |||||
various data types are done through the TypeConverter classes | |||||
associated with the data types. | |||||
Example: | |||||
... ado.net/XML headers & schema ... | |||||
<resheader name="resmimetype">text/microsoft-resx</resheader> | |||||
<resheader name="version">2.0</resheader> | |||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||||
<value>[base64 mime encoded serialized .NET Framework object]</value> | |||||
</data> | |||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||||
<comment>This is a comment</comment> | |||||
</data> | |||||
There are any number of "resheader" rows that contain simple | |||||
name/value pairs. | |||||
Each data row contains a name, and value. The row also contains a | |||||
type or mimetype. Type corresponds to a .NET class that support | |||||
text/value conversion through the TypeConverter architecture. | |||||
Classes that don't support this are serialized and stored with the | |||||
mimetype set. | |||||
The mimetype is used for serialized objects, and tells the | |||||
ResXResourceReader how to depersist the object. This is currently not | |||||
extensible. For a given mimetype the value must be set accordingly: | |||||
Note - application/x-microsoft.net.object.binary.base64 is the format | |||||
that the ResXResourceWriter will generate, however the reader can | |||||
read any of the formats listed below. | |||||
mimetype: application/x-microsoft.net.object.binary.base64 | |||||
value : The object must be serialized with | |||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.soap.base64 | |||||
value : The object must be serialized with | |||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.bytearray.base64 | |||||
value : The object must be serialized into a byte array | |||||
: using a System.ComponentModel.TypeConverter | |||||
: and then encoded with base64 encoding. | |||||
--> | |||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |||||
<xsd:element name="root" msdata:IsDataSet="true"> | |||||
<xsd:complexType> | |||||
<xsd:choice maxOccurs="unbounded"> | |||||
<xsd:element name="metadata"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" use="required" type="xsd:string" /> | |||||
<xsd:attribute name="type" type="xsd:string" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" /> | |||||
<xsd:attribute ref="xml:space" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="assembly"> | |||||
<xsd:complexType> | |||||
<xsd:attribute name="alias" type="xsd:string" /> | |||||
<xsd:attribute name="name" type="xsd:string" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="data"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||||
<xsd:attribute ref="xml:space" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="resheader"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" use="required" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:choice> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:schema> | |||||
<resheader name="resmimetype"> | |||||
<value>text/microsoft-resx</value> | |||||
</resheader> | |||||
<resheader name="version"> | |||||
<value>2.0</value> | |||||
</resheader> | |||||
<resheader name="reader"> | |||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
<resheader name="writer"> | |||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||||
<value>127, 17</value> | |||||
</metadata> | |||||
</root> |
@@ -0,0 +1,22 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using System.Windows.Forms; | |||||
namespace Beetle.JT808.ClientApp | |||||
{ | |||||
static class Program | |||||
{ | |||||
/// <summary> | |||||
/// 应用程序的主入口点。 | |||||
/// </summary> | |||||
[STAThread] | |||||
static void Main() | |||||
{ | |||||
Application.EnableVisualStyles(); | |||||
Application.SetCompatibleTextRenderingDefault(false); | |||||
Application.Run(new FrmMain()); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,36 @@ | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// 有关程序集的常规信息通过以下 | |||||
// 特性集控制。更改这些特性值可修改 | |||||
// 与程序集关联的信息。 | |||||
[assembly: AssemblyTitle("Beetle.JT808.ClientApp")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("Beetle.JT808.ClientApp")] | |||||
[assembly: AssemblyCopyright("Copyright © 2016")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// 将 ComVisible 设置为 false 使此程序集中的类型 | |||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
// 则将该类型上的 ComVisible 特性设置为 true。 | |||||
[assembly: ComVisible(false)] | |||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
[assembly: Guid("c5e82d67-3f37-41c8-a58f-3950864f734f")] | |||||
// 程序集的版本信息由下面四个值组成: | |||||
// | |||||
// 主版本 | |||||
// 次版本 | |||||
// 生成号 | |||||
// 修订号 | |||||
// | |||||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||||
// 方法是按如下所示使用“*”: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@@ -0,0 +1,71 @@ | |||||
//------------------------------------------------------------------------------ | |||||
// <auto-generated> | |||||
// 此代码由工具生成。 | |||||
// 运行时版本: 4.0.30319.42000 | |||||
// | |||||
// 对此文件的更改可能会导致不正确的行为,并且如果 | |||||
// 重新生成代码,这些更改将丢失。 | |||||
// </auto-generated> | |||||
//------------------------------------------------------------------------------ | |||||
namespace Beetle.JT808.ClientApp.Properties | |||||
{ | |||||
/// <summary> | |||||
/// 一个强类型的资源类,用于查找本地化的字符串等。 | |||||
/// </summary> | |||||
// 此类是由 StronglyTypedResourceBuilder | |||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 | |||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen | |||||
// (以 /str 作为命令选项),或重新生成 VS 项目。 | |||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] | |||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||||
internal class Resources | |||||
{ | |||||
private static global::System.Resources.ResourceManager resourceMan; | |||||
private static global::System.Globalization.CultureInfo resourceCulture; | |||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |||||
internal Resources() | |||||
{ | |||||
} | |||||
/// <summary> | |||||
/// 返回此类使用的、缓存的 ResourceManager 实例。 | |||||
/// </summary> | |||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |||||
internal static global::System.Resources.ResourceManager ResourceManager | |||||
{ | |||||
get | |||||
{ | |||||
if ((resourceMan == null)) | |||||
{ | |||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Beetle.JT808.ClientApp.Properties.Resources", typeof(Resources).Assembly); | |||||
resourceMan = temp; | |||||
} | |||||
return resourceMan; | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性, | |||||
/// 方法是使用此强类型资源类。 | |||||
/// </summary> | |||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |||||
internal static global::System.Globalization.CultureInfo Culture | |||||
{ | |||||
get | |||||
{ | |||||
return resourceCulture; | |||||
} | |||||
set | |||||
{ | |||||
resourceCulture = value; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,117 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<root> | |||||
<!-- | |||||
Microsoft ResX Schema | |||||
Version 2.0 | |||||
The primary goals of this format is to allow a simple XML format | |||||
that is mostly human readable. The generation and parsing of the | |||||
various data types are done through the TypeConverter classes | |||||
associated with the data types. | |||||
Example: | |||||
... ado.net/XML headers & schema ... | |||||
<resheader name="resmimetype">text/microsoft-resx</resheader> | |||||
<resheader name="version">2.0</resheader> | |||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |||||
<value>[base64 mime encoded serialized .NET Framework object]</value> | |||||
</data> | |||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |||||
<comment>This is a comment</comment> | |||||
</data> | |||||
There are any number of "resheader" rows that contain simple | |||||
name/value pairs. | |||||
Each data row contains a name, and value. The row also contains a | |||||
type or mimetype. Type corresponds to a .NET class that support | |||||
text/value conversion through the TypeConverter architecture. | |||||
Classes that don't support this are serialized and stored with the | |||||
mimetype set. | |||||
The mimetype is used for serialized objects, and tells the | |||||
ResXResourceReader how to depersist the object. This is currently not | |||||
extensible. For a given mimetype the value must be set accordingly: | |||||
Note - application/x-microsoft.net.object.binary.base64 is the format | |||||
that the ResXResourceWriter will generate, however the reader can | |||||
read any of the formats listed below. | |||||
mimetype: application/x-microsoft.net.object.binary.base64 | |||||
value : The object must be serialized with | |||||
: System.Serialization.Formatters.Binary.BinaryFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.soap.base64 | |||||
value : The object must be serialized with | |||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |||||
: and then encoded with base64 encoding. | |||||
mimetype: application/x-microsoft.net.object.bytearray.base64 | |||||
value : The object must be serialized into a byte array | |||||
: using a System.ComponentModel.TypeConverter | |||||
: and then encoded with base64 encoding. | |||||
--> | |||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |||||
<xsd:element name="root" msdata:IsDataSet="true"> | |||||
<xsd:complexType> | |||||
<xsd:choice maxOccurs="unbounded"> | |||||
<xsd:element name="metadata"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" /> | |||||
<xsd:attribute name="type" type="xsd:string" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="assembly"> | |||||
<xsd:complexType> | |||||
<xsd:attribute name="alias" type="xsd:string" /> | |||||
<xsd:attribute name="name" type="xsd:string" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="data"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> | |||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
<xsd:element name="resheader"> | |||||
<xsd:complexType> | |||||
<xsd:sequence> | |||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |||||
</xsd:sequence> | |||||
<xsd:attribute name="name" type="xsd:string" use="required" /> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:choice> | |||||
</xsd:complexType> | |||||
</xsd:element> | |||||
</xsd:schema> | |||||
<resheader name="resmimetype"> | |||||
<value>text/microsoft-resx</value> | |||||
</resheader> | |||||
<resheader name="version"> | |||||
<value>2.0</value> | |||||
</resheader> | |||||
<resheader name="reader"> | |||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
<resheader name="writer"> | |||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |||||
</resheader> | |||||
</root> |
@@ -0,0 +1,30 @@ | |||||
//------------------------------------------------------------------------------ | |||||
// <auto-generated> | |||||
// This code was generated by a tool. | |||||
// Runtime Version:4.0.30319.42000 | |||||
// | |||||
// Changes to this file may cause incorrect behavior and will be lost if | |||||
// the code is regenerated. | |||||
// </auto-generated> | |||||
//------------------------------------------------------------------------------ | |||||
namespace Beetle.JT808.ClientApp.Properties | |||||
{ | |||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] | |||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase | |||||
{ | |||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); | |||||
public static Settings Default | |||||
{ | |||||
get | |||||
{ | |||||
return defaultInstance; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,7 @@ | |||||
<?xml version='1.0' encoding='utf-8'?> | |||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | |||||
<Profiles> | |||||
<Profile Name="(Default)" /> | |||||
</Profiles> | |||||
<Settings /> | |||||
</SettingsFile> |
@@ -0,0 +1,92 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>Beetle.JT808.UnitTestProject1</RootNamespace> | |||||
<AssemblyName>Beetle.JT808.UnitTestProject1</AssemblyName> | |||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | |||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | |||||
<IsCodedUITest>False</IsCodedUITest> | |||||
<TestProjectType>UnitTest</TestProjectType> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="Beetle.Express"> | |||||
<HintPath>..\..\Lib\Beetle.Express.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="System" /> | |||||
</ItemGroup> | |||||
<Choose> | |||||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'"> | |||||
<ItemGroup> | |||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | |||||
</ItemGroup> | |||||
</When> | |||||
<Otherwise> | |||||
<ItemGroup> | |||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" /> | |||||
</ItemGroup> | |||||
</Otherwise> | |||||
</Choose> | |||||
<ItemGroup> | |||||
<Compile Include="UnitTest1.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\Beetle.JT808\Beetle.JT808.csproj"> | |||||
<Project>{ad6a9116-9faf-475d-8451-4316f2df910f}</Project> | |||||
<Name>Beetle.JT808</Name> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<Choose> | |||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> | |||||
<ItemGroup> | |||||
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
</ItemGroup> | |||||
</When> | |||||
</Choose> | |||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | |||||
<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> |
@@ -0,0 +1,36 @@ | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// 有关程序集的常规信息通过以下特性集 | |||||
// 控制。更改这些特性值可修改 | |||||
// 与程序集关联的信息。 | |||||
[assembly: AssemblyTitle("Beetle.JT808.UnitTestProject1")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("Beetle.JT808.UnitTestProject1")] | |||||
[assembly: AssemblyCopyright("Copyright © 2016")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// 将 ComVisible 设置为 false 会使此程序集中的类型 | |||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
// 请将该类型上的 ComVisible 特性设置为 true。 | |||||
[assembly: ComVisible(false)] | |||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
[assembly: Guid("6cb0dd38-40da-49b5-83ce-877c30bfb7ef")] | |||||
// 程序集的版本信息由以下四个值组成: | |||||
// | |||||
// 主版本 | |||||
// 次版本 | |||||
// 生成号 | |||||
// 修订号 | |||||
// | |||||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||||
// 方法是按如下所示使用“*”: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@@ -0,0 +1,190 @@ | |||||
using System; | |||||
using Microsoft.VisualStudio.TestTools.UnitTesting; | |||||
namespace Beetle.JT808.UnitTestProject1 | |||||
{ | |||||
[TestClass] | |||||
public class UnitTest1 | |||||
{ | |||||
[TestMethod] | |||||
public void TestMethod1() | |||||
{ | |||||
//Beetle.Express.Clients.SyncTcpClient client = new Express.Clients.SyncTcpClient("192.168.1.184", 5555); | |||||
//DateTime dt = new DateTime(2016, 12, 23, 13, 50, 50); | |||||
//IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientPostion>(BUSINESS_NO, SIM, (m, b) => | |||||
//{ | |||||
// b.Direction = 4; | |||||
// b.Height = 5; | |||||
// b.Latitude = 56; | |||||
// b.Longitude = 100; | |||||
// b.Speed = 100; | |||||
// b.Status.ACC = true; | |||||
// b.Time = dt; | |||||
// b.WarningMark.DisplayTheFault = true; | |||||
//}); | |||||
//client.Send(buffer.Array, 0, buffer.Length); | |||||
Console.WriteLine("OK"); | |||||
} | |||||
private const UInt16 BUSINESS_NO = 1; | |||||
private const string SIM = "13660170908"; | |||||
[TestMethod] | |||||
public void TestClientResponse() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientResponse>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
b.BussinessNO = 12; | |||||
b.ResultID = 5; | |||||
b.Result = Messages.ResultType.Success; | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientResponse response = msg.GetBody<Messages.ClientResponse>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientResponse>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
Assert.AreEqual(response.BussinessNO, 12); | |||||
Assert.AreEqual(response.Result, Messages.ResultType.Success); | |||||
Assert.AreEqual(response.ResultID, 5); | |||||
} | |||||
[TestMethod] | |||||
public void TestClientPing() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientPing>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientPing response = msg.GetBody<Messages.ClientPing>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientPing>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
} | |||||
[TestMethod] | |||||
public void TestCenterResponse() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.CenterResponse>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
b.BussinessNO = 12; | |||||
b.ResultID = 5; | |||||
b.Result = Messages.ResultType.Success; | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.CenterResponse response = msg.GetBody<Messages.CenterResponse>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.CenterResponse>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
Assert.AreEqual(response.BussinessNO, 12); | |||||
Assert.AreEqual(response.Result, Messages.ResultType.Success); | |||||
Assert.AreEqual(response.ResultID, 5); | |||||
} | |||||
[TestMethod] | |||||
public void TestClientRegister() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientRegister>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
b.City = 5; | |||||
b.Color = 4; | |||||
b.DeviceID = "abc"; | |||||
b.DeviceNumber = "1002"; | |||||
b.PlateNumber = "粤A4XB38"; | |||||
b.Provider = "gdgz"; | |||||
b.Province = 10; | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientRegister register = msg.GetBody<Messages.ClientRegister>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientRegister>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
Assert.AreEqual(register.City, 5); | |||||
Assert.AreEqual(register.Color, 4); | |||||
Assert.AreEqual(register.DeviceID, "abc"); | |||||
Assert.AreEqual(register.DeviceNumber, "1002"); | |||||
Assert.AreEqual(register.PlateNumber, "粤A4XB38"); | |||||
Assert.AreEqual(register.Provider, "gdgz"); | |||||
Assert.AreEqual(register.Province, 10); | |||||
} | |||||
[TestMethod] | |||||
public void TestClientRegisterResponse() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientRegisterResponse>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
b.BusinessNO = 6; | |||||
b.Result = 10; | |||||
b.Signature = "bbqabc"; | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientRegisterResponse response = msg.GetBody<Messages.ClientRegisterResponse>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientRegisterResponse>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
Assert.AreEqual(response.BusinessNO, 6); | |||||
Assert.AreEqual(response.Result, 10); | |||||
Assert.AreEqual(response.Signature, "bbqabc"); | |||||
} | |||||
[TestMethod] | |||||
public void TestClientRegisterCancel() | |||||
{ | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientRegisterCancel>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
}); | |||||
buffer.Postion = 0; | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientRegisterCancel response = msg.GetBody<Messages.ClientRegisterCancel>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientRegisterCancel>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
} | |||||
[TestMethod] | |||||
public void TestClientSignature() | |||||
{ | |||||
} | |||||
[TestMethod] | |||||
public void TestClientPostion() | |||||
{ | |||||
DateTime dt = new DateTime(2016, 12, 23, 13, 50, 50); | |||||
IProtocolBuffer buffer = MessageFactory.MessateToBuffer<Messages.ClientPostion>(BUSINESS_NO, SIM, (m, b) => | |||||
{ | |||||
b.Direction = 4; | |||||
b.Height = 5; | |||||
b.Latitude = 56; | |||||
b.Longitude = 100; | |||||
b.Speed = 100; | |||||
b.Status.ACC = true; | |||||
b.Time = dt; | |||||
b.WarningMark.DisplayTheFault = true; | |||||
}); | |||||
buffer.Postion = 0; | |||||
Console.WriteLine(buffer.ToString()); | |||||
IMessage msg = MessageFactory.MessageFromBuffer(buffer); | |||||
Messages.ClientPostion postion = msg.GetBody<Messages.ClientPostion>(); | |||||
Assert.AreEqual(msg.ID, MessageFactory.GetMessageID<Messages.ClientPostion>()); | |||||
Assert.AreEqual(msg.SIM, SIM); | |||||
Assert.AreEqual(msg.BussinessNO, BUSINESS_NO); | |||||
Assert.AreEqual(postion.Direction, 4); | |||||
Assert.AreEqual(postion.Height, 5); | |||||
Assert.AreEqual(postion.Latitude, (uint)56); | |||||
Assert.AreEqual(postion.Longitude, (uint)100); | |||||
Assert.AreEqual(postion.Speed, 100); | |||||
Assert.AreEqual(postion.Status.ACC, true); | |||||
Assert.AreEqual(postion.Time, dt); | |||||
Assert.AreEqual(postion.WarningMark.DisplayTheFault, true); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,38 @@ | |||||
| |||||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||||
# Visual Studio 2012 | |||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Beetle.JT808", "Beetle.JT808\Beetle.JT808.csproj", "{AD6A9116-9FAF-475D-8451-4316F2DF910F}" | |||||
EndProject | |||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Beetle.JT808.ClientApp", "Beetle.JT808.ClientApp\Beetle.JT808.ClientApp.csproj", "{88C57185-5E00-454E-91E9-6E8AAD0E99FC}" | |||||
EndProject | |||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Beetle.JT808.UnitTestProject1", "Beetle.JT808.UnitTestProject1\Beetle.JT808.UnitTestProject1.csproj", "{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}" | |||||
EndProject | |||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Beetle.TJ808.BaseServer", "Beetle.TJ808.BaseServer\Beetle.TJ808.BaseServer.csproj", "{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}" | |||||
EndProject | |||||
Global | |||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||||
Debug|Any CPU = Debug|Any CPU | |||||
Release|Any CPU = Release|Any CPU | |||||
EndGlobalSection | |||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||||
{AD6A9116-9FAF-475D-8451-4316F2DF910F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{AD6A9116-9FAF-475D-8451-4316F2DF910F}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{AD6A9116-9FAF-475D-8451-4316F2DF910F}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{AD6A9116-9FAF-475D-8451-4316F2DF910F}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{88C57185-5E00-454E-91E9-6E8AAD0E99FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{88C57185-5E00-454E-91E9-6E8AAD0E99FC}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{88C57185-5E00-454E-91E9-6E8AAD0E99FC}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{88C57185-5E00-454E-91E9-6E8AAD0E99FC}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{5CDBD16D-5D06-4868-A5E8-DB2B62EF2182}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
EndGlobalSection | |||||
GlobalSection(SolutionProperties) = preSolution | |||||
HideSolutionNode = FALSE | |||||
EndGlobalSection | |||||
EndGlobal |
@@ -0,0 +1,80 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{AD6A9116-9FAF-475D-8451-4316F2DF910F}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>Beetle.JT808</RootNamespace> | |||||
<AssemblyName>Beetle.JT808</AssemblyName> | |||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Core" /> | |||||
<Reference Include="System.Xml.Linq" /> | |||||
<Reference Include="System.Data.DataSetExtensions" /> | |||||
<Reference Include="Microsoft.CSharp" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Net.Http" /> | |||||
<Reference Include="System.Xml" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="Messages\CenterResponse.cs" /> | |||||
<Compile Include="Messages\ClientPostion.cs" /> | |||||
<Compile Include="ProtocolProcessError.cs" /> | |||||
<Compile Include="Serializes\EmitHandler.cs" /> | |||||
<Compile Include="Serializes\IBitType.cs" /> | |||||
<Compile Include="Serializes\IReadWriteHandler.cs" /> | |||||
<Compile Include="Serializes\MessageTypeAttribute.cs" /> | |||||
<Compile Include="MessageBodyPacket.cs" /> | |||||
<Compile Include="MessageBodyAttributes.cs" /> | |||||
<Compile Include="IMessage.cs" /> | |||||
<Compile Include="IMessageBody.cs" /> | |||||
<Compile Include="Implement\Message.cs" /> | |||||
<Compile Include="Implement\ProtocolBuffer.cs" /> | |||||
<Compile Include="IProtocolBuffer.cs" /> | |||||
<Compile Include="MessageFactory.cs" /> | |||||
<Compile Include="Messages\ClientPing.cs" /> | |||||
<Compile Include="Messages\ClientRegister.cs" /> | |||||
<Compile Include="Messages\ClientRegisterCancel.cs" /> | |||||
<Compile Include="Messages\ClientRegisterResponse.cs" /> | |||||
<Compile Include="Messages\ClientSignature.cs" /> | |||||
<Compile Include="Messages\ClientResponse.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
<Compile Include="Core.cs" /> | |||||
<Compile Include="Serializes\PropertySerializeHandler.cs" /> | |||||
<Compile Include="Serializes\Serializer.cs" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<None Include="ClassDiagram1.cd" /> | |||||
</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> |
@@ -0,0 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<PropertyGroup> | |||||
<ProjectView>ProjectFiles</ProjectView> | |||||
</PropertyGroup> | |||||
</Project> |
@@ -0,0 +1,344 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<ClassDiagram MajorVersion="1" MinorVersion="1"> | |||||
<Class Name="Beetle.JT808.Core" Collapsed="true"> | |||||
<Position X="32.5" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAgAAAAAAABACAAAACAAAAAAAD4IAAAAAAAAQAAAAAg=</HashCode> | |||||
<FileName>Core.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Message" Collapsed="true" BaseTypeListCollapsed="true"> | |||||
<Position X="27.25" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAgJAAAAAAgAABAAABAAAAAACAAAAAAAAAAQBAACA=</HashCode> | |||||
<FileName>Implement\Message.cs</FileName> | |||||
</TypeIdentifier> | |||||
<Lollipop Position="0.2" Collapsed="true" /> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ProtocolBuffer" Collapsed="true" BaseTypeListCollapsed="true"> | |||||
<Position X="30.75" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAABCAAA7AGMIgARgARgAAgAAKACAgABwREAAAA=</HashCode> | |||||
<FileName>Implement\ProtocolBuffer.cs</FileName> | |||||
</TypeIdentifier> | |||||
<Lollipop Position="0.2" Collapsed="true" /> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ProtocolBufferPool" Collapsed="true"> | |||||
<Position X="32.5" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAABAAAAAAAAAAAAAAAIAAAAACAAABAAAAAABAACAA=</HashCode> | |||||
<FileName>Implement\ProtocolBuffer.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.MessageBodyAttributes" Collapsed="true"> | |||||
<Position X="29" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>IUAAgIAAAIAhAAAAgAAAAABgAgCAAAAgAAgAAAAAAAA=</HashCode> | |||||
<FileName>MessageBodyAttributes.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.PacketInfo" Collapsed="true"> | |||||
<Position X="25.5" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAgIAAAAAAAAAAAAAAAAQAAAAAAAAAAAEAAAAAAAA=</HashCode> | |||||
<FileName>MessageBodyPacket.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.MessageFactory" Collapsed="true"> | |||||
<Position X="30.75" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAEAAAAAAAACAAAAgAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>MessageFactory.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ProtocolProcessError" Collapsed="true"> | |||||
<Position X="34.25" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>ProtocolProcessError.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ReadWriteHandlerAttribute" Collapsed="true"> | |||||
<Position X="11.75" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ByteHandler" Collapsed="true"> | |||||
<Position X="20.75" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.BytesHandler" Collapsed="true"> | |||||
<Position X="0.5" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.UInt16Handler" Collapsed="true"> | |||||
<Position X="5" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.UIntHandler" Collapsed="true"> | |||||
<Position X="9.5" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ASCIIHandler" Collapsed="true"> | |||||
<Position X="14" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.CBDHandler" Collapsed="true"> | |||||
<Position X="16.25" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.GBKHandler" Collapsed="true"> | |||||
<Position X="18.5" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.TimeBCD" Collapsed="true"> | |||||
<Position X="23" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.ByteBitHandler" Collapsed="true"> | |||||
<Position X="2.75" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.UInt16BitHandler" Collapsed="true"> | |||||
<Position X="7.25" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.UIntBitHandler" Collapsed="true"> | |||||
<Position X="11.75" Y="2" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAABAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\IReadWriteHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.MessageTypeAttribute" Collapsed="true"> | |||||
<Position X="32.5" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAgAAAAABAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\MessageTypeAttribute.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.CenterResponse" Collapsed="true"> | |||||
<Position X="25.5" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAIAABAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Messages\CenterResponse.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientPing" Collapsed="true"> | |||||
<Position X="27.25" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Messages\ClientPing.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientPostion" Collapsed="true"> | |||||
<Position X="29" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAEBEAAAAAAACAIAAABAAAAAAAAAAAAAAEAAQA=</HashCode> | |||||
<FileName>Messages\ClientPostion.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientPostionWarningMark" Collapsed="true" BaseTypeListCollapsed="true"> | |||||
<Position X="32.5" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>EQACgIAAAAUIAAIFAAACIgAAAEAAQAAJBCAEUECACAI=</HashCode> | |||||
<FileName>Messages\ClientPostion.cs</FileName> | |||||
</TypeIdentifier> | |||||
<Lollipop Position="0.2" Collapsed="true" /> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientPostionStatus" Collapsed="true" BaseTypeListCollapsed="true"> | |||||
<Position X="30.75" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AIAwgIAAAEAIBAJBAAIIAAAAAAAAAAIAAAAAgCAACgA=</HashCode> | |||||
<FileName>Messages\ClientPostion.cs</FileName> | |||||
</TypeIdentifier> | |||||
<Lollipop Position="0.2" Collapsed="true" /> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientRegister" Collapsed="true"> | |||||
<Position X="34.25" Y="0.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAMAAAIAAAAAAAAAQAAAAAAAAAAkgAAAAA=</HashCode> | |||||
<FileName>Messages\ClientRegister.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientRegisterCancel" Collapsed="true"> | |||||
<Position X="25.5" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Messages\ClientRegisterCancel.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientRegisterResponse" Collapsed="true"> | |||||
<Position X="27.25" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAgAAE=</HashCode> | |||||
<FileName>Messages\ClientRegisterResponse.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientResponse" Collapsed="true"> | |||||
<Position X="29" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAIAABAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Messages\ClientResponse.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Messages.ClientSignature" Collapsed="true"> | |||||
<Position X="30.75" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=</HashCode> | |||||
<FileName>Messages\ClientSignature.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.FieldHandler" Collapsed="true"> | |||||
<Position X="34.25" Y="1.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAgAAIAEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.PropertyHandler" Collapsed="true"> | |||||
<Position X="27.25" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>ACQAAgAAIAAABABAIAAAAAAAAAAAAAAAAAAAAQAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.MethodHandler" Collapsed="true"> | |||||
<Position X="34.25" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AACAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAIEAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.InstanceHandler" Collapsed="true"> | |||||
<Position X="25.5" Y="2.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.ReflectionHandlerFactory" Collapsed="true"> | |||||
<Position X="25.5" Y="4.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAVAAAAAEBKIAEAABAEQAAAAAAEABABAgAAgAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.PropertySerializeHandler" Collapsed="true"> | |||||
<Position X="29" Y="3.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAIAAAAAABAAAAgAAAAAAAAAAAAAAEAAAA=</HashCode> | |||||
<FileName>Serializes\PropertySerializeHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.Serializer" Collapsed="true"> | |||||
<Position X="27.25" Y="4.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAACAAAAAEAAAAQAAAAAAAACBAAgAAAAACAAAAAAA=</HashCode> | |||||
<FileName>Serializes\Serializer.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Class Name="Beetle.JT808.Serializes.SerializerFactory" Collapsed="true"> | |||||
<Position X="29" Y="4.5" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAADBAgAAAAAAABAAAAAAAAAAAABAAAAAAACAAAAAAA=</HashCode> | |||||
<FileName>Serializes\Serializer.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Class> | |||||
<Interface Name="Beetle.JT808.IMessage" Collapsed="true"> | |||||
<Position X="27.25" Y="5.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAgJAAAAAAgAABAAABAAAAAACAAAAAAAAAAQBAACA=</HashCode> | |||||
<FileName>IMessage.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Interface> | |||||
<Interface Name="Beetle.JT808.IMessageBody" Collapsed="true"> | |||||
<Position X="29" Y="5.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>IMessageBody.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Interface> | |||||
<Interface Name="Beetle.JT808.IProtocolBuffer" Collapsed="true"> | |||||
<Position X="30.75" Y="5.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAABCAAAzACAIgABAARgAAgAAIAAAAABQQEAAAA=</HashCode> | |||||
<FileName>IProtocolBuffer.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Interface> | |||||
<Interface Name="Beetle.JT808.IBitCustomType" Collapsed="true"> | |||||
<Position X="25.5" Y="5.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\IBitType.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Interface> | |||||
<Enum Name="Beetle.JT808.Messages.ResultType" Collapsed="true"> | |||||
<Position X="25.5" Y="6.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAQAAAAAAAAAAAgAAAACAAAAAAAAAEAA=</HashCode> | |||||
<FileName>Messages\ClientResponse.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Enum> | |||||
<Delegate Name="Beetle.JT808.Serializes.GetValueHandler" Collapsed="true"> | |||||
<Position X="27.25" Y="7.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Delegate> | |||||
<Delegate Name="Beetle.JT808.Serializes.ObjectInstanceHandler" Collapsed="true"> | |||||
<Position X="29" Y="7.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Delegate> | |||||
<Delegate Name="Beetle.JT808.Serializes.SetValueHandler" Collapsed="true"> | |||||
<Position X="30.75" Y="7.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAgA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Delegate> | |||||
<Delegate Name="Beetle.JT808.Serializes.FastMethodHandler" Collapsed="true"> | |||||
<Position X="25.5" Y="7.75" Width="1.5" /> | |||||
<TypeIdentifier> | |||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAgQAAAAAAAAAAAAAAAAAAA=</HashCode> | |||||
<FileName>Serializes\EmitHandler.cs</FileName> | |||||
</TypeIdentifier> | |||||
</Delegate> | |||||
<Font Name="微软雅黑" Size="9" /> | |||||
</ClassDiagram> |
@@ -0,0 +1,96 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
class Core | |||||
{ | |||||
public byte[] Encode(string value) | |||||
{ | |||||
return Encoding.GetEncoding("GBK").GetBytes(value); | |||||
} | |||||
public string Decode(byte[] data, int offset, int count) | |||||
{ | |||||
return Encoding.GetEncoding("GBK").GetString(data, offset, count); | |||||
} | |||||
public static short SwapInt16(short v) | |||||
{ | |||||
return (short)(((v & 0xff) << 8) | ((v >> 8) & 0xff)); | |||||
} | |||||
public static ushort SwapUInt16(ushort v) | |||||
{ | |||||
return (ushort)(((v & 0xff) << 8) | ((v >> 8) & 0xff)); | |||||
} | |||||
public static int SwapInt32(int v) | |||||
{ | |||||
return (int)(((SwapInt16((short)v) & 0xffff) << 0x10) | | |||||
(SwapInt16((short)(v >> 0x10)) & 0xffff)); | |||||
} | |||||
public static uint SwapUInt32(uint v) | |||||
{ | |||||
return (uint)(((SwapUInt16((ushort)v) & 0xffff) << 0x10) | | |||||
(SwapUInt16((ushort)(v >> 0x10)) & 0xffff)); | |||||
} | |||||
public static long SwapInt64(long v) | |||||
{ | |||||
return (long)(((SwapInt32((int)v) & 0xffffffffL) << 0x20) | | |||||
(SwapInt32((int)(v >> 0x20)) & 0xffffffffL)); | |||||
} | |||||
public static ulong SwapUInt64(ulong v) | |||||
{ | |||||
return (ulong)(((SwapUInt32((uint)v) & 0xffffffffL) << 0x20) | | |||||
(SwapUInt32((uint)(v >> 0x20)) & 0xffffffffL)); | |||||
} | |||||
public static byte GetCRC(byte[] array, int offset, int count) | |||||
{ | |||||
//write crc | |||||
byte crc = 1; | |||||
for (int i = offset; i < offset + count; i++) | |||||
{ | |||||
if (i == 1) | |||||
crc = array[i]; | |||||
else | |||||
crc = (byte)(crc ^ array[i]); | |||||
} | |||||
return crc; | |||||
} | |||||
public static bool GetBitValue(uint value, int index) | |||||
{ | |||||
uint tag = 1; | |||||
tag = tag << (index); | |||||
return (value & tag) > 0; | |||||
} | |||||
public static byte GetByteBitValue(params bool[] values) | |||||
{ | |||||
byte result = 0; | |||||
for (int i = 0; i < values.Length; i++) | |||||
result = (byte)(result | ((values[i] ? 1 : 0) << i)); | |||||
return result; | |||||
} | |||||
public static ushort GetUShortBitValue(params bool[] values) | |||||
{ | |||||
ushort result = 0; | |||||
for (int i = 0; i < values.Length; i++) | |||||
result = (ushort)(result | ((values[i] ? 1 : 0) << i)); | |||||
return result; | |||||
} | |||||
public static uint GetUIntBitValue(params bool[] values) | |||||
{ | |||||
uint result = 0; | |||||
for (int i = 0; i < values.Length; i++) | |||||
result = (uint)(result | ((values[i] ? (uint)1 : (uint)0) << i)); | |||||
return result; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,23 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public interface IMessage | |||||
{ | |||||
ushort ID { get; set; } | |||||
MessageBodyAttributes Property { get; set; } | |||||
string SIM { get; set; } | |||||
ushort BussinessNO { get; set; } | |||||
PacketInfo Packet { get; set; } | |||||
void Save(IProtocolBuffer buffer); | |||||
void Load(IProtocolBuffer buffer); | |||||
object Body { get; set; } | |||||
byte CRC { get; set; } | |||||
T GetBody<T>(); | |||||
} | |||||
} |
@@ -0,0 +1,14 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public interface IMessageBody | |||||
{ | |||||
void Save(IProtocolBuffer buffer); | |||||
void Load(IProtocolBuffer buffer); | |||||
} | |||||
} |
@@ -0,0 +1,39 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public interface IProtocolBuffer | |||||
{ | |||||
bool Import(byte value); | |||||
int Import(byte[] data, int offset, int count); | |||||
void Reset(); | |||||
int Length { get; } | |||||
void SetLength(int length); | |||||
int Postion { get; set; } | |||||
byte[] Array { get; } | |||||
void Write(byte[] data); | |||||
void Write(byte data); | |||||
void Write(ushort value); | |||||
void Write(uint value); | |||||
void WriteBCD(string value); | |||||
void WriteASCII(string value, int length); | |||||
int WriteGBK(string value); | |||||
void WriteSubBuffer(IProtocolBuffer buffer); | |||||
void WriteTag(); | |||||
byte Read(); | |||||
byte[] Read(int length); | |||||
ushort ReadUInt16(); | |||||
uint ReadUInt(); | |||||
string ReadBCD(int length); | |||||
string ReadASCII(int length); | |||||
string ReadGBK(int length = -1); | |||||
void ReadSubBuffer(IProtocolBuffer buffer, int count); | |||||
} | |||||
} |
@@ -0,0 +1,143 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using Beetle.JT808.Serializes; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class Message : IMessage | |||||
{ | |||||
public Message() | |||||
{ | |||||
Property = new JT808.MessageBodyAttributes(); | |||||
} | |||||
public object Body | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public ushort ID | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public MessageBodyAttributes Property | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public string SIM | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public ushort BussinessNO | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public PacketInfo Packet | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public byte CRC | |||||
{ | |||||
get; | |||||
set; | |||||
} | |||||
public void Load(IProtocolBuffer buffer) | |||||
{ | |||||
byte crc = Core.GetCRC(buffer.Array, 1, buffer.Length - 3); | |||||
this.CRC = buffer.Array[buffer.Length - 2]; | |||||
if (this.CRC != crc) | |||||
throw new ProtocolProcessError("message check CRC error!"); | |||||
buffer.Read(); //read start | |||||
ID = buffer.ReadUInt16(); //read id | |||||
Property.Load(buffer); //read property | |||||
SIM = buffer.ReadBCD(6); //read sim | |||||
BussinessNO = buffer.ReadUInt16(); //read no | |||||
if (Property.IsPacket) //read packet | |||||
{ | |||||
Packet = new PacketInfo(); | |||||
Packet.Load(buffer); | |||||
} | |||||
if (Property.BodyLength > 0) //read body | |||||
{ | |||||
IProtocolBuffer bodybuffer = ProtocolBufferPool.Default.Pop(); | |||||
try | |||||
{ | |||||
buffer.ReadSubBuffer(bodybuffer, Property.BodyLength); | |||||
Serializer serializer = SerializerFactory.Defalut.Get(ID); | |||||
Body = serializer.CreateObject(); | |||||
serializer.Deserialize(Body, bodybuffer); | |||||
} | |||||
finally | |||||
{ | |||||
ProtocolBufferPool.Default.Push(bodybuffer); | |||||
} | |||||
} | |||||
this.CRC = buffer.Read(); //read crc | |||||
buffer.Read(); //read end | |||||
} | |||||
public void Save(IProtocolBuffer buffer) | |||||
{ | |||||
IProtocolBuffer bodybuffer = null; | |||||
try | |||||
{ | |||||
if (Packet != null) | |||||
Property.IsPacket = true; | |||||
if (Body != null) | |||||
{ | |||||
Serializer serializer = SerializerFactory.Defalut.Get(Body.GetType()); | |||||
if (serializer == null) | |||||
throw new ProtocolProcessError(string.Format("{0} serializer not found!", Body)); | |||||
ID = serializer.MessageType.ID; | |||||
if (!serializer.MessageType.NoBody) | |||||
{ | |||||
bodybuffer = ProtocolBufferPool.Default.Pop(); | |||||
serializer.Serialize(Body, bodybuffer); | |||||
if (bodybuffer.Length > MessageBodyAttributes.BODY_LENGTH) | |||||
throw new ProtocolProcessError("message body to long!"); | |||||
Property.BodyLength = (ushort)bodybuffer.Length; | |||||
} | |||||
} | |||||
buffer.WriteTag(); //write start | |||||
buffer.Write(ID); //write id | |||||
Property.Save(buffer); //write body property | |||||
buffer.WriteBCD(SIM); //write sim | |||||
buffer.Write(BussinessNO); //write no | |||||
if (Packet != null) //write packet | |||||
Packet.Save(buffer); | |||||
if (bodybuffer != null) //write body | |||||
buffer.WriteSubBuffer(bodybuffer); | |||||
byte crc = Core.GetCRC(buffer.Array, 1, buffer.Length - 1); | |||||
buffer.Write(crc); //write crc | |||||
buffer.WriteTag(); //write end | |||||
} | |||||
finally | |||||
{ | |||||
if (bodybuffer != null) | |||||
ProtocolBufferPool.Default.Push(bodybuffer); | |||||
} | |||||
} | |||||
public T GetBody<T>() | |||||
{ | |||||
return (T)Body; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,364 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class ProtocolBuffer : IProtocolBuffer | |||||
{ | |||||
private byte[] mArray = new byte[1024]; | |||||
private int mPostion; | |||||
private int mLength; | |||||
private bool mProtocolStart = false; | |||||
public const byte PROTOBUF_TAG = 0x7e; | |||||
public const byte REPLACE_TAG = 0x7d; | |||||
public bool Import(byte value) | |||||
{ | |||||
if (value == PROTOBUF_TAG) | |||||
{ | |||||
OnWrite(value); | |||||
if (!mProtocolStart) | |||||
{ | |||||
mProtocolStart = true; | |||||
} | |||||
else | |||||
{ | |||||
mPostion = 0; | |||||
return true; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
if (mProtocolStart) | |||||
{ | |||||
OnWrite(value); | |||||
} | |||||
} | |||||
return false; | |||||
} | |||||
public int Import(byte[] data, int offset, int count) | |||||
{ | |||||
int result = 0; | |||||
for (int i = 0; i < count; i++) | |||||
{ | |||||
result++; | |||||
byte value = data[offset + i]; | |||||
if (Import(value)) | |||||
return result; | |||||
} | |||||
return -1; | |||||
} | |||||
private byte OnRead() | |||||
{ | |||||
byte value = mArray[mPostion]; | |||||
mPostion++; | |||||
return value; | |||||
} | |||||
public byte Read() | |||||
{ | |||||
byte value = OnRead(); | |||||
if (value == REPLACE_TAG) | |||||
{ | |||||
value = Read(); | |||||
if (value == 0x01) | |||||
{ | |||||
return REPLACE_TAG; | |||||
} | |||||
else if (value == 0x02) | |||||
{ | |||||
return PROTOBUF_TAG; | |||||
} | |||||
} | |||||
return value; | |||||
} | |||||
public byte[] Read(int length) | |||||
{ | |||||
byte[] result = new byte[length]; | |||||
for (int i = 0; i < length; i++) | |||||
{ | |||||
result[i] = Read(); | |||||
} | |||||
return result; | |||||
} | |||||
private ProtocolBuffer OnWrite(byte value) | |||||
{ | |||||
mArray[mPostion] = value; | |||||
mPostion++; | |||||
mLength++; | |||||
return this; | |||||
} | |||||
public void WriteTag() | |||||
{ | |||||
OnWrite(PROTOBUF_TAG); | |||||
} | |||||
public void Write(byte data) | |||||
{ | |||||
if (data == PROTOBUF_TAG) | |||||
{ | |||||
OnWrite(REPLACE_TAG).OnWrite(0x02); | |||||
} | |||||
else if (data == REPLACE_TAG) | |||||
{ | |||||
OnWrite(REPLACE_TAG).OnWrite(0x01); | |||||
} | |||||
else | |||||
{ | |||||
OnWrite(data); | |||||
} | |||||
} | |||||
public void Write(byte[] data) | |||||
{ | |||||
for (int i = 0; i < data.Length; i++) | |||||
{ | |||||
Write(data[i]); | |||||
} | |||||
} | |||||
public int Length { get { return mLength; } } | |||||
public int Postion { get { return mPostion; } set { mPostion = value; } } | |||||
public byte[] Array { get { return mArray; } } | |||||
public void ReadSubBuffer(IProtocolBuffer buffer, int count) | |||||
{ | |||||
Buffer.BlockCopy(mArray, mPostion, buffer.Array, 0, count); | |||||
mPostion += count; | |||||
buffer.SetLength(count); | |||||
buffer.Postion = 0; | |||||
} | |||||
public void WriteSubBuffer(IProtocolBuffer buffer) | |||||
{ | |||||
Buffer.BlockCopy(buffer.Array, 0, mArray, mPostion, buffer.Length); | |||||
mPostion += buffer.Length; | |||||
mLength += buffer.Length; | |||||
} | |||||
public void SetLength(int length) | |||||
{ | |||||
mLength = length; | |||||
} | |||||
public void Reset() | |||||
{ | |||||
mPostion = 0; | |||||
mLength = 0; | |||||
mProtocolStart = false; | |||||
} | |||||
public void Write(ushort value) | |||||
{ | |||||
value = Core.SwapUInt16(value); | |||||
byte[] data = BitConverter.GetBytes(value); | |||||
Write(data); | |||||
} | |||||
public void Write(uint value) | |||||
{ | |||||
value = Core.SwapUInt32(value); | |||||
byte[] data = BitConverter.GetBytes(value); | |||||
Write(data); | |||||
} | |||||
public void WriteBCD(string value) | |||||
{ | |||||
byte[] data = str2Bcd(value); | |||||
Write(data); | |||||
} | |||||
public ushort ReadUInt16() | |||||
{ | |||||
byte[] data = Read(2); | |||||
ushort result = BitConverter.ToUInt16(data, 0); | |||||
return Core.SwapUInt16(result); | |||||
} | |||||
public uint ReadUInt() | |||||
{ | |||||
byte[] data = Read(4); | |||||
uint result = BitConverter.ToUInt32(data, 0); | |||||
return Core.SwapUInt32(result); | |||||
} | |||||
public string ReadBCD(int length) | |||||
{ | |||||
byte[] data = Read(length); | |||||
return bcd2Str(data); | |||||
} | |||||
public byte[] str2Bcd(String asc) | |||||
{ | |||||
int len = asc.Length; | |||||
int mod = len % 2; | |||||
if (mod != 0) | |||||
{ | |||||
asc = "0" + asc; | |||||
len = asc.Length; | |||||
} | |||||
byte[] abt = new byte[len]; | |||||
if (len >= 2) | |||||
{ | |||||
len = len / 2; | |||||
} | |||||
byte[] bbt = new byte[len]; | |||||
abt = System.Text.Encoding.ASCII.GetBytes(asc); | |||||
int j, k; | |||||
for (int p = 0; p < asc.Length / 2; p++) | |||||
{ | |||||
if ((abt[2 * p] >= '0') && (abt[2 * p] <= '9')) | |||||
{ | |||||
j = abt[2 * p] - '0'; | |||||
} | |||||
else if ((abt[2 * p] >= 'a') && (abt[2 * p] <= 'z')) | |||||
{ | |||||
j = abt[2 * p] - 'a' + 0x0a; | |||||
} | |||||
else | |||||
{ | |||||
j = abt[2 * p] - 'A' + 0x0a; | |||||
} | |||||
if ((abt[2 * p + 1] >= '0') && (abt[2 * p + 1] <= '9')) | |||||
{ | |||||
k = abt[2 * p + 1] - '0'; | |||||
} | |||||
else if ((abt[2 * p + 1] >= 'a') && (abt[2 * p + 1] <= 'z')) | |||||
{ | |||||
k = abt[2 * p + 1] - 'a' + 0x0a; | |||||
} | |||||
else | |||||
{ | |||||
k = abt[2 * p + 1] - 'A' + 0x0a; | |||||
} | |||||
int a = (j << 4) + k; | |||||
byte b = (byte)a; | |||||
bbt[p] = b; | |||||
} | |||||
return bbt; | |||||
} | |||||
public string bcd2Str(byte[] bytes) | |||||
{ | |||||
StringBuilder temp = new StringBuilder(bytes.Length * 2); | |||||
for (int i = 0; i < bytes.Length; i++) | |||||
{ | |||||
temp.Append((byte)((bytes[i] & 0xf0) >> 4)); | |||||
temp.Append((byte)(bytes[i] & 0x0f)); | |||||
} | |||||
return temp.ToString().Substring(0, 1).Equals("0") ? temp.ToString().Substring(1) : temp.ToString(); | |||||
} | |||||
public void WriteASCII(string value, int length) | |||||
{ | |||||
if (value.Length > length) | |||||
{ | |||||
value = value.Substring(0, length); | |||||
} | |||||
else | |||||
{ | |||||
for (int i = value.Length; i < length; i++) | |||||
{ | |||||
value = " " + value; | |||||
} | |||||
} | |||||
byte[] data = Encoding.ASCII.GetBytes(value); | |||||
Write(data); | |||||
} | |||||
public string ReadASCII(int length) | |||||
{ | |||||
byte[] data = Read(length); | |||||
return Encoding.ASCII.GetString(data); | |||||
} | |||||
public int WriteGBK(string value) | |||||
{ | |||||
int postion = mPostion; | |||||
byte[] data = Encoding.GetEncoding("GBK").GetBytes(value); | |||||
Write(data); | |||||
return mPostion - postion; | |||||
} | |||||
public string ReadGBK(int length = -1) | |||||
{ | |||||
if (length == -1) | |||||
return Encoding.GetEncoding("GBK").GetString(Array, mPostion, mLength - mPostion); | |||||
byte[] data = Read(length); | |||||
return Encoding.GetEncoding("GBK").GetString(data); | |||||
} | |||||
public override string ToString() | |||||
{ | |||||
string hex = BitConverter.ToString(Array, 0, Length).Replace("-", string.Empty); | |||||
return hex; | |||||
} | |||||
} | |||||
public class ProtocolBufferPool | |||||
{ | |||||
private System.Collections.Concurrent.ConcurrentStack<IProtocolBuffer> | |||||
mPool = new System.Collections.Concurrent.ConcurrentStack<IProtocolBuffer>(); | |||||
public ProtocolBufferPool() | |||||
{ | |||||
for (int i = 0; i < 1000; i++) | |||||
{ | |||||
mPool.Push(CreateBuffer()); | |||||
} | |||||
} | |||||
public IProtocolBuffer Pop() | |||||
{ | |||||
IProtocolBuffer result = null; | |||||
if (!mPool.TryPop(out result)) | |||||
{ | |||||
result = CreateBuffer(); | |||||
} | |||||
result.Reset(); | |||||
return result; | |||||
} | |||||
private IProtocolBuffer CreateBuffer() | |||||
{ | |||||
ProtocolBuffer buffer = new ProtocolBuffer(); | |||||
return buffer; | |||||
} | |||||
public void Push(IProtocolBuffer buffer) | |||||
{ | |||||
mPool.Push(buffer); | |||||
} | |||||
private static ProtocolBufferPool mDefault; | |||||
public static ProtocolBufferPool Default | |||||
{ | |||||
get | |||||
{ | |||||
if (mDefault == null) | |||||
mDefault = new ProtocolBufferPool(); | |||||
return mDefault; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,80 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class MessageBodyAttributes | |||||
{ | |||||
#region consts | |||||
public const ushort CUSTOM_HEIGHT = 0x8000; | |||||
public const ushort CUSTOM_LOW = 0x4000; | |||||
public const ushort IS_PACKET = 0x2000; | |||||
public const ushort ENCRYPT_HEIGHT = 0x1000; | |||||
public const ushort ENCRYPT_MIDDLE = 0x400; | |||||
public const ushort ENCRYPT_LOW = 0x200; | |||||
public const ushort BODY_LENGTH = 0x1FF; | |||||
#endregion | |||||
//保留位15 | |||||
public bool CustomHigh { get; set; } | |||||
//保留位14 | |||||
public bool CustomLow { get; set; } | |||||
//分包位13 | |||||
public bool IsPacket { get; set; } | |||||
//加密位12 | |||||
public bool EncryptHigh { get; set; } | |||||
//加密位11 | |||||
public bool EncryptMiddle { get; set; } | |||||
//加密位10 | |||||
public bool EncryptLow { get; set; } | |||||
//消息长度9-0 | |||||
public ushort BodyLength { get; set; } | |||||
public void Save(IProtocolBuffer buffer) | |||||
{ | |||||
ushort value = (ushort)(BodyLength & BODY_LENGTH); | |||||
if (CustomHigh) | |||||
value |= CUSTOM_HEIGHT; | |||||
if (CustomLow) | |||||
value |= CUSTOM_LOW; | |||||
if (IsPacket) | |||||
value |= IS_PACKET; | |||||
if (EncryptHigh) | |||||
value |= ENCRYPT_HEIGHT; | |||||
if (EncryptMiddle) | |||||
value |= ENCRYPT_MIDDLE; | |||||
if (EncryptLow) | |||||
value |= ENCRYPT_LOW; | |||||
buffer.Write(value); | |||||
} | |||||
public void Load(IProtocolBuffer buffer) | |||||
{ | |||||
ushort value = buffer.ReadUInt16(); | |||||
CustomHigh = (CUSTOM_HEIGHT & value) > 0; | |||||
CustomLow = (CUSTOM_LOW & value) > 0; | |||||
IsPacket = (IS_PACKET & value) > 0; | |||||
EncryptHigh = (ENCRYPT_HEIGHT & value) > 0; | |||||
EncryptMiddle = (ENCRYPT_MIDDLE & value) > 0; | |||||
EncryptLow = (ENCRYPT_LOW & value) > 0; | |||||
BodyLength = (ushort)(BODY_LENGTH & value); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,32 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class PacketInfo | |||||
{ | |||||
public ushort Count { get; set; } | |||||
public ushort Index { get; set; } | |||||
public void Save(IProtocolBuffer buffer) | |||||
{ | |||||
Count = Core.SwapUInt16(Count); | |||||
Index = Core.SwapUInt16(Index); | |||||
} | |||||
public void Load(IProtocolBuffer buffer) | |||||
{ | |||||
byte[] data = buffer.Read(2); | |||||
Count = BitConverter.ToUInt16(data, 0); | |||||
Count = Core.SwapUInt16(Count); | |||||
data = buffer.Read(2); | |||||
Index = BitConverter.ToUInt16(data, 0); | |||||
Index = Core.SwapUInt16(Count); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,44 @@ | |||||
| |||||
using Beetle.JT808.Messages; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class MessageFactory | |||||
{ | |||||
public static IProtocolBuffer MessateToBuffer<T>(ushort businessNO, string sim, Action<IMessage, T> handler) where T : new() | |||||
{ | |||||
IProtocolBuffer buffer = ProtocolBufferPool.Default.Pop(); | |||||
Message msg = new Message(); | |||||
msg.BussinessNO = businessNO; | |||||
msg.SIM = sim; | |||||
T body = new T(); | |||||
msg.Body = body; | |||||
if (handler != null) | |||||
handler(msg, body); | |||||
msg.Save(buffer); | |||||
return buffer; | |||||
} | |||||
public static ushort GetMessageID<T>() | |||||
{ | |||||
Type type = typeof(T); | |||||
Serializes.Serializer serializer = Serializes.SerializerFactory.Defalut.Get(type); | |||||
if (serializer == null) | |||||
throw new ProtocolProcessError(string.Format("{0} serializer not found!", type)); | |||||
return serializer.MessageType.ID; | |||||
} | |||||
public static Message MessageFromBuffer(IProtocolBuffer buffer) | |||||
{ | |||||
Message msg = new Message(); | |||||
msg.Load(buffer); | |||||
return msg; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,20 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(ID = 0x0008)] | |||||
public class CenterResponse | |||||
{ | |||||
[UInt16Handler] | |||||
public ushort BussinessNO { get; set; } | |||||
[UInt16Handler] | |||||
public ushort ResultID { get; set; } | |||||
[ByteHandler] | |||||
public ResultType Result { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,14 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(NoBody = true, ID = 0x0002)] | |||||
public class ClientPing | |||||
{ | |||||
} | |||||
} |
@@ -0,0 +1,342 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(ID = 0x0200)] | |||||
public class ClientPostion | |||||
{ | |||||
public ClientPostion() | |||||
{ | |||||
Status = new ClientPostionStatus(); | |||||
WarningMark = new ClientPostionWarningMark(); | |||||
} | |||||
[UIntBitHandler(typeof(ClientPostionWarningMark))] | |||||
public ClientPostionWarningMark WarningMark { get; set; } | |||||
[UIntBitHandler(typeof(ClientPostionStatus))] | |||||
public ClientPostionStatus Status { get; set; } | |||||
[UIntHandler] | |||||
public uint Longitude { get; set; } | |||||
[UIntHandler] | |||||
public uint Latitude { get; set; } | |||||
[UInt16Handler] | |||||
public ushort Height { get; set; } | |||||
[UInt16Handler] | |||||
public ushort Speed { get; set; } | |||||
[UInt16Handler] | |||||
public ushort Direction { get; set; } | |||||
[TimeBCD] | |||||
public DateTime Time { get; set; } | |||||
} | |||||
public class ClientPostionWarningMark : IBitCustomType | |||||
{ | |||||
/// <summary> | |||||
/// 紧急报瞥触动报警开关后触发 | |||||
/// </summary> | |||||
public bool TouchAlarmSwitch { get; set; } | |||||
/// <summary> | |||||
/// 超速报警 | |||||
/// </summary> | |||||
public bool SpeedLimit { get; set; } | |||||
/// <summary> | |||||
/// 疲劳驾驶 | |||||
/// </summary> | |||||
public bool Fatigue { get; set; } | |||||
/// <summary> | |||||
/// 预警 | |||||
/// </summary> | |||||
public bool Alert { get; set; } | |||||
/// <summary> | |||||
/// GNSS模块发生故障 | |||||
/// </summary> | |||||
public bool GNSSModule { get; set; } | |||||
/// <summary> | |||||
/// GNSS天线未接或被剪断 | |||||
/// </summary> | |||||
public bool GNSSCutAntenna { get; set; } | |||||
/// <summary> | |||||
/// GNSS天线短路 | |||||
/// </summary> | |||||
public bool GNSSShortCircuit { get; set; } | |||||
/// <summary> | |||||
/// 终端主电源欠压 | |||||
/// </summary> | |||||
public bool MainPowerVoltage { get; set; } | |||||
/// <summary> | |||||
/// 终端主电源掉电 | |||||
/// </summary> | |||||
public bool MainPowerOff { get; set; } | |||||
/// <summary> | |||||
/// 终端LCD或显示器故障 | |||||
/// </summary> | |||||
public bool DisplayTheFault { get; set; } | |||||
/// <summary> | |||||
/// TTS模块故障 | |||||
/// </summary> | |||||
public bool TTSModuleFailure { get; set; } | |||||
/// <summary> | |||||
/// 摄像头故障 | |||||
/// </summary> | |||||
public bool CameraMalfunction { get; set; } | |||||
public bool Keep12 { get; set; } | |||||
public bool Keep13 { get; set; } | |||||
public bool Keep14 { get; set; } | |||||
public bool Keep15 { get; set; } | |||||
public bool Keep16 { get; set; } | |||||
public bool Keep17 { get; set; } | |||||
/// <summary> | |||||
/// 驾驶超时 | |||||
/// </summary> | |||||
public bool DrivingTimeoutOfDay { get; set; } | |||||
/// <summary> | |||||
/// 超时停车 | |||||
/// </summary> | |||||
public bool StopTimeout { get; set; } | |||||
/// <summary> | |||||
/// 进出区域 | |||||
/// </summary> | |||||
public bool InOutArea { get; set; } | |||||
/// <summary> | |||||
/// 进出路线 | |||||
/// </summary> | |||||
public bool InOutLine { get; set; } | |||||
/// <summary> | |||||
/// 路段行驶时间 | |||||
/// </summary> | |||||
public bool BritainsTime { get; set; } | |||||
/// <summary> | |||||
/// 路线偏离报警 | |||||
/// </summary> | |||||
public bool LaneDeparture { get; set; } | |||||
/// <summary> | |||||
/// VSS故障 | |||||
/// </summary> | |||||
public bool VSSFault { get; set; } | |||||
/// <summary> | |||||
/// 油量异常 | |||||
/// </summary> | |||||
public bool OilFault { get; set; } | |||||
/// <summary> | |||||
/// 被盗 | |||||
/// </summary> | |||||
public bool Stolen { get; set; } | |||||
/// <summary> | |||||
/// 非法点火 | |||||
/// </summary> | |||||
public bool IllegalIgnition { get; set; } | |||||
/// <summary> | |||||
/// 车辆非法位移 | |||||
/// </summary> | |||||
public bool IllegalDisplacement { get; set; } | |||||
public bool Keep29 { get; set; } | |||||
public bool Keep30 { get; set; } | |||||
public bool Keep31 { get; set; } | |||||
public void Load(object value) | |||||
{ | |||||
uint data = (uint)value; | |||||
TouchAlarmSwitch = Core.GetBitValue(data, 0); | |||||
SpeedLimit = Core.GetBitValue(data, 1); | |||||
Fatigue = Core.GetBitValue(data, 2); | |||||
Alert = Core.GetBitValue(data, 3); | |||||
GNSSModule = Core.GetBitValue(data, 4); | |||||
GNSSCutAntenna = Core.GetBitValue(data, 5); | |||||
GNSSShortCircuit = Core.GetBitValue(data, 6); | |||||
MainPowerVoltage = Core.GetBitValue(data, 7); | |||||
MainPowerOff = Core.GetBitValue(data, 8); | |||||
DisplayTheFault = Core.GetBitValue(data, 9); | |||||
TTSModuleFailure = Core.GetBitValue(data, 10); | |||||
CameraMalfunction = Core.GetBitValue(data, 11); | |||||
Keep12 = Core.GetBitValue(data, 12); | |||||
Keep13 = Core.GetBitValue(data, 13); | |||||
Keep14 = Core.GetBitValue(data, 14); | |||||
Keep15 = Core.GetBitValue(data, 15); | |||||
Keep16 = Core.GetBitValue(data, 16); | |||||
Keep17 = Core.GetBitValue(data, 17); | |||||
DrivingTimeoutOfDay = Core.GetBitValue(data, 18); | |||||
StopTimeout = Core.GetBitValue(data, 19); | |||||
InOutArea = Core.GetBitValue(data, 20); | |||||
InOutLine = Core.GetBitValue(data, 21); | |||||
BritainsTime = Core.GetBitValue(data, 22); | |||||
LaneDeparture = Core.GetBitValue(data, 23); | |||||
VSSFault = Core.GetBitValue(data, 24); | |||||
OilFault = Core.GetBitValue(data, 25); | |||||
Stolen = Core.GetBitValue(data, 26); | |||||
IllegalIgnition = Core.GetBitValue(data, 27); | |||||
IllegalDisplacement = Core.GetBitValue(data, 28); | |||||
Keep29 = Core.GetBitValue(data, 29); | |||||
Keep30 = Core.GetBitValue(data, 30); | |||||
Keep31 = Core.GetBitValue(data, 31); | |||||
} | |||||
public object Save() | |||||
{ | |||||
return Core.GetUIntBitValue(TouchAlarmSwitch, SpeedLimit, Fatigue, Alert, GNSSModule, GNSSCutAntenna, GNSSShortCircuit, | |||||
MainPowerVoltage, MainPowerOff, DisplayTheFault, TTSModuleFailure, CameraMalfunction, Keep12, | |||||
Keep13, Keep14, Keep15, Keep16, Keep17, DrivingTimeoutOfDay, StopTimeout, InOutArea, InOutLine, | |||||
BritainsTime, LaneDeparture, VSSFault, OilFault, Stolen, IllegalIgnition, IllegalDisplacement, | |||||
Keep29, Keep30, Keep31); | |||||
} | |||||
} | |||||
public class ClientPostionStatus : IBitCustomType | |||||
{ | |||||
public bool ACC { get; set; } | |||||
public bool Location { get; set; } | |||||
public bool Latitude { get; set; } | |||||
public bool Longitude { get; set; } | |||||
public bool Operate { get; set; } | |||||
public bool Encryption { get; set; } | |||||
public bool Keep6 { get; set; } | |||||
public bool Keep7 { get; set; } | |||||
public bool Keep8 { get; set; } | |||||
public bool Keep9 { get; set; } | |||||
public bool OilRoad { get; set; } | |||||
public bool ElectricityRoad { get; set; } | |||||
public bool DoorLock { get; set; } | |||||
public bool Keep13 { get; set; } | |||||
public bool Keep14 { get; set; } | |||||
public bool Keep15 { get; set; } | |||||
public bool Keep16 { get; set; } | |||||
public bool Keep17 { get; set; } | |||||
public bool Keep18 { get; set; } | |||||
public bool Keep19 { get; set; } | |||||
public bool Keep20 { get; set; } | |||||
public bool Keep21 { get; set; } | |||||
public bool Keep22 { get; set; } | |||||
public bool Keep23 { get; set; } | |||||
public bool Keep24 { get; set; } | |||||
public bool Keep25 { get; set; } | |||||
public bool Keep26 { get; set; } | |||||
public bool Keep27 { get; set; } | |||||
public bool Keep28 { get; set; } | |||||
public bool Keep29 { get; set; } | |||||
public bool Keep30 { get; set; } | |||||
public bool Keep31 { get; set; } | |||||
public void Load(object value) | |||||
{ | |||||
uint data = (uint)value; | |||||
ACC = Core.GetBitValue(data, 0); | |||||
Location = Core.GetBitValue(data, 1); | |||||
Latitude = Core.GetBitValue(data, 2); | |||||
Longitude = Core.GetBitValue(data, 3); | |||||
Operate = Core.GetBitValue(data, 4); | |||||
Encryption = Core.GetBitValue(data, 5); | |||||
Keep6 = Core.GetBitValue(data, 6); | |||||
Keep7 = Core.GetBitValue(data, 7); | |||||
Keep8 = Core.GetBitValue(data, 8); | |||||
Keep9 = Core.GetBitValue(data, 9); | |||||
OilRoad = Core.GetBitValue(data, 10); | |||||
ElectricityRoad = Core.GetBitValue(data, 11); | |||||
DoorLock = Core.GetBitValue(data, 12); | |||||
Keep13 = Core.GetBitValue(data, 13); | |||||
Keep14 = Core.GetBitValue(data, 14); | |||||
Keep15 = Core.GetBitValue(data, 15); | |||||
Keep16 = Core.GetBitValue(data, 16); | |||||
Keep17 = Core.GetBitValue(data, 17); | |||||
Keep18 = Core.GetBitValue(data, 18); | |||||
Keep19 = Core.GetBitValue(data, 19); | |||||
Keep20 = Core.GetBitValue(data, 20); | |||||
Keep21 = Core.GetBitValue(data, 21); | |||||
Keep22 = Core.GetBitValue(data, 22); | |||||
Keep23 = Core.GetBitValue(data, 23); | |||||
Keep24 = Core.GetBitValue(data, 24); | |||||
Keep25 = Core.GetBitValue(data, 25); | |||||
Keep26 = Core.GetBitValue(data, 26); | |||||
Keep27 = Core.GetBitValue(data, 27); | |||||
Keep28 = Core.GetBitValue(data, 28); | |||||
Keep29 = Core.GetBitValue(data, 29); | |||||
Keep30 = Core.GetBitValue(data, 30); | |||||
Keep31 = Core.GetBitValue(data, 31); | |||||
} | |||||
public object Save() | |||||
{ | |||||
return Core.GetUIntBitValue(ACC, Location, Latitude, Longitude, Operate, Encryption, Keep6, Keep7, Keep8, Keep9, | |||||
OilRoad, ElectricityRoad, DoorLock, Keep13, Keep14, Keep15, Keep16, Keep17, Keep18, Keep19, Keep20, Keep21, Keep22, | |||||
Keep23, Keep24, Keep25, Keep26, Keep27, Keep28, Keep29, Keep30, Keep31); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,26 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(ID = 0x0100)] | |||||
public class ClientRegister | |||||
{ | |||||
[UInt16Handler] | |||||
public ushort Province { get; set; } | |||||
[UInt16Handler] | |||||
public ushort City { get; set; } | |||||
[ASCIIHandler(5)] | |||||
public string Provider { get; set; } | |||||
[ASCIIHandler(8)] | |||||
public string DeviceNumber { get; set; } | |||||
[ASCIIHandler(7)] | |||||
public string DeviceID { get; set; } | |||||
[ByteHandler] | |||||
public byte Color { get; set; } | |||||
[GBKHandler] | |||||
public string PlateNumber { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,13 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(NoBody = true, ID = 0x0003)] | |||||
public class ClientRegisterCancel | |||||
{ | |||||
} | |||||
} |
@@ -0,0 +1,19 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(ID = 0x8100)] | |||||
public class ClientRegisterResponse | |||||
{ | |||||
[UInt16Handler] | |||||
public ushort BusinessNO { get; set; } | |||||
[ByteHandler] | |||||
public byte Result { get; set; } | |||||
[GBKHandler] | |||||
public string Signature { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,30 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
public enum ResultType : byte | |||||
{ | |||||
Success = 0, | |||||
Failure = 1, | |||||
Error = 2, | |||||
NotSupport = 3 | |||||
} | |||||
[MessageType(ID = 0x0001)] | |||||
public class ClientResponse | |||||
{ | |||||
[UInt16Handler] | |||||
public ushort BussinessNO { get; set; } | |||||
[UInt16Handler] | |||||
public ushort ResultID { get; set; } | |||||
[ByteHandler] | |||||
public ResultType Result { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,15 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Messages | |||||
{ | |||||
[MessageType(ID = 0x0102)] | |||||
public class ClientSignature | |||||
{ | |||||
[GBKHandler] | |||||
public string Signature { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,36 @@ | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// 有关程序集的一般信息由以下 | |||||
// 控制。更改这些特性值可修改 | |||||
// 与程序集关联的信息。 | |||||
[assembly: AssemblyTitle("Beetle.JT808")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("Beetle.JT808")] | |||||
[assembly: AssemblyCopyright("Copyright © 2016")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
//将 ComVisible 设置为 false 将使此程序集中的类型 | |||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, | |||||
//请将此类型的 ComVisible 特性设置为 true。 | |||||
[assembly: ComVisible(false)] | |||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
[assembly: Guid("ad6a9116-9faf-475d-8451-4316f2df910f")] | |||||
// 程序集的版本信息由下列四个值组成: | |||||
// | |||||
// 主版本 | |||||
// 次版本 | |||||
// 生成号 | |||||
// 修订号 | |||||
// | |||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||||
// 方法是按如下所示使用“*”: : | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@@ -0,0 +1,19 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public class ProtocolProcessError : Exception | |||||
{ | |||||
public ProtocolProcessError() | |||||
{ | |||||
} | |||||
public ProtocolProcessError(string error) : base(error) { } | |||||
public ProtocolProcessError(string error, Exception e) : base(error, e) { } | |||||
} | |||||
} |
@@ -0,0 +1,532 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Reflection; | |||||
using System.Reflection.Emit; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Serializes | |||||
{ | |||||
public class FieldHandler | |||||
{ | |||||
public FieldHandler(FieldInfo field) | |||||
{ | |||||
mGetValue = ReflectionHandlerFactory.FieldGetHandler(field); | |||||
mSetValue = ReflectionHandlerFactory.FieldSetHandler(field); | |||||
Field = field; | |||||
} | |||||
private FieldInfo mField; | |||||
public FieldInfo Field | |||||
{ | |||||
get | |||||
{ | |||||
return mField; | |||||
} | |||||
private set | |||||
{ | |||||
mField = value; | |||||
} | |||||
} | |||||
private GetValueHandler mGetValue; | |||||
public GetValueHandler GetValue | |||||
{ | |||||
get | |||||
{ | |||||
return mGetValue; | |||||
} | |||||
} | |||||
private SetValueHandler mSetValue; | |||||
public SetValueHandler SetValue | |||||
{ | |||||
get | |||||
{ | |||||
return mSetValue; | |||||
} | |||||
} | |||||
} | |||||
public class PropertyHandler | |||||
{ | |||||
public PropertyHandler(PropertyInfo property) | |||||
{ | |||||
if (property.CanWrite) | |||||
mSetValue = ReflectionHandlerFactory.PropertySetHandler(property); | |||||
if (property.CanRead) | |||||
mGetValue = ReflectionHandlerFactory.PropertyGetHandler(property); | |||||
mProperty = property; | |||||
IndexProperty = mProperty.GetGetMethod().GetParameters().Length > 0; | |||||
} | |||||
private bool mIndexProperty; | |||||
public bool IndexProperty | |||||
{ | |||||
get | |||||
{ | |||||
return mIndexProperty; | |||||
} | |||||
set | |||||
{ | |||||
mIndexProperty = value; | |||||
} | |||||
} | |||||
private PropertyInfo mProperty; | |||||
public PropertyInfo Property | |||||
{ | |||||
get | |||||
{ | |||||
return mProperty; | |||||
} | |||||
set | |||||
{ | |||||
mProperty = value; | |||||
} | |||||
} | |||||
private GetValueHandler mGetValue; | |||||
public GetValueHandler Get | |||||
{ | |||||
get | |||||
{ | |||||
return mGetValue; | |||||
} | |||||
} | |||||
private SetValueHandler mSetValue; | |||||
public SetValueHandler Set | |||||
{ | |||||
get | |||||
{ | |||||
return mSetValue; | |||||
} | |||||
} | |||||
} | |||||
public class MethodHandler | |||||
{ | |||||
public MethodHandler(MethodInfo method) | |||||
{ | |||||
mExecute = ReflectionHandlerFactory.MethodHandler(method); | |||||
mInfo = method; | |||||
} | |||||
private MethodInfo mInfo; | |||||
public MethodInfo Info | |||||
{ | |||||
get | |||||
{ | |||||
return mInfo; | |||||
} | |||||
} | |||||
private FastMethodHandler mExecute; | |||||
public FastMethodHandler Execute | |||||
{ | |||||
get | |||||
{ | |||||
return mExecute; | |||||
} | |||||
} | |||||
} | |||||
public class InstanceHandler | |||||
{ | |||||
public InstanceHandler(Type type) | |||||
{ | |||||
mInstance = ReflectionHandlerFactory.InstanceHandler(type); | |||||
} | |||||
private ObjectInstanceHandler mInstance; | |||||
public ObjectInstanceHandler Instance | |||||
{ | |||||
get | |||||
{ | |||||
return mInstance; | |||||
} | |||||
} | |||||
} | |||||
public delegate object GetValueHandler(object source); | |||||
public delegate object ObjectInstanceHandler(); | |||||
public delegate void SetValueHandler(object source, object value); | |||||
public delegate object FastMethodHandler(object target, object[] paramters); | |||||
public class ReflectionHandlerFactory | |||||
{ | |||||
#region field handler | |||||
private static Dictionary<FieldInfo, GetValueHandler> mFieldGetHandlers = new Dictionary<FieldInfo, GetValueHandler>(); | |||||
private static Dictionary<FieldInfo, SetValueHandler> mFieldSetHandlers = new Dictionary<FieldInfo, SetValueHandler>(); | |||||
public static GetValueHandler FieldGetHandler(FieldInfo field) | |||||
{ | |||||
GetValueHandler handler; | |||||
if (mFieldGetHandlers.ContainsKey(field)) | |||||
{ | |||||
handler = mFieldGetHandlers[field]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mFieldGetHandlers.ContainsKey(field)) | |||||
{ | |||||
handler = mFieldGetHandlers[field]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreateFieldGetHandler(field); | |||||
mFieldGetHandlers.Add(field, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static GetValueHandler CreateFieldGetHandler(FieldInfo field) | |||||
{ | |||||
DynamicMethod dm = new DynamicMethod("", typeof(object), new Type[] { typeof(object) }, field.DeclaringType); | |||||
ILGenerator ilGenerator = dm.GetILGenerator(); | |||||
ilGenerator.Emit(OpCodes.Ldarg_0); | |||||
ilGenerator.Emit(OpCodes.Ldfld, field); | |||||
EmitBoxIfNeeded(ilGenerator, field.FieldType); | |||||
ilGenerator.Emit(OpCodes.Ret); | |||||
return (GetValueHandler)dm.CreateDelegate(typeof(GetValueHandler)); | |||||
} | |||||
public static SetValueHandler FieldSetHandler(FieldInfo field) | |||||
{ | |||||
SetValueHandler handler; | |||||
if (mFieldSetHandlers.ContainsKey(field)) | |||||
{ | |||||
handler = mFieldSetHandlers[field]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mFieldSetHandlers.ContainsKey(field)) | |||||
{ | |||||
handler = mFieldSetHandlers[field]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreateFieldSetHandler(field); | |||||
mFieldSetHandlers.Add(field, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static SetValueHandler CreateFieldSetHandler(FieldInfo field) | |||||
{ | |||||
DynamicMethod dm = new DynamicMethod("", null, new Type[] { typeof(object), typeof(object) }, field.DeclaringType); | |||||
ILGenerator ilGenerator = dm.GetILGenerator(); | |||||
ilGenerator.Emit(OpCodes.Ldarg_0); | |||||
ilGenerator.Emit(OpCodes.Ldarg_1); | |||||
EmitCastToReference(ilGenerator, field.FieldType); | |||||
ilGenerator.Emit(OpCodes.Stfld, field); | |||||
ilGenerator.Emit(OpCodes.Ret); | |||||
return (SetValueHandler)dm.CreateDelegate(typeof(SetValueHandler)); | |||||
} | |||||
#endregion | |||||
#region Property Handler | |||||
private static Dictionary<PropertyInfo, GetValueHandler> mPropertyGetHandlers = new Dictionary<PropertyInfo, GetValueHandler>(); | |||||
private static Dictionary<PropertyInfo, SetValueHandler> mPropertySetHandlers = new Dictionary<PropertyInfo, SetValueHandler>(); | |||||
public static SetValueHandler PropertySetHandler(PropertyInfo property) | |||||
{ | |||||
SetValueHandler handler; | |||||
if (mPropertySetHandlers.ContainsKey(property)) | |||||
{ | |||||
handler = mPropertySetHandlers[property]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mPropertySetHandlers.ContainsKey(property)) | |||||
{ | |||||
handler = mPropertySetHandlers[property]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreatePropertySetHandler(property); | |||||
mPropertySetHandlers.Add(property, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static SetValueHandler CreatePropertySetHandler(PropertyInfo property) | |||||
{ | |||||
DynamicMethod dynamicMethod = new DynamicMethod(string.Empty, null, new Type[] { typeof(object), typeof(object) }, property.DeclaringType.Module); | |||||
ILGenerator ilGenerator = dynamicMethod.GetILGenerator(); | |||||
ilGenerator.Emit(OpCodes.Ldarg_0); | |||||
ilGenerator.Emit(OpCodes.Ldarg_1); | |||||
EmitCastToReference(ilGenerator, property.PropertyType); | |||||
ilGenerator.EmitCall(OpCodes.Callvirt, property.GetSetMethod(), null); | |||||
ilGenerator.Emit(OpCodes.Ret); | |||||
SetValueHandler setter = (SetValueHandler)dynamicMethod.CreateDelegate(typeof(SetValueHandler)); | |||||
return setter; | |||||
} | |||||
public static GetValueHandler PropertyGetHandler(PropertyInfo property) | |||||
{ | |||||
GetValueHandler handler; | |||||
if (mPropertyGetHandlers.ContainsKey(property)) | |||||
{ | |||||
handler = mPropertyGetHandlers[property]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mPropertyGetHandlers.ContainsKey(property)) | |||||
{ | |||||
handler = mPropertyGetHandlers[property]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreatePropertyGetHandler(property); | |||||
mPropertyGetHandlers.Add(property, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static GetValueHandler CreatePropertyGetHandler(PropertyInfo property) | |||||
{ | |||||
DynamicMethod dynamicMethod = new DynamicMethod(string.Empty, typeof(object), new Type[] { typeof(object) }, property.DeclaringType.Module); | |||||
ILGenerator ilGenerator = dynamicMethod.GetILGenerator(); | |||||
ilGenerator.Emit(OpCodes.Ldarg_0); | |||||
ilGenerator.EmitCall(OpCodes.Callvirt, property.GetGetMethod(), null); | |||||
EmitBoxIfNeeded(ilGenerator, property.PropertyType); | |||||
ilGenerator.Emit(OpCodes.Ret); | |||||
GetValueHandler getter = (GetValueHandler)dynamicMethod.CreateDelegate(typeof(GetValueHandler)); | |||||
return getter; | |||||
} | |||||
#endregion | |||||
#region Method Handler | |||||
private static Dictionary<MethodInfo, FastMethodHandler> mMethodHandlers = new Dictionary<MethodInfo, FastMethodHandler>(); | |||||
public static FastMethodHandler MethodHandler(MethodInfo method) | |||||
{ | |||||
FastMethodHandler handler = null; | |||||
if (mMethodHandlers.ContainsKey(method)) | |||||
{ | |||||
handler = mMethodHandlers[method]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mMethodHandlers.ContainsKey(method)) | |||||
{ | |||||
handler = mMethodHandlers[method]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreateMethodHandler(method); | |||||
mMethodHandlers.Add(method, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static FastMethodHandler CreateMethodHandler(MethodInfo methodInfo) | |||||
{ | |||||
DynamicMethod dynamicMethod = new DynamicMethod(string.Empty, typeof(object), new Type[] { typeof(object), typeof(object[]) }, methodInfo.DeclaringType.Module); | |||||
ILGenerator il = dynamicMethod.GetILGenerator(); | |||||
ParameterInfo[] ps = methodInfo.GetParameters(); | |||||
Type[] paramTypes = new Type[ps.Length]; | |||||
for (int i = 0; i < paramTypes.Length; i++) | |||||
{ | |||||
if (ps[i].ParameterType.IsByRef) | |||||
paramTypes[i] = ps[i].ParameterType.GetElementType(); | |||||
else | |||||
paramTypes[i] = ps[i].ParameterType; | |||||
} | |||||
LocalBuilder[] locals = new LocalBuilder[paramTypes.Length]; | |||||
for (int i = 0; i < paramTypes.Length; i++) | |||||
{ | |||||
locals[i] = il.DeclareLocal(paramTypes[i], true); | |||||
} | |||||
for (int i = 0; i < paramTypes.Length; i++) | |||||
{ | |||||
il.Emit(OpCodes.Ldarg_1); | |||||
EmitFastInt(il, i); | |||||
il.Emit(OpCodes.Ldelem_Ref); | |||||
EmitCastToReference(il, paramTypes[i]); | |||||
il.Emit(OpCodes.Stloc, locals[i]); | |||||
} | |||||
if (!methodInfo.IsStatic) | |||||
{ | |||||
il.Emit(OpCodes.Ldarg_0); | |||||
} | |||||
for (int i = 0; i < paramTypes.Length; i++) | |||||
{ | |||||
if (ps[i].ParameterType.IsByRef) | |||||
il.Emit(OpCodes.Ldloca_S, locals[i]); | |||||
else | |||||
il.Emit(OpCodes.Ldloc, locals[i]); | |||||
} | |||||
if (methodInfo.IsStatic) | |||||
il.EmitCall(OpCodes.Call, methodInfo, null); | |||||
else | |||||
il.EmitCall(OpCodes.Callvirt, methodInfo, null); | |||||
if (methodInfo.ReturnType == typeof(void)) | |||||
il.Emit(OpCodes.Ldnull); | |||||
else | |||||
EmitBoxIfNeeded(il, methodInfo.ReturnType); | |||||
for (int i = 0; i < paramTypes.Length; i++) | |||||
{ | |||||
if (ps[i].ParameterType.IsByRef) | |||||
{ | |||||
il.Emit(OpCodes.Ldarg_1); | |||||
EmitFastInt(il, i); | |||||
il.Emit(OpCodes.Ldloc, locals[i]); | |||||
if (locals[i].LocalType.IsValueType) | |||||
il.Emit(OpCodes.Box, locals[i].LocalType); | |||||
il.Emit(OpCodes.Stelem_Ref); | |||||
} | |||||
} | |||||
il.Emit(OpCodes.Ret); | |||||
FastMethodHandler invoder = (FastMethodHandler)dynamicMethod.CreateDelegate(typeof(FastMethodHandler)); | |||||
return invoder; | |||||
} | |||||
#endregion | |||||
#region Instance Handler | |||||
private static Dictionary<Type, ObjectInstanceHandler> mInstanceHandlers = new Dictionary<Type, ObjectInstanceHandler>(); | |||||
public static ObjectInstanceHandler InstanceHandler(Type type) | |||||
{ | |||||
ObjectInstanceHandler handler; | |||||
if (mInstanceHandlers.ContainsKey(type)) | |||||
{ | |||||
handler = mInstanceHandlers[type]; | |||||
} | |||||
else | |||||
{ | |||||
lock (typeof(ReflectionHandlerFactory)) | |||||
{ | |||||
if (mInstanceHandlers.ContainsKey(type)) | |||||
{ | |||||
handler = mInstanceHandlers[type]; | |||||
} | |||||
else | |||||
{ | |||||
handler = CreateInstanceHandler(type); | |||||
mInstanceHandlers.Add(type, handler); | |||||
} | |||||
} | |||||
} | |||||
return handler; | |||||
} | |||||
private static ObjectInstanceHandler CreateInstanceHandler(Type type) | |||||
{ | |||||
DynamicMethod method = new DynamicMethod(string.Empty, type, null, type.Module); | |||||
ILGenerator il = method.GetILGenerator(); | |||||
il.DeclareLocal(type, true); | |||||
il.Emit(OpCodes.Newobj, type.GetConstructor(new Type[0])); | |||||
il.Emit(OpCodes.Stloc_0); | |||||
il.Emit(OpCodes.Ldloc_0); | |||||
il.Emit(OpCodes.Ret); | |||||
ObjectInstanceHandler creater = (ObjectInstanceHandler)method.CreateDelegate(typeof(ObjectInstanceHandler)); | |||||
return creater; | |||||
} | |||||
#endregion | |||||
private static void EmitCastToReference(ILGenerator il, System.Type type) | |||||
{ | |||||
if (type.IsValueType) | |||||
{ | |||||
il.Emit(OpCodes.Unbox_Any, type); | |||||
} | |||||
else | |||||
{ | |||||
il.Emit(OpCodes.Castclass, type); | |||||
} | |||||
} | |||||
private static void EmitBoxIfNeeded(ILGenerator il, System.Type type) | |||||
{ | |||||
if (type.IsValueType) | |||||
{ | |||||
il.Emit(OpCodes.Box, type); | |||||
} | |||||
} | |||||
private static void EmitFastInt(ILGenerator il, int value) | |||||
{ | |||||
switch (value) | |||||
{ | |||||
case -1: | |||||
il.Emit(OpCodes.Ldc_I4_M1); | |||||
return; | |||||
case 0: | |||||
il.Emit(OpCodes.Ldc_I4_0); | |||||
return; | |||||
case 1: | |||||
il.Emit(OpCodes.Ldc_I4_1); | |||||
return; | |||||
case 2: | |||||
il.Emit(OpCodes.Ldc_I4_2); | |||||
return; | |||||
case 3: | |||||
il.Emit(OpCodes.Ldc_I4_3); | |||||
return; | |||||
case 4: | |||||
il.Emit(OpCodes.Ldc_I4_4); | |||||
return; | |||||
case 5: | |||||
il.Emit(OpCodes.Ldc_I4_5); | |||||
return; | |||||
case 6: | |||||
il.Emit(OpCodes.Ldc_I4_6); | |||||
return; | |||||
case 7: | |||||
il.Emit(OpCodes.Ldc_I4_7); | |||||
return; | |||||
case 8: | |||||
il.Emit(OpCodes.Ldc_I4_8); | |||||
return; | |||||
} | |||||
if (value > -129 && value < 128) | |||||
{ | |||||
il.Emit(OpCodes.Ldc_I4_S, (SByte)value); | |||||
} | |||||
else | |||||
{ | |||||
il.Emit(OpCodes.Ldc_I4, value); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,18 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
public interface IBitCustomType | |||||
{ | |||||
void Load(object value); | |||||
object Save(); | |||||
} | |||||
} |
@@ -0,0 +1,242 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public abstract class ReadWriteHandlerAttribute : Attribute | |||||
{ | |||||
public abstract object Read(IProtocolBuffer buffer); | |||||
public abstract void Write(object value, IProtocolBuffer buffer); | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class ByteHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.Read(); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.Write((byte)value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class BytesHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public BytesHandler(int length) | |||||
{ | |||||
Length = length; | |||||
} | |||||
public int Length { get; set; } | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.Read(Length); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.Write((byte[])value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class UInt16Handler : ReadWriteHandlerAttribute | |||||
{ | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.ReadUInt16(); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.Write((UInt16)value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class UIntHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.ReadUInt(); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.Write((uint)value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class ASCIIHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public ASCIIHandler(int length) | |||||
{ | |||||
Length = length; | |||||
} | |||||
public int Length { get; set; } | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.ReadASCII(Length).TrimStart(' '); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.WriteASCII((string)value, Length); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class CBDHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public CBDHandler(int length) | |||||
{ | |||||
Length = length; | |||||
} | |||||
public int Length { get; set; } | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.ReadBCD(Length); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.WriteBCD((string)value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class GBKHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public GBKHandler(int length = -1) | |||||
{ | |||||
Length = length; | |||||
} | |||||
public int Length { get; set; } | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
return buffer.ReadGBK(Length); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
buffer.WriteGBK((string)value); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class TimeBCD : ReadWriteHandlerAttribute | |||||
{ | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
string value = buffer.ReadBCD(6); | |||||
int year = int.Parse("20" + value.Substring(0, 2)); | |||||
int month = int.Parse(value.Substring(2, 2)); | |||||
int day = int.Parse(value.Substring(4, 2)); | |||||
int hh = int.Parse(value.Substring(6, 2)); | |||||
int mm = int.Parse(value.Substring(8, 2)); | |||||
int ss = int.Parse(value.Substring(10, 2)); | |||||
return new DateTime(year, month, day, hh, mm, ss); | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
string time = ((DateTime)value).ToString("yyMMddHHmmss"); | |||||
buffer.WriteBCD(time); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class ByteBitHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public ByteBitHandler(Type type) | |||||
{ | |||||
mType = type; | |||||
} | |||||
private Type mType; | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
byte data = buffer.Read(); | |||||
IBitCustomType result = (IBitCustomType)Activator.CreateInstance(mType); | |||||
result.Load(data); | |||||
return result; | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
byte data = (byte)((IBitCustomType)value).Save(); | |||||
buffer.Write(data); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class UInt16BitHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public UInt16BitHandler(Type type) | |||||
{ | |||||
mType = type; | |||||
} | |||||
private Type mType; | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
UInt16 data = buffer.ReadUInt16(); | |||||
IBitCustomType result = (IBitCustomType)Activator.CreateInstance(mType); | |||||
result.Load(data); | |||||
return result; | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
UInt16 data = (UInt16)((IBitCustomType)value).Save(); | |||||
buffer.Write(data); | |||||
} | |||||
} | |||||
[AttributeUsage(AttributeTargets.Property)] | |||||
public class UIntBitHandler : ReadWriteHandlerAttribute | |||||
{ | |||||
public UIntBitHandler(Type type) | |||||
{ | |||||
mType = type; | |||||
} | |||||
private Type mType; | |||||
public override object Read(IProtocolBuffer buffer) | |||||
{ | |||||
uint data = buffer.ReadUInt(); | |||||
IBitCustomType result = (IBitCustomType)Activator.CreateInstance(mType); | |||||
result.Load(data); | |||||
return result; | |||||
} | |||||
public override void Write(object value, IProtocolBuffer buffer) | |||||
{ | |||||
uint data = (uint)((IBitCustomType)value).Save(); | |||||
buffer.Write(data); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,21 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808 | |||||
{ | |||||
[AttributeUsage(AttributeTargets.Class)] | |||||
public class MessageTypeAttribute : Attribute | |||||
{ | |||||
public MessageTypeAttribute() | |||||
{ | |||||
NoBody = false; | |||||
} | |||||
public ushort ID { get; set; } | |||||
public bool NoBody { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,35 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Serializes | |||||
{ | |||||
class PropertySerializeHandler | |||||
{ | |||||
public PropertySerializeHandler(System.Reflection.PropertyInfo property, ReadWriteHandlerAttribute readwritehandler) | |||||
{ | |||||
Handler = new PropertyHandler(property); | |||||
ReadWriteHandler = readwritehandler; | |||||
} | |||||
public PropertyHandler Handler { get; private set; } | |||||
public ReadWriteHandlerAttribute ReadWriteHandler { get; private set; } | |||||
public void Read(object target, IProtocolBuffer buffer) | |||||
{ | |||||
object value = ReadWriteHandler.Read(buffer); | |||||
Handler.Set(target, value); | |||||
} | |||||
public void Write(object target, IProtocolBuffer buffer) | |||||
{ | |||||
object value = Handler.Get(target); | |||||
if (value == null) | |||||
throw new ProtocolProcessError(string.Format("{0}.{1} value can't be null!", Handler.Property.DeclaringType, Handler.Property.PropertyType)); | |||||
ReadWriteHandler.Write(value, buffer); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,141 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.JT808.Serializes | |||||
{ | |||||
public class Serializer | |||||
{ | |||||
public Serializer(Type bodyType, MessageTypeAttribute msgType) | |||||
{ | |||||
mBodyType = bodyType; | |||||
MessageType = msgType; | |||||
Init(); | |||||
} | |||||
private Type mBodyType; | |||||
private List<PropertySerializeHandler> mProperties = new List<PropertySerializeHandler>(); | |||||
private void Init() | |||||
{ | |||||
try | |||||
{ | |||||
foreach (System.Reflection.PropertyInfo p in mBodyType.GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public)) | |||||
{ | |||||
ReadWriteHandlerAttribute[] rwha = (ReadWriteHandlerAttribute[])p.GetCustomAttributes(typeof(ReadWriteHandlerAttribute), true); | |||||
if (rwha != null && rwha.Length > 0) | |||||
{ | |||||
PropertySerializeHandler handler = new PropertySerializeHandler(p, rwha[0]); | |||||
mProperties.Add(handler); | |||||
} | |||||
} | |||||
} | |||||
catch (Exception e_) | |||||
{ | |||||
throw new ProtocolProcessError(string.Format("{0} init error {1}", mBodyType.Name, e_.Message), e_); | |||||
} | |||||
} | |||||
public MessageTypeAttribute MessageType { get; set; } | |||||
public void Deserialize(object obj, IProtocolBuffer buffer) | |||||
{ | |||||
if (obj is IMessageBody) | |||||
{ | |||||
((IMessageBody)obj).Load(buffer); | |||||
} | |||||
else | |||||
{ | |||||
foreach (PropertySerializeHandler item in mProperties) | |||||
{ | |||||
item.Read(obj, buffer); | |||||
} | |||||
} | |||||
} | |||||
public void Serialize(object obj, IProtocolBuffer buffer) | |||||
{ | |||||
if (obj is IMessageBody) | |||||
{ | |||||
((IMessageBody)obj).Save(buffer); | |||||
} | |||||
else | |||||
{ | |||||
foreach (PropertySerializeHandler item in mProperties) | |||||
{ | |||||
item.Write(obj, buffer); | |||||
} | |||||
} | |||||
} | |||||
public object CreateObject() | |||||
{ | |||||
return Activator.CreateInstance(mBodyType); | |||||
} | |||||
} | |||||
public class SerializerFactory | |||||
{ | |||||
private Dictionary<Type, Serializer> mTypeSerializersMap = new Dictionary<Type, Serializer>(); | |||||
private Dictionary<ushort, Serializer> mIDSerializersMap = new Dictionary<ushort, Serializer>(); | |||||
private void Register(Type type, MessageTypeAttribute msgType) | |||||
{ | |||||
Serializer serializer = new Serializer(type, msgType); | |||||
mTypeSerializersMap[type] = serializer; | |||||
mIDSerializersMap[serializer.MessageType.ID] = serializer; | |||||
} | |||||
public Serializer Get(ushort id) | |||||
{ | |||||
Serializer result = null; | |||||
mIDSerializersMap.TryGetValue(id, out result); | |||||
return result; | |||||
} | |||||
public Serializer Get(Type type) | |||||
{ | |||||
Serializer result = null; | |||||
mTypeSerializersMap.TryGetValue(type, out result); | |||||
return result; | |||||
} | |||||
public static void Init() | |||||
{ | |||||
SerializerFactory factory = Defalut; | |||||
} | |||||
private static SerializerFactory mDefault = null; | |||||
public static SerializerFactory Defalut | |||||
{ | |||||
get | |||||
{ | |||||
if (mDefault == null) | |||||
{ | |||||
mDefault = new SerializerFactory(); | |||||
foreach (Type type in typeof(SerializerFactory).Assembly.GetTypes()) | |||||
{ | |||||
MessageTypeAttribute[] mta = (MessageTypeAttribute[])type.GetCustomAttributes(typeof(MessageTypeAttribute), false); | |||||
if (mta != null && mta.Length > 0) | |||||
{ | |||||
mDefault.Register(type, mta[0]); | |||||
} | |||||
} | |||||
} | |||||
return mDefault; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8" ?> | |||||
<configuration> | |||||
<startup> | |||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |||||
</startup> | |||||
</configuration> |
@@ -0,0 +1,67 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{03EB1725-EC1F-4933-B0E9-E7F48A5B414D}</ProjectGuid> | |||||
<OutputType>Exe</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>Beetle.TJ808.BaseServer</RootNamespace> | |||||
<AssemblyName>Beetle.TJ808.BaseServer</AssemblyName> | |||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<PlatformTarget>AnyCPU</PlatformTarget> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<PlatformTarget>AnyCPU</PlatformTarget> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="Beetle.Express"> | |||||
<HintPath>..\..\Lib\Beetle.Express.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Core" /> | |||||
<Reference Include="System.Xml.Linq" /> | |||||
<Reference Include="System.Data.DataSetExtensions" /> | |||||
<Reference Include="Microsoft.CSharp" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Xml" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="Program.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<None Include="App.config" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\Beetle.JT808\Beetle.JT808.csproj"> | |||||
<Project>{ad6a9116-9faf-475d-8451-4316f2df910f}</Project> | |||||
<Name>Beetle.JT808</Name> | |||||
</ProjectReference> | |||||
</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> |
@@ -0,0 +1,91 @@ | |||||
using Beetle.JT808; | |||||
using Beetle.JT808.Messages; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Beetle.TJ808.BaseServer | |||||
{ | |||||
class Program : Beetle.Express.IServerHandler | |||||
{ | |||||
private static Beetle.Express.IServer mServer; | |||||
static void Main(string[] args) | |||||
{ | |||||
Beetle.JT808.Serializes.SerializerFactory.Init(); | |||||
mServer = Beetle.Express.ServerFactory.CreateTCP(); | |||||
mServer.Port = 9091; | |||||
mServer.Handler = new Program(); | |||||
mServer.Open(false, false, false, 1, 1, "JT808"); | |||||
Console.WriteLine("server start!"); | |||||
Console.Read(); | |||||
} | |||||
public void Connect(Express.IServer server, Express.ChannelConnectEventArgs e) | |||||
{ | |||||
} | |||||
public void Disposed(Express.IServer server, Express.ChannelEventArgs e) | |||||
{ | |||||
} | |||||
public void Error(Express.IServer server, Express.ErrorEventArgs e) | |||||
{ | |||||
Console.WriteLine(e.Error.Message); | |||||
} | |||||
public void Opened(Express.IServer server) | |||||
{ | |||||
} | |||||
public void Receive(Express.IServer server, Express.ChannelReceiveEventArgs e) | |||||
{ | |||||
IProtocolBuffer protocolbuffer; | |||||
if (e.Channel.Tag == null) | |||||
{ | |||||
protocolbuffer = ProtocolBufferPool.Default.Pop(); | |||||
e.Channel.Tag = protocolbuffer; | |||||
} | |||||
else | |||||
{ | |||||
protocolbuffer = (IProtocolBuffer)e.Channel.Tag; | |||||
} | |||||
int offset = 0; int count = e.Data.Count; | |||||
while (count > 0) | |||||
{ | |||||
int readcout = protocolbuffer.Import(e.Data.Array, 0, count); | |||||
if (readcout > 0) | |||||
{ | |||||
Message message = MessageFactory.MessageFromBuffer(protocolbuffer); | |||||
ProtocolBufferPool.Default.Push(protocolbuffer); | |||||
protocolbuffer = ProtocolBufferPool.Default.Pop(); | |||||
e.Channel.Tag = protocolbuffer; | |||||
IProtocolBuffer result = MessageFactory.MessateToBuffer<CenterResponse>( | |||||
message.BussinessNO, message.SIM, (m, b) => | |||||
{ | |||||
b.BussinessNO = message.BussinessNO; | |||||
b.ResultID = message.ID; | |||||
b.Result = ResultType.Success; | |||||
}); | |||||
Beetle.Express.Data data = new Express.Data(result.Array, result.Length); | |||||
data.Tag = result; | |||||
server.Send(data, e.Channel); | |||||
offset += readcout; | |||||
count -= readcout; | |||||
} | |||||
} | |||||
} | |||||
public void SendCompleted(Express.IServer server, Express.ChannelSendEventArgs e) | |||||
{ | |||||
IProtocolBuffer buffer = (IProtocolBuffer)e.Data.Tag; | |||||
ProtocolBufferPool.Default.Push(buffer); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,36 @@ | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// 有关程序集的常规信息通过以下 | |||||
// 特性集控制。更改这些特性值可修改 | |||||
// 与程序集关联的信息。 | |||||
[assembly: AssemblyTitle("Beetle.TJ808.BaseServer")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("Beetle.TJ808.BaseServer")] | |||||
[assembly: AssemblyCopyright("Copyright © 2016")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// 将 ComVisible 设置为 false 使此程序集中的类型 | |||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | |||||
// 则将该类型上的 ComVisible 特性设置为 true。 | |||||
[assembly: ComVisible(false)] | |||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID | |||||
[assembly: Guid("d70b0006-9a9b-440f-b870-6ba531c2bc2c")] | |||||
// 程序集的版本信息由下面四个值组成: | |||||
// | |||||
// 主版本 | |||||
// 次版本 | |||||
// 生成号 | |||||
// 修订号 | |||||
// | |||||
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, | |||||
// 方法是按如下所示使用“*”: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@@ -0,0 +1 @@ | |||||
|
@@ -0,0 +1 @@ | |||||
|
@@ -0,0 +1 @@ | |||||
|
@@ -0,0 +1,44 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<modelStoreModel xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:dm1="http://schemas.microsoft.com/dsltools/Kernel" xmlns:dm2="http://schemas.microsoft.com/dsltools/Component" xmlns:dm3="http://schemas.microsoft.com/dsltools/Activity" xmlns:dm4="http://schemas.microsoft.com/dsltools/Interaction" xmlns:dm5="http://schemas.microsoft.com/dsltools/UseCase" xmlns:dm6="http://schemas.microsoft.com/dsltools/UmlModelLibrary" xmlns:dm7="http://schemas.microsoft.com/dsltools/UmlDiagrams" xmlns:dm8="http://schemas.microsoft.com/dsltools/LogicalClassDesigner" | |||||
dslVersion="1.0.0.0" | |||||
Id="0a91f1d7-2bbd-4178-a589-d84f65dd27a2" | |||||
name="ModelingProject1" xmlns="http://schemas.microsoft.com/dsltools/ModelStore"> | |||||
<profileInstances> | |||||
<packageHasProfileInstances | |||||
Id="0caec977-1f8c-4ba3-a7db-8cc9ad9cc73b"> | |||||
<profileInstance | |||||
Id="e34d544e-0fea-4ed6-ac5e-1b74119ac791" | |||||
name="StandardProfileL2" /> | |||||
</packageHasProfileInstances> | |||||
<packageHasProfileInstances | |||||
Id="29349502-908c-4fda-9054-c48619c59ed0"> | |||||
<profileInstance | |||||
Id="532ea607-fb19-44b8-8502-3351b05452be" | |||||
name="StandardProfileL3" /> | |||||
</packageHasProfileInstances> | |||||
</profileInstances> | |||||
<primitiveType | |||||
Id="220a3521-e091-4221-bae9-3ef9018e845c" | |||||
name="Integer" | |||||
isAbstract="false" | |||||
isTemplate="false" | |||||
isLeaf="false" /> | |||||
<primitiveType | |||||
Id="8943dc84-709e-4f62-b15a-a3273aa6f165" | |||||
name="Boolean" | |||||
isAbstract="false" | |||||
isTemplate="false" | |||||
isLeaf="false" /> | |||||
<primitiveType | |||||
Id="59259974-6d55-42c6-b7bd-763d77ac8ef9" | |||||
name="String" | |||||
isAbstract="false" | |||||
isTemplate="false" | |||||
isLeaf="false" /> | |||||
<primitiveType | |||||
Id="3ab42e7d-4969-445a-b209-471f5cb8209c" | |||||
name="UnlimitedNatural" | |||||
isAbstract="false" | |||||
isTemplate="false" | |||||
isLeaf="false" /> | |||||
</modelStoreModel> |
@@ -0,0 +1,43 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<SchemaVersion>2.0</SchemaVersion> | |||||
<ProjectGuid>{3217fbd5-5679-4dd6-9c43-e1c1735e97df}</ProjectGuid> | |||||
<ArchitectureToolsVersion>2.0.0.0</ArchitectureToolsVersion> | |||||
<Name>ModelingProject1</Name> | |||||
<RootNamespace>ModelingProject1</RootNamespace> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
</PropertyGroup> | |||||
<PropertyGroup> | |||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |||||
</PropertyGroup> | |||||
<Import Project="$(VSToolsPath)\ArchitectureTools\Microsoft.VisualStudio.TeamArchitect.ModelingProject.targets" Condition="'$(VSToolsPath)' != ''" /> | |||||
<ItemGroup> | |||||
<Folder Include="ModelDefinition\" /> | |||||
<Content Include="ModelDefinition\ModelingProject1.uml"> | |||||
<SubType>Content</SubType> | |||||
</Content> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Validate Include="LayerDiagram1.layerdiagram"> | |||||
<SubType>Content</SubType> | |||||
</Validate> | |||||
<Validate Include="LayerDiagram1.layerdiagram.layout"> | |||||
<SubType>Content</SubType> | |||||
<DependentUpon>LayerDiagram1.layerdiagram</DependentUpon> | |||||
</Validate> | |||||
<Validate Include="LayerDiagram1.layerdiagram.suppressions"> | |||||
<SubType>Content</SubType> | |||||
<DependentUpon>LayerDiagram1.layerdiagram</DependentUpon> | |||||
</Validate> | |||||
</ItemGroup> | |||||
</Project> |