MCPcopy Index your code
hub / github.com/SpaceNetLab/StarryNet / __init__

Method __init__

starrynet/sn_synchronizer.py:13–108  ·  view source on GitHub ↗
(self,
                 configuration_file_path,
                 GS_lat_long,
                 hello_interval=10,
                 AS=[])

Source from the content-addressed store, hash-verified

11class StarryNet():
12
13 def __init__(self,
14 configuration_file_path,
15 GS_lat_long,
16 hello_interval=10,
17 AS=[]):
18 # Initialize constellation information.
19 sn_args = sn_load_file(configuration_file_path, GS_lat_long)
20 self.name = sn_args.cons_name
21 self.satellite_altitude = sn_args.satellite_altitude
22 self.inclination = sn_args.inclination
23 self.orbit_number = sn_args.orbit_number
24 self.sat_number = sn_args.sat_number
25 self.fac_num = sn_args.fac_num
26 self.constellation_size = self.orbit_number * self.sat_number
27 self.node_size = self.orbit_number * self.sat_number + sn_args.fac_num
28 self.link_style = sn_args.link_style
29 self.IP_version = sn_args.IP_version
30 self.link_policy = sn_args.link_policy
31 self.update_interval = sn_args.update_interval
32 self.duration = sn_args.duration
33 self.inter_routing = sn_args.inter_routing
34 self.intra_routing = sn_args.intra_routing
35 self.cycle = sn_args.cycle
36 self.time_slot = sn_args.time_slot
37 self.sat_bandwidth = sn_args.sat_bandwidth
38 self.sat_ground_bandwidth = sn_args.sat_ground_bandwidth
39 self.sat_loss = sn_args.sat_loss
40 self.sat_ground_loss = sn_args.sat_ground_loss
41 self.ground_num = sn_args.ground_num
42 self.multi_machine = sn_args.multi_machine
43 self.antenna_number = sn_args.antenna_number
44 self.antenna_inclination = sn_args.antenna_inclination
45 self.container_global_idx = 1
46 self.hello_interval = hello_interval
47 self.AS = AS
48 self.configuration_file_path = os.path.dirname(
49 os.path.abspath(configuration_file_path))
50 self.file_path = './' + sn_args.cons_name + '-' + str(
51 sn_args.orbit_number) + '-' + str(sn_args.sat_number) + '-' + str(
52 sn_args.satellite_altitude) + '-' + str(
53 sn_args.inclination
54 ) + '-' + sn_args.link_style + '-' + sn_args.link_policy
55 self.observer = Observer(self.file_path, self.configuration_file_path,
56 self.inclination, self.satellite_altitude,
57 self.orbit_number, self.sat_number,
58 self.duration, self.antenna_number,
59 GS_lat_long, self.antenna_inclination,
60 self.intra_routing, self.hello_interval,
61 self.AS)
62 self.docker_service_name = 'constellation-test'
63 self.isl_idx = 0
64 self.ISL_hub = 'ISL_hub'
65 self.container_id_list = []
66 self.n_container = 0
67 # Get ssh handler.
68 self.remote_ssh, self.transport = sn_init_remote_machine(
69 sn_args.remote_machine_IP, sn_args.remote_machine_username,
70 sn_args.remote_machine_password)

Callers

nothing calls this directly

Calls 7

sn_load_fileFunction · 0.85
ObserverClass · 0.85
sn_init_remote_machineFunction · 0.85
sn_init_remote_ftpFunction · 0.85
calculate_delayMethod · 0.80
generate_confMethod · 0.80

Tested by

no test coverage detected