LibCodec8 0.9.3
dotnet add package LibCodec8 --version 0.9.3
NuGet\Install-Package LibCodec8 -Version 0.9.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibCodec8" Version="0.9.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LibCodec8 --version 0.9.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LibCodec8, 0.9.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LibCodec8 as a Cake Addin #addin nuget:?package=LibCodec8&version=0.9.3 // Install LibCodec8 as a Cake Tool #tool nuget:?package=LibCodec8&version=0.9.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Decoder for Codec 8 and Codec 8 Extended (currently only TCP, no UDP support) formats that are used by certain Teltonika devices.
How to use
To decode Codec8
using Codec8;
string input = "000000000000003608010000016B40D8EA30010000000000000000000000000000000105021503010101425E0F01F10000601A014E0000000000000000010000C7CF";
(GenericDecodeResult result, object valueOrError) = Codec8Decoder.ParseHexadecimalString(input);
if (result == GenericDecodeResult.SuccessCodec8)
{
Codec8Frame frame = (Codec8Frame)valueOrError;
}
To decode Codec8 Extended
using Codec8;
string input = "000000000000004A8E010000016B412CEE000100000000000000000000000000000000010005000100010100010011001D00010010015E2C880002000B000000003544C87A000E000000001DD7E06A00000100002994";
(GenericDecodeResult result, object valueOrError) = Codec8ExtendedDecoder.ParseHexadecimalString(input);
if (result == GenericDecodeResult.SuccessCodec8Extended)
{
Codec8ExtendedFrame frame = (Codec8ExtendedFrame)valueOrError;
}
If you don't know what kind of data you have, you can use generic decoder
using Codec8;
string input = "000000000000004A8E010000016B412CEE000100000000000000000000000000000000010005000100010100010011001D00010010015E2C880002000B000000003544C87A000E000000001DD7E06A00000100002994";
(GenericDecodeResult result, object valueOrError) = GenericDecoder.ParseHexadecimalString(input);
if (result == GenericDecodeResult.SuccessCodec8)
{
Codec8Frame frame = (Codec8Frame)valueOrError;
}
else if (result == GenericDecodeResult.SuccessCodec8Extended)
{
Codec8ExtendedFrame frame = (Codec8ExtendedFrame)valueOrError;
}
else
{
Console.Writeline($"Expected success, but got: {valueOrError}");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.