|
lib60870-C
2.3.2
C source code library for the IEC 60870-5-101/104 protocols
|
Abstraction layer for serial ports. Has to be implemented for the serial link layer of CS 101. More...
#include "hal_base.h"

Go to the source code of this file.
Typedefs | |
| typedef struct sSerialPort * | SerialPort |
Functions | |
| PAL_API SerialPort | SerialPort_create (const char *interfaceName, int baudRate, uint8_t dataBits, char parity, uint8_t stopBits) |
| Create a new SerialPort instance. More... | |
| PAL_API void | SerialPort_destroy (SerialPort self) |
| Destroy the SerialPort instance and release all resources. | |
| PAL_API bool | SerialPort_open (SerialPort self) |
| Open the serial interface. More... | |
| PAL_API void | SerialPort_close (SerialPort self) |
| Close (release) the serial interface. | |
| PAL_API int | SerialPort_getBaudRate (SerialPort self) |
| Get the baudrate used by the serial interface. More... | |
| PAL_API void | SerialPort_setTimeout (SerialPort self, int timeout) |
| Set the timeout used for message reception. More... | |
| PAL_API void | SerialPort_discardInBuffer (SerialPort self) |
| Discard all data in the input buffer of the serial interface. | |
| PAL_API int | SerialPort_readByte (SerialPort self) |
| Read a byte from the interface. More... | |
| PAL_API int | SerialPort_write (SerialPort self, uint8_t *buffer, int startPos, int numberOfBytes) |
| Write the number of bytes from the buffer to the serial interface. More... | |
| PAL_API SerialPortError | SerialPort_getLastError (SerialPort self) |
| Get the error code of the last operation. | |
Abstraction layer for serial ports. Has to be implemented for the serial link layer of CS 101.