The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Device::MindWave::Packet

DESCRIPTION

Interface module for MindWave packets.

PUBLIC METHODS

new

Takes a byte arrayref and an index into that arrayref as its arguments, representing the data of the packet (exclusive of the synchronisation bytes and the checksum byte). Returns a new instance of the relevant packet. Dies on error.

as_string

Returns the packet's details as a human-readable string.

as_bytes

Returns the packet's payload as an arrayref of bytes.

length

Returns the number of bytes in the packet's payload.