Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tong89/smartNode
/ functions
Functions
1,201 in github.com/Tong89/smartNode
⨍
Functions
1,201
◇
Types & classes
156
↳
Endpoints
53
Function
scenario_compare
对比两个命名场景的决策指标,返回差值分析报告。 查询参数: ``a=<场景名称A>``(必填) ``b=<场景名称B>``(必填) 响应示例:: {"code": 0, "data": { "scenario_
backend/api.py:1118
Function
scenario_current
返回当前内存中保存的场景(若有);否则返回空。
backend/api.py:1014
Function
scenario_engine
固定 seed=42 的场景引擎夹具(用于回归测试)。 - 使用与黄金快照生成时相同的参数(seed=42, gs=5, leo=4) - 不启动后台线程,可通过手动步进推进仿真时间 - 每次请求前重置 TransmissionRequest ID 计数器保证可复现性
tests/conftest.py:80
Function
scenario_export
导出最近一次保存的场景为 JSON 或 YAML 文件。 查询参数:``format=json``(默认)或 ``format=yaml``
backend/api.py:924
Function
scenario_import
从上传的 JSON 或 YAML 文本导入场景并立即还原到引擎。 Content-Type: application/json → JSON 解析 Content-Type: application/x-yaml 或其他 → YAML 解析 同时接受 multipart
backend/api.py:961
Function
scenario_load
将最近一次保存的内存场景恢复到仿真引擎。 引擎的地面站数量和 LEO 卫星数量将被调整为场景记录值。
backend/api.py:906
Function
scenario_save
将当前仿真资源配置保存为场景对象并驻留内存。 可选 JSON 体:``{"name": "我的场景"}``
backend/api.py:886
Function
scenarios_activate
将场景库中指定场景的资源配置应用到仿真引擎(切换场景)。
backend/api.py:1088
Function
scenarios_delete
删除场景库中指定名称的场景。
backend/api.py:1073
Function
scenarios_list
列出场景库中全部命名场景的摘要(不含完整统计)。 响应示例:: {"code": 0, "data": [ {"id": 1, "name": "基准", "saved_at": "2024-...", "is_baseline": true,
backend/api.py:1024
Function
scenarios_save
将当前仿真资源配置与运行统计快照保存到场景库(按名称 upsert)。 请求体(JSON):: {"name": "场景名称"} # name 必填,最长 128 字符 响应返回完整场景记录。
backend/api.py:1046
Function
scenarios_set_baseline
将指定场景设为基线(用于对比参考)。
backend/api.py:1105
Function
seeded_engine
提供固定种子、不启动后台线程的引擎夹具(供外部测试复用)���
tests/test_regression_golden.py:529
Method
select
返回 {method, ground_station, relay, relay2, rate} 或 None。
backend/scheduling/strategy.py:14
Method
select
(self, scheduler, req, satellite, sat_pos)
backend/scheduling/strategy.py:24
Function
sendRequest
* Submit a new transmission request via the typed API client. * Returns the result object from the backend.
frontend/src/stores/simulation.ts:302
Function
sendUpdateGroundStations
* Update the ground-station pool size.
frontend/src/stores/simulation.ts:309
Function
sendUpdateLeoSatellites
* Update the LEO satellite constellation size.
frontend/src/stores/simulation.ts:316
Function
setApiBase
Update the API base URL and immediately refresh all data.
frontend/src/stores/simulation.ts:292
Function
setBaseline
(name)
frontend/app.js:1328
Function
setNotice
(message, type = 'success')
frontend/app.js:1271
Function
setNotice
* Show a toast-style notice message that auto-clears after 4.2 seconds. * Calling this again before the timer fires resets the timer.
frontend/src/stores/ui.ts:35
Function
setSpeed
Select a new playback speed multiplier.
frontend/src/composables/use-playback.ts:140
Function
setView
(view)
frontend/app.js:291
Function
setView
Switch the active panel view.
frontend/src/stores/ui.ts:27
Method
setup_client
(self, engine)
tests/test_store.py:188
Function
snapshot_export
将内存中的快照以 JSON 文件形式下载。
backend/api.py:1355
Function
snapshot_import
从上传的 JSON 文件导入快照并立即恢复仿真状态。 Content-Type: application/json → JSON 解析 同时接受 multipart/form-data 中的 ``file`` 字段(前端文件上传)。
backend/api.py:1377
Function
snapshot_load
将最���一次保存的快照恢复到仿真引擎,进入回放模式。 回放模式下主仿真循环暂停,/api/data 返回快照时刻的态势数据。 调用 /api/snapshot/resume 可退出回放模式,重启仿真。
backend/api.py:1301
Function
snapshot_resume
退出回放模式,重启主仿真循环。
backend/api.py:1322
Function
snapshot_save
拍摄当前仿真状态快照并保存至内存。 可选 JSON 体:``{"label": "回放点A"}`` 返回快照摘要(不含完整请求列��以减小响应体积)。
backend/api.py:1268
Function
snapshot_status
返回当前快照与回放状态摘要。
backend/api.py:1332
Function
sse_stream_endpoint
SSE 实时推送端点(GET /api/v1/stream)。 以 ``text/event-stream`` 格式持续推送两类 SSE 事件: * ``snapshot`` – 每 2 秒推送一次完整态势快照(卫星位置、资源、请求列表) * ``event``
backend/api.py:690
Function
sso_orbit
太阳同步轨道(高度 700 km,倾角 97.4°,圆轨道)。
tests/test_j2_perturbation.py:37
Function
startPolling
* Start background polling. Safe to call multiple times — creates at most * one timer. Performs an immediate refresh before starting the interval.
frontend/src/stores/simulation.ts:270
Function
stats
()
frontend/app.js:114
Method
status
返回当前波束状态摘要。
backend/comms/beam_pointing.py:561
Function
stepped_engine
已推进 60 秒仿真时间的引擎实例(建立初始状态)。
tests/load/test_stress_engine.py:85
Function
stopPolling
Stop background polling and clear the timer.
frontend/src/stores/simulation.ts:284
Function
store
每次测试使用独立的内存 SQLite 场景库。
tests/test_store.py:22
Function
submitRequest
()
frontend/app.js:1207
Function
submitRequest
(payload: TransmissionRequestPayload)
frontend/src/api/endpoints.ts:113
Method
submit_fixed_request
高权重:提交固定类型(TASK_CMD/高优先级)的请求。
tests/load/locustfile.py:80
Method
submit_low_priority_request
低权重:提交低优先级请求,压力测试下预期会被拒绝。
tests/load/locustfile.py:110
Method
submit_random_request
中权重:提交随机类型请求,覆盖多种数据类型。
tests/load/locustfile.py:95
Function
submit_transmission_request
提交传输请求
backend/api.py:153
Function
swagger_docs
Swagger UI 文档站。
backend/api.py:1638
Function
syncLive
()
frontend/src/composables/use-playback.ts:147
Function
syncResourceForm
()
frontend/app.js:529
Function
systemTime
()
frontend/app.js:110
Function
t
* Resolve a dot-separated key path against the active locale's messages. * Falls back to `zh` if the key is missing in the current locale. * Returns
frontend/src/i18n/index.ts:67
Method
test_above_max_count_returns_400
(self, flask_client)
tests/test_api_errors.py:122
Method
test_above_max_has_validation_error_code
(self, flask_client)
tests/test_api_errors.py:126
Method
test_accepted_and_rejected_fields_present
(self, client)
tests/test_api.py:198
Method
test_accepted_count_matches_list_after_accepts
每次提交 N 个合法请求,accepted + rejected 之和等于 total_requests 增量。 每个 hypothesis 样本使用新引擎,避免跨样本状态积累导致计数偏差。
tests/test_scheduler_properties.py:365
Method
test_accepted_plus_rejected_equals_user_requests
(self, isolated_engine)
tests/test_concurrency.py:104
Method
test_accepted_plus_rejected_le_total_concurrent
accepted + rejected ≤ total(不含进行中的传输)。
tests/test_concurrency.py:214
Method
test_activate
(self)
tests/test_store.py:274
Method
test_all_data_types_no_exception
所有数据类型各提交 20 次,无任何异常。
tests/load/test_stress_engine.py:171
Method
test_all_entries_have_name
(self)
tests/test_core.py:376
Method
test_all_entries_have_size_range
(self)
tests/test_core.py:380
Method
test_all_results_returned
每次 submit_request 都应返回结果(不会静默丢失)。
tests/test_concurrency.py:149
Method
test_all_threads_complete
所有线程均能在超时前完成(无死锁)。
tests/test_concurrency.py:249
Method
test_altitude_always_positive
在若干时间步长上,高度始终为正(卫星未进入大气层)。
tests/test_orbital.py:200
Method
test_altitude_consistent_circular
圆轨道各时刻高度应在合理范围内(WGS-84 椭球导致极点高度略高于赤道,偏差 < 25000 m)。
tests/test_orbital.py:233
Method
test_altitude_does_not_affect_result
check_geo_visibility 仅依赖地心角(纬经度),高度字段不影响结果。
tests/test_visibility.py:268
Method
test_angle_79_visible
赤道上地心角 = 79° < 80°,应可见。
tests/test_visibility.py:244
Method
test_angle_81_not_visible
赤道上地心角 = 81° > 80°,不应可见。
tests/test_visibility.py:250
Method
test_angle_90_not_visible
赤道上地心角 = 90° 远超 80°,不可见。
tests/test_visibility.py:256
Method
test_antipodal_equator
对跖点(赤道 0° 与 180°),地心角 = 180°。
tests/test_visibility.py:49
Method
test_antipodal_not_visible
对跖点(角度 = 180°),不可见。
tests/test_visibility.py:262
Function
test_append_only_and_query
()
tests/test_event_log.py:5
Method
test_arg_perigee_rate_critical_inclination
临界倾角 63.4° ��近地点幅角进动速率应接近 0(2 - 5/2 sin²i = 0)。
tests/test_j2_perturbation.py:125
Method
test_at_creation_time_equals_base_value
t=creation_time 时,价值等于 base_value(dt=0,exp(0)=1)。
tests/test_content_value.py:40
Method
test_autostart_false_not_running
(self)
tests/test_core.py:74
Function
test_background_task_data_types_have_size_range
()
tests/test_core_correctness.py:52
Method
test_bandwidth_exceeded_returns_conflict
已有槽占用 base_used 带宽,再查询 extra 使总量超上限时,check 返回 False。 注意:ResourceManager 的带宽冲突检测仅在存在重叠槽时触发(循环遍历), 因此本测试确保 pool 中至少有一个已预约槽(base_used >=
tests/test_scheduler_properties.py:224
Method
test_bandwidth_within_limit_is_available
空池中查询带宽 < 上限时,check 返回可用。
tests/test_scheduler_properties.py:249
Method
test_base_types_contain_known_types
(self, client)
tests/test_api_integration.py:547
Method
test_base_value_matches_data_types_config
ContentTask 的 base_value 应与 DATA_TYPES[data_type]['base_value'] 一致。
tests/test_content_value.py:159
Method
test_basic_ka_returns_positive
Ka 天线卫星在近距离应返回正速率。
tests/test_rate_calc.py:54
Method
test_basic_multi_hop_positive
标准配置下多跳中继应返回正速率。
tests/test_rate_calc.py:255
Method
test_basic_relay_positive
基本中继链路应返回正速率。
tests/test_rate_calc.py:141
Method
test_basic_x_returns_positive
X 天线卫星在近距离应返回正速率。
tests/test_rate_calc.py:61
Method
test_batch_1000
1000 次地心角计算的吞吐量。
tests/test_perf_benchmarks.py:240
Method
test_batch_antipodal
对跖点(最大地心角 180°)边界情形。
tests/test_perf_benchmarks.py:245
Method
test_batch_same_point
同一点(地心角应为 0)边界情形。
tests/test_perf_benchmarks.py:252
Method
test_below_min_count_returns_400
(self, flask_client)
tests/test_api_errors.py:118
Method
test_below_min_count_returns_400
(self, flask_client)
tests/test_api_errors.py:186
Method
test_beta_matches_data_types_config
ContentTask 的 beta 应与 DATA_TYPES[data_type]['beta'] 一致。
tests/test_content_value.py:152
Method
test_bool_count_returns_400
bool 是 int 的子类,但业务上应被拒绝。
tests/test_api_errors.py:109
Method
test_bool_count_returns_400
(self, flask_client)
tests/test_api_errors.py:182
Method
test_bottleneck_is_min_of_two_legs
中继速率受限于两段链路中较慢的一段(瓶颈逻辑)。
tests/test_rate_calc.py:169
Method
test_bottleneck_three_legs
多跳速率不超过任何单段的速率(三段瓶颈约束)。
tests/test_rate_calc.py:274
Method
test_compare_basic
(self, engine, store)
tests/test_store.py:118
Method
test_compare_endpoint
(self)
tests/test_store.py:242
Method
test_compare_missing_a
(self, engine, store)
tests/test_store.py:154
Method
test_compare_missing_b
(self, engine, store)
tests/test_store.py:159
Method
test_compare_missing_params
(self)
tests/test_store.py:253
Method
test_compare_not_found
(self)
tests/test_store.py:257
← previous
next →
601–700 of 1,201, ranked by callers