@@ -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" | |||||
} | |||||
] | |||||
} |
@@ -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" | |||||
} | |||||
] | |||||
} |
@@ -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.Formatters; | ||||
using JT808.Protocol.Interfaces; | using JT808.Protocol.Interfaces; | ||||
using JT808.Protocol.MessagePack; | using JT808.Protocol.MessagePack; | ||||
using System; | |||||
using System.Text.Json; | |||||
namespace JT808.Protocol.MessageBody | namespace JT808.Protocol.MessageBody | ||||
{ | { | ||||
@@ -60,6 +60,7 @@ namespace JT808.Protocol.MessageBody | |||||
/// <param name="config"></param> | /// <param name="config"></param> | ||||
public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8106 value, IJT808Config config) | public override void Serialize(ref JT808MessagePackWriter writer, JT808_0x8106 value, IJT808Config config) | ||||
{ | { | ||||
value.ParameterCount = (byte)value.Parameters.Length; | |||||
writer.WriteByte(value.ParameterCount); | writer.WriteByte(value.ParameterCount); | ||||
for (int i = 0; i < value.ParameterCount; i++) | for (int i = 0; i < value.ParameterCount; i++) | ||||
{ | { | ||||