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.