<commit_before># Teltonika FM-XXXX Parser 

[![Build Status](https://travis-ci.org/uro/teltonika-fm-parser.svg?branch=master)](https://travis-ci.org/uro/teltonika-fm-parser) [![Latest Stable Version](https://poser.pugx.org/uro/teltonika-fm-parser/v/stable)](https://packagist.org/packages/uro/teltonika-fm-parser) [![Total Downloads](https://poser.pugx.org/uro/teltonika-fm-parser/downloads)](https://packagist.org/packages/uro/teltonika-fm-parser)

This repository is object oriented library to translate Teltonika protocols.

You could use this library in your server, it will help you talk with Teltonika devices.

It was build with [Teltonika protocols v2.10](FMXXXX_Protocols_v2.10.pdf) documentation.

## Requirements:

```json
{
    "require": {
        "php": ">=7.0"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7"
    }
}
```

## Usage:

Authentication decode:
```php
// Recieve data from tcp socket
$payloadFromDevice = "000F313233343536373839303132333435";

// Decode recieved data
$decoder = new TcpDecoder();

// Check if data which we recieved are authentication or Gps records<commit_msg>Add badges<commit_after># Teltonika FM-XXXX Parser 

[![Build Status](https://travis-ci.org/uro/teltonika-fm-parser.svg?branch=master)](https://travis-ci.org/uro/teltonika-fm-parser) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/uro/teltonika-fm-parser/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/uro/teltonika-fm-parser/?branch=master) [![CodeFactor](https://www.codefactor.io/repository/github/uro/teltonika-fm-parser/badge)](https://www.codefactor.io/repository/github/uro/teltonika-fm-parser) [![Latest Stable Version](https://poser.pugx.org/uro/teltonika-fm-parser/v/stable)](https://packagist.org/packages/uro/teltonika-fm-parser) [![Total Downloads](https://poser.pugx.org/uro/teltonika-fm-parser/downloads)](https://packagist.org/packages/uro/teltonika-fm-parser)

This repository is object oriented library to translate Teltonika protocols.

You could use this library in your server, it will help you talk with Teltonika devices.

It was build with [Teltonika protocols v2.10](FMXXXX_Protocols_v2.10.pdf) documentation.

## Requirements:

```json
{
    "require": {
        "php": ">=7.0"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7"
    }
}
```

## Usage:

Authentication decode:
```php
// Recieve data from tcp socket
$payloadFromDevice = "000F313233343536373839303132333435";

// Decode recieved data
$decoder = new TcpDecoder();

// Check if data which we recieved are authentication or Gps records
{'fraction_non_alphanumeric': 0.15503875968992248, 'fraction_numerical': 0.03333333333333333, 'mean_word_length': 4.586580086580087, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5053601', 'n_tokens_mistral': 975, 'n_tokens_neox': 888, 'n_words': 166}