Esempio n. 1
0
    def __init__(self,
                 tunnel_factory: TunnelFactory,
                 name: Optional[str] = None):
        super().__init__(tunnel_factory=tunnel_factory,
                         name=name or utils.generate_name(SystemClock))
        self.tick_us: Optional[int] = None
        self.server_time: types.TimePoint = types.TimePoint(0)
        self.time_callbacks: Set[Callable[[types.TimePoint], None]] = set()
        # A set of a callbacks, which wants to receive timestamps
        self.mutex: threading.Lock = threading.Lock()

        self.cached_time: Callable[[], int] = self.server_time.predict_usec
Esempio n. 2
0
 def __init__(self,
              session_mux: SessionsMux,
              tunnel_factory: TunnelFactory,
              modules_factory: ModulesFactory,
              name: Optional[str] = None):
     self.name = name or utils.generate_name(Commutator)
     super().__init__(tunnel_factory=tunnel_factory, name=self.name)
     self.session_mux = session_mux
     self.modules_factory = modules_factory
     self.modules_info: Dict[str, Dict[str, int]] = {}
     # Map: module_type -> module_name -> slot_id
     self.modules: Dict[str, Dict[str, BaseModule]] = {}
Esempio n. 3
0
 def __init__(self,
              proxy_name: Optional[str] = None,
              trace_mode=False,
              *args,
              **kwargs):
     self.proxy_name: str = proxy_name or utils.generate_name(ProxyChannel)
     super().__init__(channel_name=f"{self.proxy_name}/enc",
                      terminal_name=f"{self.proxy_name}/dec",
                      trace_mode=trace_mode,
                      *args,
                      **kwargs)
     self.downlevel: Optional[Channel] = None
     self._trace_mode = trace_mode
 def __init__(self, name: Optional[str] = None):
     super().__init__(name=name or utils.generate_name(ResourceContainerI))
Esempio n. 5
0
 def __init__(self, name: Optional[str] = None):
     super().__init__(name=name or utils.generate_name(EngineI))
     self.specification: Optional[Specification] = None
 def __init__(self, name: Optional[str] = None):
     super().__init__(name=name or utils.generate_name(CelestialScannerI))
     self.specification: Optional[Specification] = None
Esempio n. 7
0
 def __init__(self, name: Optional[str] = None):
     if not name:
         name = utils.generate_name(BlueprintsLibraryI)
     super().__init__(name=name)
Esempio n. 8
0
 def __init__(self,
              tunnel_factory: TunnelFactory,
              name: Optional[str] = None):
     super().__init__(tunnel_factory=tunnel_factory,
                      name=name or utils.generate_name(CelestialScanner))
     self.specification: Optional[CelestialScannerSpec] = None
 def __init__(self,
              tunnel_factory: "TunnelFactory",
              name: Optional[str] = None):
     super().__init__(tunnel_factory=tunnel_factory,
                      name=name or utils.generate_name(BlueprintsLibrary))
     self.opened_port: Optional[Tuple[int, int]] = None  # (port, accessKey)
Esempio n. 10
0
 def __init__(self, name: Optional[str] = None):
     super().__init__(name=name or utils.generate_name(INavigation))
Esempio n. 11
0
 def __init__(self, name: Optional[str] = None):
     if not name:
         name = utils.generate_name(ShipyardI)
     super().__init__(name=name)
Esempio n. 12
0
 def __init__(self,
              tunnel_factory: "TunnelFactory",
              name: Optional[str] = None):
     super().__init__(tunnel_factory=tunnel_factory,
                      name=name or utils.generate_name(Shipyard))
     self.specification: Optional[ShipyardSpec] = None
 def __init__(self, name: Optional[str] = None):
     if not name:
         name = utils.generate_name(AsteroidMinerI)
     super().__init__(name=name)
Esempio n. 14
0
 def __init__(self,
              tunnel_factory: TunnelFactory,
              name: Optional[str] = None):
     super().__init__(tunnel_factory=tunnel_factory,
                      name=name or utils.generate_name(Engine))
     self.cache = Engine.Cache()
Esempio n. 15
0
 def __init__(self, name: Optional[str] = None, trace_mode: bool = False):
     super().__init__(name=name, trace_mode=trace_mode)
     if name is None:
         name = utils.generate_name(SystemClock)
     self.logger = logging.getLogger(name)
Esempio n. 16
0
 def __init__(self, message_type: Any,
              channel_name: Optional[str] = None,
              trace_mode: bool = False):
     name = channel_name or utils.generate_name(ProxyChannel)
     super().__init__(proxy_name=name, trace_mode=trace_mode)
     self._message_type = message_type