mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-26 21:22:27 -06:00
22 lines
522 B
Python
Executable file
22 lines
522 B
Python
Executable file
|
|
|
|
class TelemetryLimited:
|
|
Sng = SerialNumGen()
|
|
|
|
def __init__(self):
|
|
self._telemetryLimiterId = self.Sng.next()
|
|
self._limits = set()
|
|
|
|
def getTelemetryLimiterId(self):
|
|
return self._telemetryLimiterId
|
|
|
|
def addTelemetryLimit(self, limit):
|
|
self._limits.add(limit)
|
|
|
|
def removeTelemetryLimit(self, limit):
|
|
if limit in self._limits:
|
|
self._limits.remove(limit)
|
|
|
|
def enforceTelemetryLimits(self):
|
|
for limit in self._limits:
|
|
limit(self)
|