#ifndef _FILE_ISTP_MANAGER_H_
#define _FILE_ISTP_MANAGER_H_
// ****************************************************************************
// CONDITIONAL COMPILATION DIRECTIVES: Conditional compilation control
// ****************************************************************************


// ****************************************************************************
// INCLUDE FILES: Header files of modules referenced by this module
// ****************************************************************************
#include <stdint.h>


// ****************************************************************************
// MODULE DOCUMENTATION: Detailed description of the module
// ****************************************************************************


// ****************************************************************************
// PUBLIC TYPES: Public types shared with other modules
// ****************************************************************************
typedef enum
{
    ISTP_SAMPLING_INACTIVE,
    ISTP_SAMPLING_ACTIVE
}ISTPSamplingStatus_t;

typedef enum
{
    ISTP_FIFO_MODE_INACTIVE,
    ISTP_FIFO_MODE_ACTIVE
}ISTPFifoMode_t;

typedef enum
{
    ISTP_HEALTH_DATA_INACTIVE,
    ISTP_HEALTH_DATA_ACTIVE
}ISTPHealtDataStatus_t;

typedef struct 
{
    ISTPSamplingStatus_t SamplingStatus;
    ISTPFifoMode_t    FifoMode;
    uint16_t          SampleRateHz;
    uint16_t          SchedulerRateHz;
    uint16_t          NominalFifoSamplesNum;
    ISTPHealtDataStatus_t HealthDataStatus;
}ISTPGlobalProperties_t;

typedef struct
{
    uint8_t FifoOverflow;
    uint8_t SchedulerFrameTimeOverflow;
    uint8_t TxBufferOverflow;
}ISTPAlerts_t;


// ****************************************************************************
// PUBLIC MACROS: Public #define directives shared with other modules
// ****************************************************************************


// ****************************************************************************
// PUBLIC VARIABLES: Public variables shared with other modules
// ****************************************************************************


// ****************************************************************************
// PUBLIC FUNCTIONS: Public functions shared with other modules
// ****************************************************************************
ISTPGlobalProperties_t * ISTPMGetGlobalProperties(void);
ISTPAlerts_t * ISTPMGetAlerts(void);
ISTPSamplingStatus_t ISTPMGetSamplingStatus(void);

void ISTPMSetSamplingStatus( ISTPSamplingStatus_t samplingStatus );
void ISTPMSetFifoMode( ISTPFifoMode_t fifoMode );
void ISTPMSetSampleRateHz( uint16_t sampleRateHz);
void ISTPMSetSchedulerRateHz( uint16_t schedulerRateHz );
void ISTPMSetHealthDataStatus( ISTPHealtDataStatus_t healthDataStatus );

void ISTPMSetAlertFifoOverflow( uint8_t fifoOverflowActive );
void ISTPMSetAlertSchFrameOverflow( uint8_t SchFrameOverflowActive );
void ISTPMSetAlertTxBufferOverflow( uint8_t txBuffOvrflwActive );
void ISTPMLedAlertCode( void );
void ISTPMResetLedAlertCode( void );

uint8_t ISTPMSafetyCheckPointGet( void );
void ISTPMSafetyCheckPointSet( void );
void ISTPMSafetyCheckPointReset( void );
uint8_t ISTPHealthDataStatusGet( void );
uint16_t ISTPSampleRateGet( void );


#endif /* _FILE_ISTP_MANAGER_H_ */