MCPcopy Create free account

hub / github.com/Tong89/smartNode / functions

Functions1,201 in github.com/Tong89/smartNode

↓ 1 callersFunctioninit_metrics
Register /metrics endpoint and HTTP instrumentation hooks on *app*. Also attempts to configure OpenTelemetry tracing if the SDK is available.
backend/metrics.py:277
↓ 1 callersFunctioninject_tle_into_constellation
将拉取的 TLE 条目注入到星座卫星配置列表。 遍历 ``satellites`` 列表,按卫星名称模糊匹配 TLE 条目并设置 ``tle_line1`` / ``tle_line2`` 属性(若对象支持)。 参数 ---- entries : list
backend/physics/tle_source.py:376
↓ 1 callersFunctionis_production
()
backend/config.py:38
↓ 1 callersFunctionis_public_path
(path)
backend/auth.py:78
↓ 1 callersMethodkeep_last_requests
仅保留最近 n 条请求(按 submit_time),返回删除行数。
backend/persistence/db.py:86
↓ 1 callersFunctionlaser_isl_rate
计算两颗卫星之间的激光 ISL 可达速率 (Mbps)。 包含地球遮挡判定:当视线被地球遮挡时返回 0.0。 Parameters ---------- sat1_pos : dict 卫星1位置,含 ``lat``、``lon``(度)、``al
backend/comms/laser_isl.py:402
↓ 1 callersMethodlist_all
返回缓冲中所有轨迹(从旧到新)。
backend/scheduling/trace.py:120
↓ 1 callersMethodload_env
(self)
backend/config.py:140
↓ 1 callersMethodload_file
(self, path)
backend/config.py:132
↓ 1 callersMethodload_requests
(self)
backend/persistence/db.py:56
↓ 1 callersFunctionmockCesiumUnavailable
(page: Page)
frontend/e2e/fixtures/api-mocks.ts:169
↓ 1 callersFunctionmockRequestRejected
(page: Page)
frontend/e2e/fixtures/api-mocks.ts:180
↓ 1 callersMethodoccupy
(self, req_id, sat_id, gs_id, relay_id=None, relay2_id=None, start_time=None, end_time=None)
backend/resources.py:26
↓ 1 callersMethodoccupy_satellite_only
(self, req_id, sat_id)
backend/resources.py:48
↓ 1 callersFunctionpersistLocale
Persist locale on change.
frontend/src/i18n/index.ts:37
↓ 1 callersMethodpropagate
计算 t 时刻卫星位置。 参数 ---- t : datetime 目标时刻(naive 视为 UTC)。 返回 ---- (lat, lon, alt) : tuple[fl
backend/physics/propagator.py:327
↓ 1 callersMethodpurge_requests_before
删除 submit_time 早于 cutoff_ts 的请求,返回删除行数。
backend/persistence/db.py:80
↓ 1 callersFunctionrain_attenuation_db
计算雨衰 A_rain (dB),按 ITU-R P.618-13 / P.838-3 简化方法。 方法 ---- 1. 查 P.838 表得比雨衰系数 k、α。 2. 计算比雨衰 γ_R = k · R^α (dB/km)。 3. 等效斜路径长度 L_s
backend/comms/atmosphere.py:104
↓ 1 callersFunctionrate_with_scan_loss
将偏轴扫描损耗折算到可达速率。 假设速率与信噪比线性相关(Shannon容量在线性域中与 SNR 单调), 此处简化为:可达速率 ∝ 功率因子(线性近似)。 Parameters ---------- base_rate_mbps : float
backend/comms/beam_pointing.py:140
↓ 1 callersMethodrecord_switch
(self, req, current_time)
backend/scheduling/handover.py:25
↓ 1 callersFunctionregister_error_handlers
注册兜底错误处理器,保证 4xx/5xx 都返回脱敏结构。
backend/errors.py:42
↓ 1 callersMethodrelease
(self, req_id)
backend/resources.py:52
↓ 1 callersFunctionrepoint_time_ms
计算从当前指向切换到目标指向所需时间 (ms)。 以二范数计算角度空间中的欧氏距离作为扫描角变化量, 除以 scan_speed 得到重指向时间。 Parameters ---------- current_az_deg : float 当
backend/comms/beam_pointing.py:174
↓ 1 callersMethodreroute_transmission
(self, req, satellite, sat_pos)
backend/scheduling/scheduler.py:78
↓ 1 callersMethodreset
(self, leo_sats, all_gs, geo_relays)
backend/resources.py:21
↓ 1 callersMethodreset_requests
Clear all request/runtime transmission state for a fresh server start.
backend/core.py:492
↓ 1 callersFunctionresolveApiBase
()
frontend/app.js:16
↓ 1 callersMethodselect
选链入口:先过滤安全不兼容链路,再委托基础策略,最后限速。
backend/scheduling/qos.py:245
↓ 1 callersMethodsetBaseUrl
Update the base URL and persist it to localStorage if non-empty.
frontend/src/api/client.ts:80
↓ 1 callersFunctionsetLocale
* Switch the active locale.
frontend/src/i18n/index.ts:48
↓ 1 callersFunctionsetTheme
* Switch to the given theme.
frontend/src/composables/use-theme.ts:51
↓ 1 callersMethodshould_handover
是否允许切换到 new_rate 的新链路。
backend/scheduling/handover.py:13
↓ 1 callersFunctionsse_stream
Generator that yields SSE-formatted frames for a single HTTP connection. ``timeout`` – if > 0, close the stream after that many seconds (use
backend/stream.py:194
↓ 1 callersFunctionstart_snapshot_thread
Launch the background snapshot-push thread (daemon, will not block shutdown).
backend/stream.py:162
↓ 1 callersMethodsubscribe
Register a new subscriber and return its dedicated queue.
backend/stream.py:33
↓ 1 callersFunctiontelemetry_level_to_log_level
将遥测级别字符串转换为 Python logging 级别整数。
backend/logging_config.py:127
↓ 1 callersFunctiontickPlaybackSync
()
frontend/src/stores/simulation.ts:208
↓ 1 callersMethodto_json
将场景字典序列化为 JSON 字符串。
backend/scenario.py:213
↓ 1 callersMethodto_yaml
将场景字典序列化为 YAML 字符串。 若 PyYAML 不可用,退回 JSON(并附带注释说明)。
backend/scenario.py:229
↓ 1 callersFunctiontotal_atmospheric_loss_db
计算总大气衰减(雨衰 + 气体吸收),返回各分量与合计。 Parameters ---------- freq_hz : float 载波频率(Hz)。 elevation_deg : float 卫星仰角(度)。 rainf
backend/comms/atmosphere.py:262
↓ 1 callersMethodunsubscribe
Remove a subscriber queue (called when the HTTP connection closes).
backend/stream.py:40
↓ 1 callersFunctionupdateCoverageFootprints
* Update coverage footprints for all LEO satellites and GEO relay visibility rings. * Called as part of updateScene to keep footprints in sync with
frontend/src/composables/use-cesium-scene.ts:310
↓ 1 callersFunctionupdate_simulation_metrics
Pull current stats from the simulation engine and update Prometheus gauges/counters. Called on each /metrics scrape to keep values fresh.
backend/metrics.py:195
↓ 1 callersFunctionusePlayback
( /** Reactive getter returning the current live simulation time (seconds). */ getLiveTime: () => number,
frontend/src/composables/use-playback.ts:19
↓ 1 callersFunctionuseTheme
()
frontend/src/composables/use-theme.ts:45
↓ 1 callersMethodvalidate
校验场景字典的结构合法性。 Parameters ---------- data: 待校验的对象。 Returns ------- list[str]
backend/scenario.py:175
↓ 1 callersFunctionvalidate_config
启动时校验:生产模式下必须显式提供密钥,缺失即拒启。返回告警列表。
backend/config.py:174
↓ 1 callersFunctionvalidate_request_submission
(data, allowed_data_types=None)
backend/schemas.py:34
Function__getattr__
(name)
backend/__init__.py:10
Method__init__
(self, config_file=None)
backend/config.py:125
Method__init__
(self)
backend/ratelimit.py:17
Method__init__
(self, name, sat_id, semi_major_axis, eccentricity, inclination, raan, arg_p
backend/orbit.py:69
Method__init__
(self, task_type)
backend/core.py:264
Method__init__
(self, data_type, data_size, priority, max_delay, start_time=None, end_time=None, satellite_i
backend/core.py:296
Method__init__
(self, ground_station_count=DEFAULT_GROUND_STATION_COUNT, leo_satellite_count=DEFAULT_LEO_SATELLITE_COUNT, rng
backend/core.py:401
Method__init__
(self)
backend/resources.py:10
Method__init__
(self, errors)
backend/schemas.py:9
Method__init__
(self)
backend/stream.py:29
Method__init__
(self, db_path: str = ":memory:")
backend/store.py:66
Method__init__
(self, antenna_config: dict, station_id: str = "UNKNOWN")
backend/comms/beam_pointing.py:311
Method__init__
(self, engine, strategy=None)
backend/scheduling/scheduler.py:11
Method__init__
(self, engine)
backend/scheduling/qos.py:76
Method__init__
(self, base_strategy=None)
backend/scheduling/qos.py:239
Method__init__
(self, maxlen: int = MAX_TRACE_BUFFER)
backend/scheduling/trace.py:102
Method__init__
(self, rate_ratio, min_dwell, cooldown, min_elevation)
backend/scheduling/handover.py:6
Method__init__
参数 ---- name : str 卫星名称(用于日志)。 tle_line1 : str, optional TLE 第一行;非 None 且 sgp4 可用时启用 SGP4 路径。
backend/physics/propagator.py:244
Method__init__
(self, path=":memory:")
backend/persistence/db.py:13
Method__init__
(self, path=None)
backend/persistence/event_log.py:22
Method__len__
(self)
backend/scheduling/trace.py:124
Method__post_init__
(self)
backend/comms/link_budget.py:180
Method__post_init__
(self)
backend/comms/laser_isl.py:183
Method__repr__
(self)
backend/physics/propagator.py:386
Function_after
(response: Response)
backend/metrics.py:301
Function_applySnapshot
* 将 SSE snapshot 事件的内容应用到 Vue 响应式数据中。 * snapshot 结构与 /api/data 返回的结构兼容。
frontend/app.js:452
Function_authenticate
()
backend/auth.py:90
Function_avg_utilization
计算当前三类资源的平均利用率。
tests/load/test_stress_engine.py:133
Method_batch_calc
对 n 个随机点对计算大圆地心角。
tests/test_perf_benchmarks.py:228
Function_before
()
backend/metrics.py:295
Method_calculate_inter_satellite_rate
(self, geo1_pos, geo2_pos)
backend/core.py:2024
Method_cleanup_expired_time_slots
(self)
backend/core.py:813
Function_count_non_daemon_threads
()
tests/test_smoke.py:22
Function_count_rejections
统计结果列表中被拒绝(reject_reason 非 None/非空)的数量。
tests/load/test_stress_engine.py:139
Method_effective_priority
有效优先级 = 基础优先级 + 老化加权(随等待时间单调上升,封顶 AGING_MAX)。 使长期得不到链路的低优先级请求随等待自动升权,避免饥饿。
backend/core.py:839
Function_engine
函数作用域内的隔离引擎(固定种子、不启动线程)。
tests/test_api.py:39
Function_extract_key
()
backend/auth.py:71
Method_find_best_available_link
(self, req, satellite, sat_pos)
backend/core.py:1186
Method_get_resource_schedule
(self, resource_type, resource_id, time_range=3600)
backend/core.py:816
Method_golden
加载黄金快照,供各测试用例复用。
tests/test_regression_golden.py:350
Method_ground_station_candidates
(self, req)
backend/core.py:1180
Function_handle_400
(e)
backend/errors.py:46
Function_handle_404
(e)
backend/errors.py:50
Function_handle_413
(e)
backend/errors.py:54
Function_handle_415
(e)
backend/errors.py:58
Function_handle_429
(e)
backend/errors.py:62
Function_handle_500
(e)
backend/errors.py:66
Function_handle_exception
(e)
backend/errors.py:71
Method_key_id
(r)
backend/core.py:2184
Function_methodToLinkColor
* 根据传输方式返回对应的链路颜色(Cesium.Color)。 * - direct(直连):金黄色 * - relay(单中继):青绿色 * - multi_relay(多跳):紫色 * @param {string} method - 传输方式
frontend/app.js:812
Function_rateToLineWidth
* 将传输速率(Mbps)归一化为链路线宽(1.5–6px)。 * 使用对数映射,使低速率链路也有明显变化。 * @param {number} rateMbps - 传输速率(Mbps) * @returns {number} 线宽(px)
frontend/app.js:794
Function_refreshOrbitTracksIfNeeded
* 节流控制器:仅当卫星数量变化或距上次刷新超过 60 秒(模拟时间)时才拉取新轨迹。 * 轨迹数据变化慢(轨道根数基本固定),无需每帧刷新。
frontend/app.js:980
← previousnext →301–400 of 1,201, ranked by callers