Browse Source

调整0x8106的参数总数以参数项集合数量为准

tags/v2.6.2
yedajiang44 1 year ago
parent
commit
049bb70645
3 changed files with 81 additions and 3 deletions
  1. +26
    -0
      .vscode/launch.json
  2. +51
    -0
      .vscode/tasks.json
  3. +4
    -3
      src/JT808.Protocol/MessageBody/JT808_0x8106.cs

+ 26
- 0
.vscode/launch.json View File

@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/JT808.Protocol.Test/bin/Debug/net7.0/JT808.Protocol.Test.dll",
"args": [],
"cwd": "${workspaceFolder}/src/JT808.Protocol.Test",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

+ 51
- 0
.vscode/tasks.json View File

@@ -0,0 +1,51 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/src/JT808.Protocol.Test/JT808.Protocol.Test.csproj"
],
"problemMatcher": "$msCompile"
},
{
"label": "test",
"command": "dotnet",
"type": "process",
"args": [
"test",
"${workspaceFolder}/src/JT808.Protocol.sln"
],
"problemMatcher": "$msCompile"
}
]
}

+ 4
- 3
src/JT808.Protocol/MessageBody/JT808_0x8106.cs View File

@@ -1,9 +1,9 @@
using JT808.Protocol.Extensions;
using System;
using System.Text.Json;
using JT808.Protocol.Extensions;
using JT808.Protocol.Formatters;
using JT808.Protocol.Interfaces;
using JT808.Protocol.MessagePack;
using System;
using System.Text.Json;

namespace JT808.Protocol.MessageBody
{
@@ -60,6 +60,7 @@ namespace JT808.Protocol.MessageBody
/// <param name="config"></param>
public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8106 value, IJT808Config config)
{
value.ParameterCount = (byte)value.Parameters.Length;
writer.WriteByte(value.ParameterCount);
for (int i = 0; i < value.ParameterCount; i++)
{


Loading…
Cancel
Save