NAME
Device::MindWave::Tester
SYNOPSIS
use Device::MindWave;
use Device::MindWave::Tester;
my $mwt = Device::MindWave::Tester->new();
$mwt->push_packet($packet);
$mwt->push_bytes(0xAA, 0xAA, 0x02, 0xD1, 0x00, 0xD9);
my $mw = Device::MindWave->new(fh => $mwt);
...
DESCRIPTION
A dummy object that emulates a MindWave headset.
CONSTRUCTOR
- new
-
Returns a new instance of Device::MindWave::Tester.
PUBLIC METHODS
- push_packet
-
Takes an instance of Device::MindWave::Packet as its single argument. Adds the packet's raw bytes to the internal stream of data that is returned on calls to
read
. - push_bytes
-
Takes a list of bytes (octet integers) as its arguments. Adds those bytes to the internal stream of data that is returned on calls to
read
. - read
-
As per IO::Handle.
- write
-
As per IO::Handle. This is a no-op.