20 virtual int initial_credits()
const = 0;
23 class packet_flow_interface
48 serialize_order(serializer& ser);
50 static const long infinity = -1;
52 static const int unassigned_vc = -1;
55 packet_flow_interface(
int vc, type_t ty)
60 packet_flow_interface(type_t ty) :
61 type_(ty), vc_(unassigned_vc)
65 packet_flow_interface()
66 : vc_(unassigned_vc) {
81 class packet_flow_payload :
82 public packet_flow_interface,
87 static const double uninitialized_bw;
97 packet_flow_payload(){}
99 virtual ~packet_flow_payload() {}
118 next_port()
const = 0;
122 int new_vc = next_vc();
135 num_bytes_total()
const {
136 return orig_->byte_length();
155 set_arrival(
double time) {
161 bw_ = bw_ == uninitialized_bw ? bw : bw_;
165 set_max_bw(
double bw){
167 bw_ = std::min(bw_, bw);
187 max_incoming_bw()
const {
192 set_max_incoming_bw(
double bw) {
198 return num_bytes_ / bw_;
202 set_inport(
int port) {
215 serialize_order(serializer& ser);
228 class packet_flow_credit :
230 public packet_flow_interface,
231 public serializable_type<packet_flow_credit>
238 packet_flow_credit(){}
245 num_credits_(num_credits),
246 packet_flow_interface(vc, credit) {
270 num_credits()
const {
278 serialize_order(serializer& ser);
291 #endif // PACKETFLOW_H
#define ImplementSerializable(obj)
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
#define DeclareDebugSlot(name)
Macro used for declaring a debug slot in a header file.
static const int uninitialized