classes-Com-Tecnick-File-Byte

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Byte

in package

Com\Tecnick\File\Byte

Function to read byte-level data

Tags
since
2015-07-28
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2015-2024 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-file

Table of Contents

Methods

__construct()  : mixed
Initialize a new string to be processed
getByte()  : int
Get BYTE from string (8-bit unsigned integer).
getFixed()  : float
Get FIXED from string (32-bit signed fixed-point number (16.16).
getFWord()  : int
Get FWORD from string (Big Endian 16-bit signed integer).
getShort()  : int
Get SHORT from string (Big Endian 16-bit signed integer).
getUFWord()  : int
Get UFWORD from string (Big Endian 16-bit unsigned integer).
getULong()  : int
Get ULONG from string (Big Endian 32-bit unsigned integer).
getUShort()  : int
Get USHORT from string (Big Endian 16-bit unsigned integer).

Methods

__construct()

Initialize a new string to be processed

public __construct(string $str) : mixed
Parameters
$str : string

String from where to extract values

getByte()

Get BYTE from string (8-bit unsigned integer).

public getByte(int $offset) : int
Parameters
$offset : int

Point from where to read the data.

Return values
int

8 bit value

getFixed()

Get FIXED from string (32-bit signed fixed-point number (16.16).

public getFixed(int $offset) : float
Parameters
$offset : int

Point from where to read the data.

Return values
float

getFWord()

Get FWORD from string (Big Endian 16-bit signed integer).

public getFWord(int $offset) : int
Parameters
$offset : int

Point from where to read the data.

Return values
int

16 bit value

getShort()

Get SHORT from string (Big Endian 16-bit signed integer).

public getShort(int $offset) : int
Parameters
$offset : int

Point from where to read the data.

Return values
int

16 bit value

getUFWord()

Get UFWORD from string (Big Endian 16-bit unsigned integer).

public getUFWord(int $offset) : int
Parameters
$offset : int

Point from where to read the data.

Return values
int

16 bit value

getULong()

Get ULONG from string (Big Endian 32-bit unsigned integer).

public getULong(int $offset) : int
Parameters
$offset : int

Point from where to read the data

Return values
int

32 bit value

getUShort()

Get USHORT from string (Big Endian 16-bit unsigned integer).

public getUShort(int $offset) : int
Parameters
$offset : int

Point from where to read the data

Return values
int

16 bit value

On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy