#ifndef TCPS_STREAM_TAP_I_H_ #define TCPS_STREAM_TAP_I_H_ /** * @file TCPSStreamTapI.h * @brief Hooks used by TCPStreamJoin to follow the streams of a TCPStreamService. * * TCPSStreamTapI observes the CONFIG / DATA payloads a stream publishes (on the * producer's thread, after the frame went to the subscribers). TCPSStreamObserverI * observes streams registering with / leaving a service. */ #include "CompilerTypes.h" namespace MARTe { class TCPSServiceStream; class TCPSStreamTapI { public: virtual ~TCPSStreamTapI() {} /** A CONFIG payload was published (or the cached one is replayed on AddTap). */ virtual void OnTapConfig(TCPSServiceStream *source, const uint8 *payload, uint32 payloadSize) = 0; /** A DATA payload was published. */ virtual void OnTapData(TCPSServiceStream *source, uint32 counter, const uint8 *payload, uint32 payloadSize) = 0; }; class TCPSStreamObserverI { public: virtual ~TCPSStreamObserverI() {} /** @p stream just registered. May call back into the service. */ virtual void OnStreamRegistered(TCPSServiceStream *stream) = 0; /** @p stream is leaving (it is still valid during the call). */ virtual void OnStreamUnregistered(TCPSServiceStream *stream) = 0; }; } // namespace MARTe #endif // TCPS_STREAM_TAP_I_H_