Mock

This module defines several functions and classes for mocking a serial port receiving Olimex-EKG-EMG (aka. EXG) packets.

class olimex.mock.FakeSerialByteArray(byte_array, *args, **kwargs)

A class for mocking a serial.Serial object with data from a bytearray.

read(n=1)

Return n number of bytes.

olimex.mock.packet_generator()

Return an EXG formatted packet that contains fake channel data.

This generator produces fake packets of the form sent by the Olimex-EKG-EMG shield.