This module defines several functions and classes for mocking a serial port receiving Olimex-EKG-EMG (aka. EXG) packets.
A class for mocking a serial.Serial object with data from a bytearray.
Return one byte.
A class for mocking a serial.Serial object with data from a file.
Return one byte.
A context manager for mocking serial.Serial objects during testing.
Return a serial.Serial like object.
A factory for creating serial.Serial like objects. These objects can be used for testing other logic within in this package.
Parameters: | mock_data_source – |
---|
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.