mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Merge 1c1c43e97fa98051ccc6494cf0facf303f119e5b into 69e0372cf0d3796e84ce9a09aff1d74496f68720
This commit is contained in:
commit
2d90dcf432
@ -141,7 +141,7 @@ public:
|
|||||||
getPort () const;
|
getPort () const;
|
||||||
|
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
Timeout
|
Timeout
|
||||||
getTimeout () const;
|
getTimeout () const;
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public:
|
|||||||
getPort () const;
|
getPort () const;
|
||||||
|
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
Timeout
|
Timeout
|
||||||
getTimeout () const;
|
getTimeout () const;
|
||||||
|
|||||||
@ -179,7 +179,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
Serial (const std::string &port = "",
|
Serial (const std::string &port = "",
|
||||||
uint32_t baudrate = 9600,
|
uint32_t baudrate = 9600,
|
||||||
Timeout timeout = Timeout(),
|
const Timeout &timeout = Timeout(),
|
||||||
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,
|
||||||
@ -458,7 +458,7 @@ public:
|
|||||||
* \see serial::Timeout
|
* \see serial::Timeout
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
setTimeout (Timeout &timeout);
|
setTimeout (const Timeout &timeout);
|
||||||
|
|
||||||
/*! Sets the timeout for reads and writes. */
|
/*! Sets the timeout for reads and writes. */
|
||||||
void
|
void
|
||||||
|
|||||||
@ -725,7 +725,7 @@ Serial::SerialImpl::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
|
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
timeout_ = timeout;
|
timeout_ = timeout;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -370,7 +370,7 @@ Serial::SerialImpl::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::SerialImpl::setTimeout (serial::Timeout &timeout)
|
Serial::SerialImpl::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
timeout_ = timeout;
|
timeout_ = timeout;
|
||||||
if (is_open_) {
|
if (is_open_) {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ private:
|
|||||||
SerialImpl *pimpl_;
|
SerialImpl *pimpl_;
|
||||||
};
|
};
|
||||||
|
|
||||||
Serial::Serial (const string &port, uint32_t baudrate, serial::Timeout timeout,
|
Serial::Serial (const string &port, uint32_t baudrate, const serial::Timeout &timeout,
|
||||||
bytesize_t bytesize, parity_t parity, stopbits_t stopbits,
|
bytesize_t bytesize, parity_t parity, stopbits_t stopbits,
|
||||||
flowcontrol_t flowcontrol)
|
flowcontrol_t flowcontrol)
|
||||||
: pimpl_(new SerialImpl (port, baudrate, bytesize, parity,
|
: pimpl_(new SerialImpl (port, baudrate, bytesize, parity,
|
||||||
@ -297,7 +297,7 @@ Serial::getPort () const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Serial::setTimeout (serial::Timeout &timeout)
|
Serial::setTimeout (const serial::Timeout &timeout)
|
||||||
{
|
{
|
||||||
pimpl_->setTimeout (timeout);
|
pimpl_->setTimeout (timeout);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user