Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tong89/smartNode
/ types & classes
Types & classes
156 in github.com/Tong89/smartNode
⨍
Functions
1,201
◇
Types & classes
156
↳
Endpoints
53
↓ 21 callers
Class
OrbitalElements
轨道六根数定义 - 用于精确计算卫星位置。 支持可选的 TLE 两行根数驱动 SGP4 传播。当 ``tle_line1`` / ``tle_line2`` 字段 非空时,``propagate()`` 使用 :func:`~backend.physics.propagator.p
backend/orbit.py:54
↓ 15 callers
Class
TransmissionRequest
数据传输请求 - 与卫星绑定
backend/core.py:291
↓ 6 callers
Class
SqliteRepository
backend/persistence/db.py:12
↓ 5 callers
Class
SimulationEngine
仿真引擎核心 - 管理卫星、地面站、传输任务
backend/core.py:389
↓ 4 callers
Class
BeamPointingResult
波束指向约束校验结果。
backend/comms/beam_pointing.py:219
↓ 4 callers
Class
LinkBudget
链路预算引擎配置。 参数 ---- band : str 频段名称,决定频率、默认 EIRP/G-T/带宽等。 eirp_dbw : float, optional 发射端有效全向辐射功率 (dBW)。不设则取频段默认值。 g
backend/comms/link_budget.py:154
↓ 4 callers
Class
ValidationError
backend/schemas.py:8
↓ 3 callers
Class
EventLog
backend/persistence/event_log.py:21
↓ 3 callers
Class
ResourceManager
backend/resources.py:9
↓ 2 callers
Class
BeamPointing
相控阵波束指向约束管理器。 持有单个天线(站点)的波束状态,支持: - 检查新指向请求是否满足扫描范围约束; - 计算偏轴扫描损耗并折算到速率; - 跟踪当前活跃波束数,强制执行 max_beams 约束; - 计算重指向时间。 Parameter
backend/comms/beam_pointing.py:265
↓ 2 callers
Class
CandidateLink
候选链路及其评分信息。
backend/scheduling/trace.py:32
↓ 2 callers
Class
GreedyMaxRateStrategy
贪心:在允许的链路中选择可用且速率最高者(与历史行为一致)。
backend/scheduling/strategy.py:19
↓ 2 callers
Class
LaserISLModel
激光星间链路物理模型配置。 参数 ---- wavelength_m : float 激光波长 (m),默认 1550 nm。 tx_power_w : float 发射光功率 (W),默认 0.5 W。 tx_apertur
backend/comms/laser_isl.py:142
↓ 2 callers
Class
LaserISLResult
激光星间链路计算结果。 Attributes ---------- is_visible : bool 视线几何可见性(视线不被地球遮挡)。 distance_km : float 两卫星间距离 (km)。 fspl_db :
backend/comms/laser_isl.py:85
↓ 2 callers
Class
QosAdmissionController
QoS 与安全级准入控制器。 在调度器选链之前对请求进行预筛,决定是否允许进入调度流程, 并可在链路候选集中移除不符合安全约束的链路类型。 Args: engine: SimulationEngine 实例引用(用于读取带宽统计与中继列表)。
backend/scheduling/qos.py:66
↓ 2 callers
Class
ScenarioStore
场景库管理器——多场景持久化、切换与对比。 Parameters ---------- db_path: SQLite 数据库路径,默认内存数据库(进程重启后丢失)。 生产环境可传入文件路径以持久化。
backend/store.py:56
↓ 1 callers
Class
ContentTask
内容任务 - 带时效性衰减的数据价值模型
backend/core.py:261
↓ 1 callers
Class
DecisionTrace
单次调度决策的完整轨迹记录。
backend/scheduling/trace.py:48
↓ 1 callers
Class
DecisionTraceBuffer
固定容量的调度决策轨迹环形缓冲。 内部使用 deque(maxlen) 保证不超过 MAX_TRACE_BUFFER 条记录, 同时维护 req_id -> trace 的索引字典以支持 O(1) 查询。 当缓冲满时,最旧的记录及其索引条目会被自动淘汰。
backend/scheduling/trace.py:94
↓ 1 callers
Class
HandoverController
backend/scheduling/handover.py:5
↓ 1 callers
Class
LayeredSettings
分层配置:默认 < 文件(JSON) < 环境变量 < 运行时覆盖。 后加载的层覆盖先前层。环境变量键统一为 ``SMARTNODE_<UPPER_KEY>``。
backend/config.py:108
↓ 1 callers
Class
LinkBudgetResult
链路预算计算结果(全部 dB/dBW 量纲除非特别注明)。
backend/comms/link_budget.py:101
↓ 1 callers
Class
QosAwareStrategy
在 GreedyMaxRateStrategy 基础上叠加 QoS 与安全级约束。 作为装饰器包裹底层策略,在候选链路集合上施加安全过滤, 并对低 QoS 请求应用速率上限。
backend/scheduling/qos.py:230
↓ 1 callers
Class
Scheduler
backend/scheduling/scheduler.py:10
↓ 1 callers
Class
SlidingWindowLimiter
backend/ratelimit.py:16
↓ 1 callers
Class
_EventBus
In-process fan-out message bus for SSE subscribers.
backend/stream.py:26
Class
frontend/src/api/client.ts:50
Class
frontend/src/api/client.ts:65
Class
ApiClient
frontend/src/api/client.ts:65
Class
ApiError
frontend/src/api/client.ts:50
Interface
ApiError
frontend/src/types/api.ts:9
Interface
DecisionMetrics
frontend/src/types/api.ts:71
Interface
Envelope
frontend/src/types/api.ts:3
Class
GeoRelay
backend/models.py:34
Interface
GeoRelay
frontend/src/types/api.ts:38
Class
GroundStation
backend/models.py:14
Interface
GroundStation
frontend/src/types/api.ts:29
Interface
HealthResponse
frontend/src/api/endpoints.ts:39
Class
HighConcurrencyUser
模拟高并发爆发场景:极短等待,连续提交请求。 用于压力测试下检验引擎的拒绝行为与统计计数守恒。
tests/load/locustfile.py:148
Class
LeoSatellite
backend/models.py:54
Class
Propagator
统一轨道传播接口:TLE/SGP4 优先,二体开普勒回退。 用法示例:: # 1. 从 TLE 字符串创建(走 SGP4 路径) prop = Propagator.from_tle("卫星名", "1 25544U ...", "2 25544 ..."
backend/physics/propagator.py:228
Interface
RequestOptions
frontend/src/api/client.ts:18
Interface
ResourceTimeline
frontend/src/types/api.ts:137
Interface
ResourceUtilization
frontend/src/types/api.ts:83
Interface
Satellite
frontend/src/types/api.ts:17
Interface
ScenarioData
frontend/src/types/api.ts:95
Class
ScenarioManager
序列化当前仿真资源配置为可保存的场景对象,并支持从场景还原。 ``save`` / ``load`` 操作仅操作资源数量配置(地面站、LEO 卫星), 不保存正在进行中的传输请求或实时仿真状态(快照功能由独立的 snapshot 模块负责)。
backend/scenario.py:94
Interface
ScenarioRestoreResult
frontend/src/types/api.ts:106
Interface
SceneData
frontend/src/composables/use-cesium-scene.ts:28
Class
SchedulingStrategy
backend/scheduling/strategy.py:10
Class
SmartNodeUser
模拟普通用户提交传输请求。 等待时间 0.1-1.0 秒,模拟真实用户操作间隔。
tests/load/locustfile.py:71
Interface
SnapshotAt
frontend/src/api/endpoints.ts:134
Class
SnapshotManager
仿真快照管理器。 提供静态方法,无需实例化即可使用。 Methods ------- take(engine, label) -> dict 对引擎当前状态拍快照,返回快照字典。 restore(engine, snapshot)
backend/snapshot.py:42
Interface
SystemData
frontend/src/types/api.ts:62
Class
TestAllRequestsWithBackgroundEndpoint
包含背景任务的全量请求接口契约。
tests/test_api_integration.py:560
Class
TestCalcCentralAngle
Haversine 公式的基本性质与已知数值验证。
tests/test_visibility.py:38
Class
TestCalculateDirectRate
direct_rate = base_rate * exp(-distance/10000),下限 5 Mbps。
tests/test_rate_calc.py:51
Class
TestCalculateInterSatelliteRate
激光 ISL 模型:速率由功率/口径/发散角与距离决定,视线遮挡时速率为 0。
tests/test_rate_calc.py:197
Class
TestCalculateMultiHopRelayRate
multi_hop_relay_rate = min(rate1, rate2, rate3),无全局下限(由各段决定)。
tests/test_rate_calc.py:252
Class
TestCalculateRelayRate
relay_rate = min(rate1, rate2),下限 5 Mbps。
tests/test_rate_calc.py:138
Class
TestCentralAngleBatchPerf
大圆地心角批量计算性能基准(模拟星座覆盖评估)。
tests/test_perf_benchmarks.py:225
Class
TestCheckGeoVisibility
LEO-GEO 中继可见性:angle < 80° 阈值的各边界场景。
tests/test_visibility.py:235
Class
TestCheckVisibility
仰角可见性计算:包含正上方边界、阈值边界与常规场景。
tests/test_visibility.py:113
Class
TestCleanupExpiredInvariant
cleanup_expired 后,time_pool 中不应存在 end <= current_time 的槽。
tests/test_scheduler_properties.py:285
Class
TestConcurrentErrorPaths
并发触发错误路径 —— 确保 RLock 覆盖错误流。
tests/test_concurrency.py:261
Class
TestConcurrentSubmitCounting
多线程并发提交 —— 计数器自洽验证。
tests/test_concurrency.py:133
Class
TestContentTaskDataTypesConfig
验证 ContentTask 读取 DATA_TYPES 时 beta 与 base_value 与配置一致。
tests/test_content_value.py:148
Class
TestContentTaskFallbackTypes
验证不在 DATA_TYPES 中的类型使用 params 字典兜底。
tests/test_content_value.py:177
Class
TestCreateEngine
工厂函数与引擎基本属性验证。
tests/test_core.py:67
Class
TestDataCombinationsEndpoint
数据组合信息接口契约。
tests/test_api_integration.py:528
Class
TestDataEndpoint
仿真数据接口契约。
tests/test_api_integration.py:108
Class
TestDataEndpoint
仿真数据接口基本契约。
tests/test_api.py:115
Class
TestDataSizeToMb
_data_size_to_mb 的 KB/MB/GB 单位换算正确性。
tests/test_core.py:158
Class
TestDataTypesConfig
DATA_TYPES 全局配置的完整性与一致性校验。
tests/test_core.py:370
Class
TestDirectRatePerf
直连链路速率计算性能基准。
tests/test_perf_benchmarks.py:155
Class
TestEngineStatsConsistencyInvariant
SimulationEngine 的 accepted/rejected 统计计数与实际列表长度一致。
tests/test_scheduler_properties.py:334
Class
TestEstimateTransmissionTime
_estimate_transmission_time:(size_mb * 8) / rate_mbps,rate<=0 返回 inf。
tests/test_rate_calc.py:312
Class
TestEvaluateRequest
_evaluate_request 的核心决策逻辑。
tests/test_core.py:198
Class
TestGetDynamicValueBasic
get_dynamic_value 基础契约。
tests/test_content_value.py:37
Class
TestGetDynamicValueNumerics
与公式 base_value * exp(-beta * dt) 精确对齐。
tests/test_content_value.py:77
Class
TestGetStats
get_stats 返回结构完整性。
tests/test_core.py:341
Class
TestGoldenBaseline
验证黄金基准 JSON 可正确加载且数据完整。
tests/test_orbital.py:249
Class
TestGoldenScenarios
黄金场景回归测试套件。 每个 test_ 方法对应一个确定性场景,通过固定种子 + 手动时间步进保证可复现, 断言结果与 golden/scenario_snapshots.json 中的黄金快照逐字段一致。
tests/test_regression_golden.py:342
Class
TestHealthEndpoint
健康检查接口契约。
tests/test_api_integration.py:77
Class
TestHealthEndpoint
健康检查接口基本契约。
tests/test_api.py:87
Class
TestHighConcurrency
更高线程数/更多请求的压力场景。
tests/test_concurrency.py:233
Class
TestHighDecayRate
CONTROL 类型 beta=0.5 下的快速衰减场景。
tests/test_content_value.py:216
Class
TestHighUtilizationBehavior
验证资源紧张(高占用)下引擎行为符合预期。
tests/load/test_stress_engine.py:415
Class
TestIntegrationCentralAngleVisibility
通过已知地心角推算期望的 check_visibility 结果,验证两函数数值一致。
tests/test_visibility.py:307
Class
TestJ2RateConstants
验证物理常量与 J2 速率函数结果量级。
tests/test_j2_perturbation.py:92
Class
TestJ2Switch
j2_perturbation 开关:True 启用摄动,False 退化为纯二体。
tests/test_j2_perturbation.py:177
Class
TestLivenessProbe
存活探针契约。
tests/test_api.py:209
Class
TestMeanMotion
get_mean_motion:n = √(μ/a³)
tests/test_orbital.py:110
Class
TestMultiHopRatePerf
多跳中继链路速率计算性能基准。
tests/test_perf_benchmarks.py:196
Class
TestNoUncaughtExceptions
批量提交不同规模的请求,引擎不得抛出未处理异常。
tests/load/test_stress_engine.py:152
Class
TestOpenApiEndpoint
OpenAPI 规范接口契约。
tests/test_api_integration.py:629
Class
TestOpportunisticStationsEndpoint
随遇接入站接口契约。
tests/test_api_integration.py:502
Class
TestOrbitalPeriod
get_orbital_period:T = 2π√(a³/μ)
tests/test_orbital.py:79
Class
TestProbeEndpoints
存活/就绪探针接口契约。
tests/test_api_integration.py:596
Class
TestPropagateISSLike
propagate:t=0 / t=T/4 / t=T 三个时间点。
tests/test_orbital.py:135
next →
1–100 of 156, ranked by callers