1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-23 04:04:54 +08:00

Some style changes

This commit is contained in:
William Woodall 2012-02-04 21:15:23 -06:00
parent c429b0eede
commit aa59c9517f
2 changed files with 35 additions and 35 deletions

View File

@ -49,37 +49,37 @@ namespace serial {
* Enumeration defines the possible bytesizes for the serial port. * Enumeration defines the possible bytesizes for the serial port.
*/ */
typedef enum { typedef enum {
FIVEBITS = 5, fivebits = 5,
SIXBITS = 6, sixbits = 6,
SEVENBITS = 7, sevenbits = 7,
EIGHTBITS = 8 eightbits = 8
} bytesize_t; } bytesize_t;
/*! /*!
* Enumeration defines the possible parity types for the serial port. * Enumeration defines the possible parity types for the serial port.
*/ */
typedef enum { typedef enum {
PARITY_NONE = 0, parity_none = 0,
PARITY_ODD = 1, parity_odd = 1,
PARITY_EVEN = 2 parity_even = 2
} parity_t; } parity_t;
/*! /*!
* Enumeration defines the possible stopbit types for the serial port. * Enumeration defines the possible stopbit types for the serial port.
*/ */
typedef enum { typedef enum {
STOPBITS_ONE = 1, stopbits_one = 1,
STOPBITS_ONE_POINT_FIVE, stopbits_one_point_five,
STOPBITS_TWO = 2 stopbits_two = 2
} stopbits_t; } stopbits_t;
/*! /*!
* Enumeration defines the possible flowcontrol types for the serial port. * Enumeration defines the possible flowcontrol types for the serial port.
*/ */
typedef enum { typedef enum {
FLOWCONTROL_NONE = 0, flowcontrol_none = 0,
FLOWCONTROL_SOFTWARE, flowcontrol_software,
FLOWCONTROL_HARDWARE å
} flowcontrol_t; } flowcontrol_t;
/*! /*!
@ -105,18 +105,18 @@ public:
* exception has occured. * exception has occured.
* *
* \param bytesize Size of each byte in the serial transmission of data, * \param bytesize Size of each byte in the serial transmission of data,
* default is EIGHTBITS, possible values are: FIVEBITS, SIXBITS, SEVENBITS, * default is eightbits, possible values are: fivebits, sixbits, sevenbits,
* EIGHTBITS * eightbits
* *
* \param parity Method of parity, default is PARITY_NONE, possible values * \param parity Method of parity, default is parity_none, possible values
* are: PARITY_NONE, PARITY_ODD, PARITY_EVEN * are: parity_none, parity_odd, parity_even
* *
* \param stopbits Number of stop bits used, default is STOPBITS_ONE, * \param stopbits Number of stop bits used, default is stopbits_one,
* possible values are: STOPBITS_ONE, STOPBITS_ONE_POINT_FIVE, STOPBITS_TWO * possible values are: stopbits_one, stopbits_one_point_five, stopbits_two
* *
* \param flowcontrol Type of flowcontrol used, default is * \param flowcontrol Type of flowcontrol used, default is
* FLOWCONTROL_NONE, possible values are: FLOWCONTROL_NONE, * flowcontrol_none, possible values are: flowcontrol_none,
* FLOWCONTROL_SOFTWARE, FLOWCONTROL_HARDWARE * flowcontrol_software, flowcontrol_hardware
* *
* \param buffer_size The maximum size of the internal buffer, defaults * \param buffer_size The maximum size of the internal buffer, defaults
* to 256 bytes (2^8). * to 256 bytes (2^8).
@ -126,10 +126,10 @@ public:
Serial (const std::string &port = "", Serial (const std::string &port = "",
unsigned long baudrate = 9600, unsigned long baudrate = 9600,
long timeout = 0, long timeout = 0,
bytesize_t bytesize = EIGHTBITS, bytesize_t bytesize = eightbits,
parity_t parity = PARITY_NONE, parity_t parity = parity_none,
stopbits_t stopbits = STOPBITS_ONE, stopbits_t stopbits = stopbits_one,
flowcontrol_t flowcontrol = FLOWCONTROL_NONE); flowcontrol_t flowcontrol = flowcontrol_none);
/*! Destructor */ /*! Destructor */
virtual ~Serial (); virtual ~Serial ();
@ -283,8 +283,8 @@ public:
/*! Sets the bytesize for the serial port. /*! Sets the bytesize for the serial port.
* *
* \param bytesize Size of each byte in the serial transmission of data, * \param bytesize Size of each byte in the serial transmission of data,
* default is EIGHTBITS, possible values are: FIVEBITS, SIXBITS, SEVENBITS, * default is eightbits, possible values are: fivebits, sixbits, sevenbits,
* EIGHTBITS * eightbits
* *
* \throw InvalidConfigurationException * \throw InvalidConfigurationException
*/ */
@ -302,8 +302,8 @@ public:
/*! Sets the parity for the serial port. /*! Sets the parity for the serial port.
* *
* \param parity Method of parity, default is PARITY_NONE, possible values * \param parity Method of parity, default is parity_none, possible values
* are: PARITY_NONE, PARITY_ODD, PARITY_EVEN * are: parity_none, parity_odd, parity_even
* *
* \throw InvalidConfigurationException * \throw InvalidConfigurationException
*/ */
@ -321,8 +321,8 @@ public:
/*! Sets the stopbits for the serial port. /*! Sets the stopbits for the serial port.
* *
* \param stopbits Number of stop bits used, default is STOPBITS_ONE, * \param stopbits Number of stop bits used, default is stopbits_one,
* possible values are: STOPBITS_ONE, STOPBITS_ONE_POINT_FIVE, STOPBITS_TWO * possible values are: stopbits_one, stopbits_one_point_five, stopbits_two
* *
* \throw InvalidConfigurationException * \throw InvalidConfigurationException
*/ */
@ -340,9 +340,9 @@ public:
/*! Sets the flow control for the serial port. /*! Sets the flow control for the serial port.
* *
* \param flowcontrol Type of flowcontrol used, default is FLOWCONTROL_NONE, * \param flowcontrol Type of flowcontrol used, default is flowcontrol_none,
* possible values are: FLOWCONTROL_NONE, FLOWCONTROL_SOFTWARE, * possible values are: flowcontrol_none, flowcontrol_software,
* FLOWCONTROL_HARDWARE * flowcontrol_hardware
* *
* \throw InvalidConfigurationException * \throw InvalidConfigurationException
*/ */