@@ -0,0 +1,13 @@ | |||||
using JT808.Protocol.Interfaces; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
namespace JTTools.Configs | |||||
{ | |||||
public class JT808_Streamax_Config : GlobalConfigBase | |||||
{ | |||||
public override string ConfigId { get; protected set; } = "JT808_Streamax_Config"; | |||||
} | |||||
} |
@@ -7,14 +7,15 @@ | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BlazorStrap" Version="1.3.2" /> | |||||
<PackageReference Include="BlazorStrap" Version="1.3.3" /> | |||||
<PackageReference Include="JT1078" Version="1.0.3" /> | <PackageReference Include="JT1078" Version="1.0.3" /> | ||||
<PackageReference Include="JT808" Version="2.2.12" /> | <PackageReference Include="JT808" Version="2.2.12" /> | ||||
<PackageReference Include="JT808.Protocol.Extensions.JT1078" Version="2.2.9.1" /> | |||||
<PackageReference Include="JT808.Protocol.Extensions.JT1078" Version="2.2.12" /> | |||||
<PackageReference Include="JT808.Protocol.Extensions.JTActiveSafety" Version="1.0.4" /> | <PackageReference Include="JT808.Protocol.Extensions.JTActiveSafety" Version="1.0.4" /> | ||||
<PackageReference Include="JT808.Protocol.Extensions.Streamax" Version="0.0.9" /> | |||||
<PackageReference Include="JT809" Version="2.1.4-preview5" /> | <PackageReference Include="JT809" Version="2.1.4-preview5" /> | ||||
<PackageReference Include="JT809.Protocol.Extensions.JT1078" Version="2.1.4-preview4" /> | <PackageReference Include="JT809.Protocol.Extensions.JT1078" Version="2.1.4-preview4" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.7" /> | |||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" /> | |||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||||
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.5" /> | <PackageReference Include="NLog.Extensions.Logging" Version="1.6.5" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -10,6 +10,7 @@ | |||||
@inject IJT808Config config | @inject IJT808Config config | ||||
@inject JT808_JT1078_Config jT808_JT1078_Config | @inject JT808_JT1078_Config jT808_JT1078_Config | ||||
@inject JT808_JTActiveSafety_Config jT808_JTActiveSafety_Config | @inject JT808_JTActiveSafety_Config jT808_JTActiveSafety_Config | ||||
@inject JT808_Streamax_Config jT808_Streamax_Config | |||||
<BSBasicForm IsInline="true"> | <BSBasicForm IsInline="true"> | ||||
<BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0"> | <BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0"> | ||||
@@ -17,6 +18,7 @@ | |||||
<option value="JT808">国标</option> | <option value="JT808">国标</option> | ||||
<option value="JT808_JT1078">国标扩展JT1078</option> | <option value="JT808_JT1078">国标扩展JT1078</option> | ||||
<option value="JT808_JTAS">国标扩展主动安全(苏标)</option> | <option value="JT808_JTAS">国标扩展主动安全(苏标)</option> | ||||
<option value="JT808_JTRM">锐明JT808公交业务扩展协议</option> | |||||
</select> | </select> | ||||
</BSFormGroup> | </BSFormGroup> | ||||
<BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0"> | <BSFormGroup Class="mb-5 mr-sm-5 mb-sm-0"> | ||||
@@ -42,6 +44,8 @@ | |||||
private JT808Serializer JTAS_Serializer; | private JT808Serializer JTAS_Serializer; | ||||
private JT808Serializer JTRM_Serializer; | |||||
private JT808Serializer JT1078Serializer; | private JT808Serializer JT1078Serializer; | ||||
string protocolType = "JT808"; | string protocolType = "JT808"; | ||||
@@ -70,6 +74,7 @@ | |||||
Serializer = config.GetSerializer(); | Serializer = config.GetSerializer(); | ||||
JT1078Serializer = jT808_JT1078_Config.GetSerializer(); | JT1078Serializer = jT808_JT1078_Config.GetSerializer(); | ||||
JTAS_Serializer = jT808_JTActiveSafety_Config.GetSerializer(); | JTAS_Serializer = jT808_JTActiveSafety_Config.GetSerializer(); | ||||
JTRM_Serializer = jT808_Streamax_Config.GetSerializer(); | |||||
} | } | ||||
private void Query() | private void Query() | ||||
@@ -89,6 +94,9 @@ | |||||
case "JT808_JTAS": | case "JT808_JTAS": | ||||
Json = JTAS_Serializer.Analyze(data, options: JTJsonWriterOptions.Instance); | Json = JTAS_Serializer.Analyze(data, options: JTJsonWriterOptions.Instance); | ||||
break; | break; | ||||
case "JT808_JTRM": | |||||
Json = JTRM_Serializer.Analyze(data, options: JTJsonWriterOptions.Instance); | |||||
break; | |||||
} | } | ||||
} | } | ||||
catch (JT808Exception ex) | catch (JT808Exception ex) | ||||
@@ -13,6 +13,7 @@ using Newtonsoft.Json.Serialization; | |||||
using JTTools.Configs; | using JTTools.Configs; | ||||
using BlazorStrap; | using BlazorStrap; | ||||
using Newtonsoft.Json; | using Newtonsoft.Json; | ||||
using JT808.Protocol.Extensions.Streamax; | |||||
namespace JTTools | namespace JTTools | ||||
{ | { | ||||
@@ -106,6 +107,8 @@ namespace JTTools | |||||
.AddJT1078Configure(); | .AddJT1078Configure(); | ||||
services.AddJT809Configure(new JT809_2019_Config()) | services.AddJT809Configure(new JT809_2019_Config()) | ||||
.AddJT1078Configure(); | .AddJT1078Configure(); | ||||
services.AddJT808Configure(new JT808_Streamax_Config()) | |||||
.AddStreamaxConfigure(); | |||||
}) | }) | ||||
.Build() | .Build() | ||||
.Run(); | .Run(); | ||||