Skip to content

Commit

Permalink
added comments and fixed dror comments
Browse files Browse the repository at this point in the history
Signed-off-by: Elad Gershon <egershon@nvidia.com>
  • Loading branch information
egershonNvidia committed Aug 14, 2024
1 parent bf0b761 commit 1f1a70e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
import urllib.error
import logging
from constants import PDRConstants
class Collector:

class TelemetryCollector:
"""
collecting data for the algorithm
"""
def __init__(self,test_mode:bool) -> None:
self.test_mode = test_mode

def get_telemetry(self):
"""
get the telemetry from secondary telemetry, if it in test mode it get from the simulation
return DataFrame of the telemetry
"""
if self.test_mode:
url = f"http://127.0.0.1:9090/csv/xcset/simulated_telemetry"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from constants import PDRConstants as Constants
from ufm_communication_mgr import UFMCommunicator
from collector import Collector
from collector import TelemetryCollector
# should actually be persistent and thread safe dictionary pf PortStates

class PortData(object):
Expand Down Expand Up @@ -202,7 +202,7 @@ def __init__(self, ufm_client: UFMCommunicator, logger):

self.start_time = time.time()
self.max_time = self.start_time
self.collector = Collector(self.test_mode)
self.collector = TelemetryCollector(self.test_mode)
self.ber_tele_data = pd.DataFrame(columns=[Constants.TIMESTAMP, Constants.SYMBOL_BER, Constants.PORT_NAME])
self.speed_types = {
"FDR": 14,
Expand Down

0 comments on commit 1f1a70e

Please sign in to comment.