mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-03-15 12:24:29 +00:00
Bulk convert comments above classes/functions/methods into proper docstrings
This commit is contained in:
@@ -12,17 +12,19 @@ from data.spot import Spot
|
||||
from spotproviders.spot_provider import SpotProvider
|
||||
|
||||
|
||||
# Spot provider for the Reverse Beacon Network. Connects to a single port, if you want both CW/RTTY (port 7000) and FT8
|
||||
# (port 7001) you need to instantiate two copies of this. The port is provided as an argument to the constructor.
|
||||
class RBN(SpotProvider):
|
||||
"""Spot provider for the Reverse Beacon Network. Connects to a single port, if you want both CW/RTTY (port 7000) and FT8
|
||||
(port 7001) you need to instantiate two copies of this. The port is provided as an argument to the constructor."""
|
||||
|
||||
CALLSIGN_PATTERN = "([a-z|0-9|/]+)"
|
||||
FREQUENCY_PATTERM = "([0-9|.]+)"
|
||||
LINE_PATTERN = re.compile(
|
||||
"^DX de " + CALLSIGN_PATTERN + "-.*:\\s+" + FREQUENCY_PATTERM + "\\s+" + CALLSIGN_PATTERN + "\\s+(.*)\\s+(\\d{4}Z)",
|
||||
re.IGNORECASE)
|
||||
|
||||
# Constructor requires port number.
|
||||
def __init__(self, provider_config):
|
||||
"""Constructor requires port number."""
|
||||
|
||||
super().__init__(provider_config)
|
||||
self.port = provider_config["port"]
|
||||
self.telnet = None
|
||||
@@ -30,7 +32,6 @@ class RBN(SpotProvider):
|
||||
self.thread.daemon = True
|
||||
self.run = True
|
||||
|
||||
|
||||
def start(self):
|
||||
self.thread.start()
|
||||
|
||||
@@ -89,4 +90,4 @@ class RBN(SpotProvider):
|
||||
logging.info("RBN provider (port " + str(self.port) + ") shutting down...")
|
||||
self.status = "Shutting down"
|
||||
|
||||
self.status = "Disconnected"
|
||||
self.status = "Disconnected"
|
||||
|
||||
Reference in New Issue
Block a user