-import logging
-import time
-
-
-class SymbolTime(object):
- """
- In theory the symbol distance (the distance to discriminate symbols) can
- be arbitrary, and it's only bounded below by the stability of the pulse
- time, but in practice it can be necessary to wait a predefined minimum
- amount of time between pulses because of technological limits of the
- transmitting devices, we call this time the "minimum inter-symbol
- distance".
- """
-
- # pylint: disable=too-few-public-methods
- def __init__(self, pulse_min, pulse_max, multiplier,
- min_inter_symbol_distance=0.0):
- assert multiplier >= 0
- if (pulse_min == pulse_max) and (min_inter_symbol_distance == 0):
- raise ValueError("If (pulse_min == pulse_max) a non-zero",
- "inter-symbol distance MUST be specified")
-
- symbol_distance = 2 * (pulse_max - pulse_min)
- if symbol_distance == 0:
- symbol_distance = min_inter_symbol_distance