![]() |
Dataflow Runtime API
3.0.3.0
|
Defines the interface of a serial port. More...
#include <Imt.Base.OS.WinEC7/SerialPort.h>
Public Member Functions | |
| SerialPort (SerialPortConfig &config) | |
| Constructor. More... | |
| virtual | ~SerialPort (void) |
| Destructor. More... | |
| bool | open (void) |
| Opens the connection. More... | |
| bool | close (void) |
| Closes the connection. More... | |
| bool | isOpen (void) const |
| Returns true if connection is open. More... | |
| bool | sendData (const uint8_t *const pData, const uint32_t size, uint32_t &numberOfSentBytes) |
| Sends the given data over the serial port. More... | |
| bool | readData (uint8_t *const pData, const uint32_t size, uint32_t &numberOfReadBytes) |
| Reads the received data from the serial port. More... | |
Defines the interface of a serial port.
During link time this interface will be statically linked to a platform dependent implementation of the driver.
|
explicit |
Constructor.
|
virtual |
Destructor.
| bool imt::base::os::winec7::SerialPort::close | ( | void | ) |
Closes the connection.
| bool imt::base::os::winec7::SerialPort::isOpen | ( | void | ) | const |
Returns true if connection is open.
| bool imt::base::os::winec7::SerialPort::open | ( | void | ) |
Opens the connection.
| bool imt::base::os::winec7::SerialPort::readData | ( | uint8_t *const | pData, |
| const uint32_t | size, | ||
| uint32_t & | numberOfReadBytes | ||
| ) |
Reads the received data from the serial port.
| pData | Where the data should be saved |
| size | Maximum number of data to be saved |
| numberOfReadBytes | Contains the number of read bytes |
| bool imt::base::os::winec7::SerialPort::sendData | ( | const uint8_t *const | pData, |
| const uint32_t | size, | ||
| uint32_t & | numberOfSentBytes | ||
| ) |
Sends the given data over the serial port.
| pData | Pointer to the data to be transmitted |
| size | Number of bytes to be transmitted |
| numberOfSentBytes | Contains the number of sent bytes |