webservco / icarsoft
A PHP library. Parses the text log files saved by iCarsoft car diagnostic tools into arrays: header, title, info, and either the module information or the live data frames.
Requires
- php: ^8.3
Requires (Dev)
- pds/skeleton: ^1
- phan/phan: ^5
- php-parallel-lint/php-console-highlighter: ^1
- php-parallel-lint/php-parallel-lint: ^1
- phpcompatibility/php-compatibility: ^9
- phpmd/phpmd: ^2
- phpstan/phpstan: ^1
- phpstan/phpstan-strict-rules: ^1
- phpunit/phpunit: ^9
- slevomat/coding-standard: ^8
- squizlabs/php_codesniffer: ^3
- vimeo/psalm: ^4
- webservco/coding-standards: ^0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-12 15:05:28 UTC
README
A PHP library.
Parses the text log files saved by iCarsoft car diagnostic tools into arrays: header, title, info, and either the module information or the live data frames.
- Requires: PHP 8.3+,
ext-mbstring
Installation
composer require webservco/icarsoft
Usage
Live data log
use WebServCo\ICarsoft\Processors\Data\Processor; // Throws RuntimeException if the file can't be read. $processor = new Processor($filePath); // Throws OutOfBoundsException or UnexpectedValueException if the file isn't in the expected format. $processor->run(); $header = $processor->getHeader(); $title = $processor->getTitle(); $info = $processor->getInfo(); $frames = $processor->getFrames();
Each frame maps a parameter name to a list of readings. The number and its unit are kept apart:
[
'Frame' => [['value' => '1', 'units' => null]],
// A reading of "812 rpm".
'Example parameter' => [['value' => '812', 'units' => 'rpm']],
]
Module information log
use WebServCo\ICarsoft\Processors\Info\Processor; $processor = new Processor($filePath); $processor->run(); // ['Example key' => 'value', ...] $content = $processor->getContent();
getHeader(), getTitle() and getInfo() work the same way for both log types.
Contracts
| Class | Purpose |
|---|---|
Processors\Data\Processor |
Live data logs, split into frames. |
Processors\Info\Processor |
Module information logs, one key: value per line. |
Processors\AbstractProcessor |
Reads the file and runs the parsing steps. Extend it for another log type. |
Delimiter |
The separators the log files use between sections and values. |
Namespaces are relative to WebServCo\ICarsoft\.
Notes
Some logs repeat a key. In the header, info and module content arrays the last value wins. Frames keep every value, so each parameter holds a list.
Fault code logs (Processors\Type::FAULT) aren't supported yet.
Development
# Lint. composer lint # Code style. composer check:style # Static analysis. composer check:phpstan composer check:phan composer check:psalm composer check:phpmd