#ifndef CONTROL_TABLE_H
#define CONTROL_TABLE_H
  //The driver manages the control table
  #include <stdint.h>
  #include <stdbool.h>

  #include "app/nfm/nfm_base.h"
  #include "app/nfm/nfm_base_mem.h"

  #define ERROR_CODE              0xFF
  typedef struct
  { 
      bool (*Init)( );
      bool (*AddPoints)( uint8_t * val, uint8_t size );
      bool (*ClearTable)( );
      void (*SetEditState)(bool state);
      bool (*GetEditState)( );
      uint16_t (*GetNumberOfPoints)();
      bool (*Get_Point)(uint8_t point_number, sTableTablePoint_t* point);
      void (*DeInit)( );
  }
  Table_Handle_t;

 typedef struct
 {
    void (*Start_Meas)( );
    void (*Stop_Meas)( );
    void (*Continue_Meas)( );
    uint8_t (*Mode_Meas) ( );
    void (*PortSet)(sTableTablePoint_t portCommutation);
    void (*SetDefaultState) ( );
    sTableTablePoint_t (*PortRead) ();
    void (*TriggerPolaritySet) (uint8_t polarity);
    uint8_t (*TriggerPolarityGet) ();
    uint8_t (*TriggerCounterGet) ();
 }
 Control_Handle_t;

  extern const Table_Handle_t TableHandle;      // Структура команд управления таблицей
  extern const Control_Handle_t ControlHandle;  // Структура команд управления
#endif