+ def set_loss_acceptance(self, loss_acceptance):
+ """Set loss acceptance treshold for PDR search.
+
+ :param loss_acceptance: Loss acceptance treshold for PDR search.
+ :type loss_acceptance: str
+ :returns: nothing
+ :raises ValueError: If loss acceptance is lower than zero.
+ """
+ if float(loss_acceptance) < 0:
+ raise ValueError("Loss acceptance must be higher or equal 0")
+ else:
+ self._loss_acceptance = float(loss_acceptance)
+
+ def get_loss_acceptance(self):
+ """Return configured loss acceptance treshold.
+
+ :returns: Loss acceptance treshold.
+ :rtype: float
+ """
+ return self._loss_acceptance
+
+ def set_loss_acceptance_type_percentage(self):
+ """Set loss acceptance treshold type to percentage.
+
+ :returns: nothing
+ """
+ self._loss_acceptance_type = LossAcceptanceType.PERCENTAGE
+
+ def set_loss_acceptance_type_frames(self):
+ """Set loss acceptance treshold type to frames.
+
+ :returns: nothing
+ """
+ self._loss_acceptance_type = LossAcceptanceType.FRAMES
+
+ def loss_acceptance_type_is_percentage(self):
+ """Return true if loss acceptance treshold type is percentage,
+ false otherwise.
+
+ :returns: True if loss acceptance treshold type is percentage.
+ :rtype: boolean
+ """
+ return self._loss_acceptance_type == LossAcceptanceType.PERCENTAGE
+