Skip to content

Commit f1a73de

Browse files
committed
docs
1 parent 45affa8 commit f1a73de

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/scl/simulation/transport.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,42 @@ namespace scl::details {
2929

3030
/**
3131
* @brief Handles the movement of packets between parties in a simulation.
32+
* @ingroup ss
3233
*/
3334
class Transport {
3435
public:
3536
Transport(SimulatorContext& sim_ctx) : m_sim_ctx(sim_ctx) {}
3637

38+
/**
39+
* @brief Queue data for sending.
40+
*/
3741
void send(Time::Duration ts, ChannelId id, const Packet& pkt);
42+
43+
/**
44+
* @brief Queue data for sending.
45+
*/
3846
void send(Time::Duration ts, ChannelId id, Packet&& pkt);
3947

48+
/**
49+
* @brief Check if there is data available for receiving.
50+
*/
4051
bool ready(ChannelId id) const;
52+
53+
/**
54+
* @brief Check if there is data available for receiving within a timelimit.
55+
*/
4156
bool ready(ChannelId id, Time::Duration limit) const;
4257

58+
/**
59+
* @brief Receive data.
60+
*/
4361
std::pair<Packet, Time::Duration> recv(Time::Duration ts, ChannelId id);
4462

4563
enum class PollResult { NA, DATA, NO_DATA };
4664

65+
/**
66+
* @brief Check if it is possible to receive data at
67+
*/
4768
PollResult poll(Time::Duration ts, ChannelId id) const;
4869

4970
private:

0 commit comments

Comments
 (0)