1 #ifndef _MA_TRANSPORT_H_
2 #define _MA_TRANSPORT_H_
5 #include <ma_config_board.h>
20 [[nodiscard]]
virtual ma_err_t init(
const void* config) noexcept = 0;
26 [[nodiscard]]
virtual size_t available() const noexcept = 0;
27 virtual
size_t send(const
char* data,
size_t length) noexcept = 0;
28 virtual
size_t flush() noexcept = 0;
29 virtual
size_t receive(
char* data,
size_t length) noexcept = 0;
30 virtual
size_t receiveIf(
char* data,
size_t length,
char delimiter) noexcept = 0;
Definition: ma_transport.h:12
virtual size_t send(const char *data, size_t length) noexcept=0
virtual ma_err_t init(const void *config) noexcept=0
virtual size_t flush() noexcept=0
Transport(ma_transport_type_t type) noexcept
Definition: ma_transport.h:14
ma_transport_type_t m_type
Definition: ma_transport.h:34
ma_transport_type_t getType() const noexcept
Definition: ma_transport.h:24
virtual size_t available() const noexcept=0
bool m_initialized
Definition: ma_transport.h:33
virtual ~Transport()=default
virtual size_t receive(char *data, size_t length) noexcept=0
Transport(const Transport &)=delete
virtual void deInit() noexcept=0
virtual size_t receiveIf(char *data, size_t length, char delimiter) noexcept=0
Transport & operator=(const Transport &)=delete
ma_err_t
Definition: ma_types.h:21
ma_transport_type_t
Definition: ma_types.h:235