#ifndef IDIBUS_Test_H_
#define IDIBUS_Test_H_

#include "IdiBusSlave.h"				//	Common slave defines
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#define IDIBUS_Test_CH_COUNT 1

enum IDIBUS_Test_MODULE_DEVICES_LIST {	//	Describe devices on module
	IDIBUS_Test_CNTRL_DEV = 0,			//	ADC device ID
	IDIBUS_Test_DEVICES_NUMBER			//	Device count on module
	};

typedef struct {
	uint8_t RNG[256];
	uint8_t DATA[256];
	uint8_t MMES_Error;		//	Last error
	uint32_t state;
} IDIBUS_Test_DATA_TYPE;	//	Data structure for ADC channels

class IdiBus_Test : public IdiBusSlave {									//	ADC module class
	public:																	//	Pulic methods 
 		IdiBus_Test ( IdiBusSerialLine *SlaveLine, uint8_t SlaveAddress);		// Init object with specified bus line and addr
		IdiBus_Test ();															// init without specified line and addr (default value line=NULL,addr=1)
		 	
		uint8_t sendPacket(uint8_t ChNum);									// Sends MMES and gets Ch voltage (writes to CH structure and return error code)
		//void    getAllChTemperature(void);											// Sends MMES and gets all Ch voltages (writes to CH structure)
			
		//void    initAllChs(void);												// Inits all adc channels on module
	
		IDIBUS_Test_DATA_TYPE  getChData(uint8_t ChNum);						// Returns data structure for ADC channel
	
	protected :																// 'Private' methods and structures
		IDIBUS_Test_DATA_TYPE  CH[IDIBUS_Test_CH_COUNT];						// Data structure array
		uint32_t	xorshift32(uint32_t state,uint8_t *data);	
		void    setAllChErr(uint8_t ErrCode);									// Set error code for all channels
};

#endif /* IDIBUS_41Wire_H_ */