Zs2Decode 2023.3.23.1

dotnet add package Zs2Decode --version 2023.3.23.1                
NuGet\Install-Package Zs2Decode -Version 2023.3.23.1                
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="Zs2Decode" Version="2023.3.23.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Zs2Decode --version 2023.3.23.1                
#r "nuget: Zs2Decode, 2023.3.23.1"                
#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 Zs2Decode as a Cake Addin
#addin nuget:?package=Zs2Decode&version=2023.3.23.1

// Install Zs2Decode as a Cake Tool
#tool nuget:?package=Zs2Decode&version=2023.3.23.1                

Zs2Decode

Build Status

This is an implementation of a decoder for ZwickRoell .zs2 files built in C#. Currently the project supports converting .zs2 files to .xml, and getting the sensor data from a .zs2 file. As for decoding the .zs2 file, not all elements are correctly decoded, all elements starting with QS_, except QS_TextPar and QS_ValPar, currently have the bytes from the binary as value.

I would not have been able to make this without Chris Petrich's great documentation, thanks Chris!

How to install

To install using Nuget, run Install-Package Zs2Decode in the package manager console. The Nuget page can be found here.

How to use

These examples can also be found working in the Demo project included in the repository.

Export to xml

using System.Xml.Serialization;
using Zs2Decode;

// Files
var inputFile = "./input.zs2";
var outputFile = "./output.xml";

// Get data
var reader = new DataReaderZs2(inputFile);
var rootChunk = reader.ReadData();

// Write data to xml
var writer = new XmlSerializer(typeof(Chunk));
var file = File.OpenWrite(outputFile);
writer.Serialize(file, rootChunk);
file.Close();

Get sensor data

using System.Xml.Serialization;
using Zs2Decode;

// Files
var inputFile = "./input.zs2";
var outputFile = "./output.xml";

// Get data
var reader = new DataReaderZs2(inputFile);
var rootChunk = reader.ReadData();

// Sensors are stored in Sensors variable
var sensors = rootChunk.Sensors;
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • 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.

Version Downloads Last updated
2023.3.23.1 293 3/24/2023
2022.3.9.4 495 3/9/2022
2022.3.8.5 433 3/8/2022