MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/communication/IMessageServer.hh

39 lines
697 B
C++

//
// Created by titov on 15.01.2022.
//
#ifndef UMLIBRARY_DEV_IMESSAGESERVER_HH
#define UMLIBRARY_DEV_IMESSAGESERVER_HH
#include <cstddef>
#include <stdint.h>
namespace communication {
struct IMessageClient {
virtual bool response( const char * data, std::size_t size ) = 0;
};
struct IMessageServer {
virtual bool request( IMessageClient * client, const char * data, std::size_t size ) = 0;
};
struct IMessageRouter {
typedef uint32_t ServerId;
virtual void attach( IMessageServer * server, ServerId id ) = 0;
virtual void start() = 0;
virtual bool stop() = 0;
};
}
#endif //UMLIBRARY_DEV_IMESSAGESERVER_HH