#ifndef __SRIO_SLAVE_H__
#define __SRIO_SLAVE_H__

#define DIO_ERROR_PACKET_SIZE_BYTES	4
#define SRIO_MAX_BUFFER_COUNT		4

typedef struct  {
    uint64_t	numberOfPackets;
    uint32_t	packetSizeBytes;
    uint32_t	overheadBytes;
    uint64_t	tsLoopStart;
    uint64_t	tsLoopEnd;
    uint64_t	totalLldCycles;
    uint64_t	totalProcCycles;
    uint64_t	totalIdleCycles;
    uint32_t	pacingCycles;
    uint32_t	minLatCycles;
    uint32_t	maxLatCycles;
    uint32_t	fType;
    uint32_t	tType;
    bool	isShowHeader;
    bool	isTestInfoOnly;
} Slave_Parameters;

int GetSRIOTempBufferDataSize();
void *GetSRIOTempBuffer();
void ClearSRIOTempBuffer();
void AddL2DataToSRIOTempBuffer(void *data, int size);
void ReadStartSRIOTempBuffer();
void ReadL2DataFromSRIOTempBuffer(void *data, int size);

void ReadData_Complete(unsigned int indicator, unsigned int dataSize_Word);
unsigned char *ReadData_GetAddress(unsigned int indicator);
unsigned char *WriteData_GetAddress(unsigned int indicator);
void Set_Processing_Status(unsigned int status);
void Set_Status();
void srio_cloes();
void Srio_Packet_Process(int packet_index);
void Srio_Slave_Process();
void srio_open();
void Srio_Slave_init();

#endif /* __SRIO_SLAVE_H__ */
