/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/include/sgx/core/comms/portsettings.hpp

*/

#ifndef SGX_CORE_COMMS_COMPORTSETTINGS_HPP
#define SGX_CORE_COMMS_COMPORTSETTINGS_HPP	1

#define COMM_DEFAULT_BUFFER_SIZE 1024

class CCommPortSettings {
public:
	CCommPortSettings(const sgxString &portname, tUINT32 baud);

	enum {
		DTRControlDisabled=0,
		DTRControlEnabled,
		DTRControlHandshake,
	} DTRFlowControl;

	enum {
		RTSControlDisabled=0,
		RTSControlEnabled,
		RTSControlHandshake,
		RTSControlToggle,
	} RTSFlowControl;

	enum {
		ParityNone=0,
		ParityOdd,
		ParityEven,
		ParityMark,
		ParitySpace,
	} PartiyControl;

	enum {
		StopBitsOne=0,
		StopBitsOneFive,
		StopBitsTwo,
	} StopBits;

	sgxString	m_Name;
	tUINT32		m_iBaud;
	int			m_DTR;
	int			m_RTS;
	int			m_iByteSize;
	int			m_Parity;
	int			m_StopBits;

private:
	CCommPortSettings(){}
};


#endif /* SGX_CORE_COMMS_COMPORTSETTINGS_HPP */
