#ifndef CSC5262_H_
#define CSC5262_H_


class CSC5262
{

public:
							CSC5262					(int pulseLength, int pin, bool bQuiet = false);
	virtual 				~CSC5262				();
	bool 					SwitchSocket 			(unsigned char SystemCode, unsigned char Receiver, bool bTurnOn, int repeatedSuccess, int totalTransmittion);
	bool					Switch					(unsigned char SystemCode, unsigned char Receiver, bool bTurnOn);

protected:
	enum TriSTateBit
	{
		Zero = 0,
		One,
		Floating,
		Sync
	};

	//bool					Switch					(unsigned char SystemCode, unsigned char Receiver, bool bTurnOn);
	void					SendLogicalBit			(unsigned short bit);
	void					SendPysicalBit			(TriSTateBit bit);
	void 					SendCommand 			(bool bTurnOn);
	void 					SendSync 				();

	int 					m_PulseLength;
	int 					m_Pin;
	bool					m_bQuiet;
};

#endif /* CSC5262_H_ */
