Byte
in package
Com\Tecnick\File\Byte
Function to read byte-level data
Tags
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
floatgetFWord()
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