LCOV - code coverage report
Current view: top level - src/MIDI_Parsers - SerialMIDI_Parser.hpp (source / functions) Hit Total Coverage
Test: 19d2efc7037c2e176feca44750a12594c76f466f Lines: 7 7 100.0 %
Date: 2019-11-24 14:50:27 Functions: 5 5 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "MIDI_Parser.hpp"
       4             : #include "SysExBuffer.hpp"
       5             : 
       6             : BEGIN_CS_NAMESPACE
       7             : 
       8          54 : class SerialMIDI_Parser : public MIDI_Parser {
       9             :   public:
      10             :     MIDI_read_t parse(uint8_t midibyte);
      11             : 
      12             : #if !IGNORE_SYSEX
      13          58 :     SysExMessage getSysEx() const override {
      14          58 :         return {sysexbuffer.getBuffer(), sysexbuffer.getLength(), 0};
      15             :     }
      16             : #endif
      17             : 
      18             :   protected:
      19             : #if !IGNORE_SYSEX
      20             :     SysExBuffer sysexbuffer;
      21             : 
      22         357 :     bool addSysExByte(uint8_t data) { return sysexbuffer.add(data); }
      23          25 :     void startSysEx() { sysexbuffer.start(); }
      24          25 :     void endSysEx() { sysexbuffer.end(); }
      25             : #endif
      26             : 
      27             :   private:
      28          54 :     bool thirdByte = false;
      29             : };
      30             : 
      31             : END_CS_NAMESPACE

Generated by: LCOV version 1.14-5-g4ff2ed6