- enum class Type { SEND = 0, RECEIVE, READY, DONE };
+ enum class Type { SEND, RECEIVE };
+
+ static void set_copy_data_callback(void (*callback)(CommImpl*, void*, size_t));
+
+ explicit CommImpl(Type type) : type_(type) {}
+ CommImpl(s4u::Host* from, s4u::Host* to, double bytes);
+
+ CommImpl& set_size(double size);
+ CommImpl& set_src_buff(unsigned char* buff, size_t size);
+ CommImpl& set_dst_buff(unsigned char* buff, size_t* size);
+ CommImpl& set_rate(double rate);
+ CommImpl& set_mailbox(MailboxImpl* mbox);
+ CommImpl& detach();
+
+ double get_rate() const { return rate_; }
+ MailboxImpl* get_mailbox() const { return mbox_; }
+ bool detached() const { return detached_; }