Decoder
in package
Decodes a message from a medium.
Tags
Table of Contents
Properties
- $eom : string
- $src : MediumInterface
Methods
- __construct() : mixed
- Decoder constructor.
- decode() : Message
- Decodes the message from the medium
Properties
$eom
private
string
$eom
$src
private
MediumInterface
$src
Methods
__construct()
Decoder constructor.
public
__construct(MediumInterface $source[, string $eom = BinaryMessage::DEFAULT_EOM ]) : mixed
Parameters
- $source : MediumInterface
-
The source medium.
- $eom : string = BinaryMessage::DEFAULT_EOM
-
A binary rappresentation of the End Of Message, must be 8 bits long (default is '00000000').
decode()
Decodes the message from the medium
public
decode() : Message
Tags
Return values
Message —A message