Commit 220144ba authored by Ashkan Taslimi's avatar Ashkan Taslimi

Add __repr__ and str functions in PrrtChannelParameters class.

parent 07f44ae7
......@@ -133,6 +133,28 @@ class PrrtChannelParameters:
def get_ri_opt(self, applicationParameters):
return 0
def __repr__(self):
return "PrrtChannelParameters(" \
"loss_rate_fwd={}," \
"loss_rate_bwd={}," \
"rtt_prop_fwd={}," \
"rtt_prop_bwd={}," \
"data_rate_btl_fwd={}," \
"data_rate_btl_bwd={})".format(self.loss_rate_fwd,
self.loss_rate_bwd,
self.rtt_prop_fwd,
self.rtt_prop_bwd,
self.data_rate_btl_fwd,
self.data_rate_btl_bwd)
def __str__(self):
return "({},{},{},{},{},{})".format(self.loss_rate_fwd,
self.loss_rate_bwd,
self.rtt_prop_fwd,
self.rtt_prop_bwd,
self.data_rate_btl_fwd,
self.data_rate_btl_bwd)
class ApplicationParameters:
# maxLatency float in seconds
# maxResidualLossRate in percent
......@@ -294,7 +316,7 @@ cdef class PrrtSocket:
property packet_loss_detection_delay:
def __get__(self)
return 0
# property data_rate_btl_fwd:
# def __get__(self):
# return cprrt.PrrtSocket_get_btlbw_fwd(self._c_socket)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment