MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/communication/service/IMessageLink.hh
2024-06-07 11:12:56 +03:00

41 lines
972 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* IMessageLink.h
*
* Created on: 31 марта 2017 г.
* Author: titov
*/
#ifndef SOURCES_COMMUNICATION_ITXLINKLINK_H_
#define SOURCES_COMMUNICATION_ITXLINKLINK_H_
#include "../../driver/IDataLink.hh"
#include "IMessageSeries.hh"
#include <cstddef>
namespace communication {
class IMessageLink {
public:
typedef driver::IRxLink istream;
typedef driver::ITxLink ostream;
//todo Почему не iostream?
virtual istream & getData() = 0;
virtual ostream & createMessage( std::size_t size ) = 0;
//todo По хорошему, это должно быть частью протокола (транспортный уровень).
virtual bool createMessageSeries( std::size_t num_messages, IMessageSeriesHandler * handler ) = 0;
virtual std::size_t transmitBuffCapacity() const = 0;
virtual std::size_t receiveBuffCapacity() const = 0;
virtual ~IMessageLink() = default;
};
}
#endif /* SOURCES_COMMUNICATION_ITXLINKLINK_H_ */