This project started in 2011 as a means to read simple text files. It grew into reading multiple file formats that are log related in Automotive, all with a packet structure.
This version of the reader is a rewrite based on lessons learned to try and achieve a better performing library and to take advantage of new features given in .NET Core.
Introduction to RJCP.Diagnostics.Log
The DLT RJCP.Diagnostics.Log.Dlt Reader
It consists of the core library, which lays down the framework for loading files and parsing them, and returning each line in the log file as structured data, which then other applications can group, sort or filter as required to gain extra knowledge.
The text reading library is the simplest application of the core library, which reads a text file and returns each individual line in the text file.
Implements decoding and encoding DLT messages as defined by AutoSAR R20-11 and earlier.
These lessons learned are taken from the first implementation. The old library was intended for automation testing. This version is considerably simplified with the goal of just reading and writing the files. As such, speed is of concern, buffering is removed where possible, threading is reduced to using asynchronous and awaitable methods instead.
- The reader and writer are no longer using threads to try and prefetch data from streams. The original implementation would enumerate lines on the current thread, while a background thread would try to decode. This introduced concurrency issues, especially with call backs and made implementation difficult.
- Use modern .NET Core, along with C# Asynchronous I/O. Makes the code easier to manage and readable.
Some optimisations can certainly be done, but there is more responsibility (and flexibility) on the calling application.