Skip to content

An example repository showcasing (with tests) how to interpret the bytes from Modbus-enabled devices to PHP-based numbers.

Notifications You must be signed in to change notification settings

iPwnPancakes/simple-byte-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Byte Interpreter

This repository contains a simple byte to unsigned integer interpreter written in PHP. This has been tested on PHP 8.1.

It's main purpose is to demonstrate how endianness and word order affect the interpretation of bytes.

In this code, a "word" is made up of 2 bytes, which equals 16 bits. We chose 16 bits because a standard called IEC 61131-3 standard says that's what a WORD should be.

Installation

Make sure to run composer install before running the interpreter.

Running the tests

Run composer test to run the tests.

About

An example repository showcasing (with tests) how to interpret the bytes from Modbus-enabled devices to PHP-based numbers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages