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

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-2015 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

$str  : string
String to process
__construct()  : mixed
Initialize a new string to be processed
getByte()  : int
Get BYTE from string (8-bit unsigned integer).
getFixed()  : int
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).

Properties

$str

String to process

protected string $str = ''

Methods

__construct()

Initialize a new string to be processed

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

String from where to extract values

Return values
mixed

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) : int
Parameters
$offset : int

Point from where to read the data.

Return values
int

16 bit value

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

 

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