LCOV - code coverage report
Current view: top level - src/MIDI_Parsers - SysExBuffer.hpp (source / functions) Hit Total Coverage
Test: 90a1b9beff85a60dc6ebcea034a947a845e56960 Lines: 3 3 100.0 %
Date: 2019-11-30 15:53:32 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <Settings/SettingsWrapper.hpp>
       4             : 
       5             : BEGIN_CS_NAMESPACE
       6             : 
       7         550 : class SysExBuffer {
       8             :   private:
       9             :     uint8_t SysExBuffer[SYSEX_BUFFER_SIZE];
      10         550 :     size_t SysExLength = 0;
      11         550 :     bool receiving = false;
      12             : 
      13             :   public:
      14             :     /// Start a new SysEx message.
      15             :     void start();
      16             :     /// Finish the current SysEx message.
      17             :     void end();
      18             :     /// Add a byte to the current SysEx message.
      19             :     bool add(uint8_t data);
      20             :     /// Check if the buffer has at least 1 byte of free space available.
      21             :     bool hasSpaceLeft() const;
      22             :     /// Check if the buffer is receiving a SysEx message.
      23             :     bool isReceiving() const;
      24             :     /// Get a pointer to the buffer.
      25             :     const uint8_t *getBuffer() const;
      26             :     /// Get the length of the SysEx message in the buffer.
      27             :     size_t getLength() const;
      28             : };
      29             : 
      30             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6