X2 Standard  Version 1.24
serialportparams2interface.h
1 #ifndef _SerialPortParams2Interface_H
2 #define _SerialPortParams2Interface_H
3 
4 #ifdef THESKYX_FOLDER_TREE
5 #include "../staticlibs/serx/serxinterface.h"
6 #include "components/basicstring/basicstringinterface.h"
7 #elif X2_FLAT_INCLUDES
8 #include "serxinterface.h"
9 #include "basicstringinterface.h"
10 #else
11 #include "../../licensedinterfaces/serxinterface.h"
12 #include "../../licensedinterfaces/basicstringinterface.h"
13 #endif
14 
15 #define SerialPortParams2Interface_Name "com.bisque.TheSkyX.SerialPortParams2Interface/1.0"
16 
37 {
38 public:
39 
40  virtual ~SerialPortParams2Interface(){}
41 
42 public:
44  virtual void portName(BasicStringInterface& str) const = 0;
46  virtual void setPortName(const char* szPort) = 0;
47 
49  virtual unsigned int baudRate() const = 0;
51  virtual void setBaudRate(unsigned int) = 0;
53  virtual bool isBaudRateFixed() const = 0;
54 
56  virtual SerXInterface::Parity parity() const = 0;
58  virtual void setParity(const SerXInterface::Parity& parity)= 0;
60  virtual bool isParityFixed() const = 0;//Generic serial port ui will hide if fixed
61 
63  virtual int dataBits() const {return 8;}
65  virtual void setDataBits(const int& nValue){(void)nValue;}
67  virtual bool isDataBitsFixed(){return true;}
68 
70  virtual int stopBits() const {return 1;}
72  virtual void setStopBits(const int& nValue){(void)nValue;}
74  virtual bool isStopBitsFixed(){return true;}
75 
77  virtual int flowControl() const {return 0;}
79  virtual void setFlowControl(const int& nValue){(void)nValue;}
81  virtual bool isFlowControlFixed(){return true;}
82 };
83 
84 #endif
SerialPortParams2Interface
The SerialPortParams2Interface is a cross-platform interface to common serial port parameters.
Definition: serialportparams2interface.h:37
SerialPortParams2Interface::isBaudRateFixed
virtual bool isBaudRateFixed() const =0
SerialPortParams2Interface::setParity
virtual void setParity(const SerXInterface::Parity &parity)=0
SerialPortParams2Interface::setDataBits
virtual void setDataBits(const int &nValue)
Definition: serialportparams2interface.h:65
SerialPortParams2Interface::portName
virtual void portName(BasicStringInterface &str) const =0
SerialPortParams2Interface::setBaudRate
virtual void setBaudRate(unsigned int)=0
SerialPortParams2Interface::setStopBits
virtual void setStopBits(const int &nValue)
Definition: serialportparams2interface.h:72
SerialPortParams2Interface::isFlowControlFixed
virtual bool isFlowControlFixed()
Definition: serialportparams2interface.h:81
SerialPortParams2Interface::isParityFixed
virtual bool isParityFixed() const =0
SerialPortParams2Interface::baudRate
virtual unsigned int baudRate() const =0
SerialPortParams2Interface::setFlowControl
virtual void setFlowControl(const int &nValue)
Definition: serialportparams2interface.h:79
SerialPortParams2Interface::flowControl
virtual int flowControl() const
Definition: serialportparams2interface.h:77
SerialPortParams2Interface::parity
virtual SerXInterface::Parity parity() const =0
SerialPortParams2Interface::setPortName
virtual void setPortName(const char *szPort)=0
SerialPortParams2Interface::stopBits
virtual int stopBits() const
Definition: serialportparams2interface.h:70
SerialPortParams2Interface::dataBits
virtual int dataBits() const
Definition: serialportparams2interface.h:63
SerXInterface::Parity
Parity
Definition: serxinterface.h:25
SerialPortParams2Interface::isDataBitsFixed
virtual bool isDataBitsFixed()
Definition: serialportparams2interface.h:67
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
SerialPortParams2Interface::isStopBitsFixed
virtual bool isStopBitsFixed()
Definition: serialportparams2interface.h:74
X2 Examples
(C) Software Bisque, Inc. All rights reserved.