LCOV - code coverage report
Current view: top level - src/MIDI_Parsers - SysExBuffer.hpp (source / functions) Hit Total Coverage
Test: e224b347cd670555e44f06608ac41bd1ace9d9d8 Lines: 3 3 100.0 %
Date: 2020-09-08 17:44:46 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         694 : class SysExBuffer {
       8             :   private:
       9             :     uint8_t SysExBuffer[SYSEX_BUFFER_SIZE];
      10         694 :     size_t SysExLength = 0;
      11         694 :     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-6-g40580cd