1 #ifndef SCD_REM_CHAN_IF_H
2 #define SCD_REM_CHAN_IF_H
8 * Interface for SystemC channels with remote input.
10 class scd_rem_chan_in_if
15 * Indicates how many bytes can be received by this channel.
17 virtual size_t free() const = 0;
20 * Receive bytes, convert to internal data structures and generate
21 * notifications if necessary.
23 * \param buf pointer to buffer to read data from
24 * \param len number of bytes to receive (not larger than free())
26 virtual void receive(const void* buf, size_t len) = 0;
29 * Virtual deconstructor
31 virtual ~scd_rem_chan_in_if() {}
36 * Interface for SystemC channels with remote output.
38 class scd_rem_chan_out_if
43 * Inidcates how many bytes are available to be sent from this channel.
45 virtual size_t available() const = 0;
48 * Get the available data to be sent. Does not guarantee that it is
49 * actually sent. At most available() bytes are sent.
51 virtual const void* send() const = 0;
54 * Remove bytes from channel that have been successully sent.
56 * \param len number of bytes that have been sent (not larger than
59 virtual void remove(size_t len) = 0;
62 * Virtual deconstructor
64 virtual ~scd_rem_chan_out_if() {}