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
Method
_relay_can_carry_request
(self, relay_id, required_rate, req)
backend/core.py:1183
Method
_release_time_slot
(self, req_id)
backend/core.py:810
Method
_reserve_time_slot
(self, resource_type, resource_id, start_time, end_time, req_id, bandwidth=0)
backend/core.py:807
Function
_reset_rate_limiter
Clear the global sliding-window rate limiter before every test.
tests/test_api_errors.py:42
Method
_resource_busy_by_other
(self, resource_type, resource_id, req_id)
backend/core.py:1177
Method
_simulation_loop
仿真主循环
backend/core.py:586
Function
_snapshot_loop
Background thread: periodically publishes a full situation snapshot. ``engine_ref_getter`` is a zero-argument callable that returns the
backend/stream.py:84
Function
_startLinkAnimation
* 启动链路流动动画循环。 * 通过持续调用 requestRender 驱动 Cesium 在 requestRenderMode 下不断重绘, * 同时利用 PolylineGlowMaterialProperty 的自发光效果模拟数据流动感。 * 每帧递增 _li
frontend/app.js:880
Function
_startPolling
* 启动 2 秒轮询回退(在 SSE 不可用时使用)。
frontend/app.js:461
Function
_stopLinkAnimation
* 停止链路流动动画循环(当无活跃传输链路时调用)。
frontend/app.js:931
Function
_submit_batch
顺序提交一批请求,收集所有返回结果。
tests/load/test_stress_engine.py:98
Function
_submit_n
在一个线程中提交 n 次请求,收集结果或异常。
tests/test_concurrency.py:51
Method
_validate_time_window
⭐ 新增:校验时间窗口是否满足传输需求
backend/core.py:1377
Function
activateScenario
(name)
frontend/app.js:1312
Function
activeRequestsForScene
()
frontend/app.js:147
Method
active_beam_count
当前活跃波束数。
backend/comms/beam_pointing.py:359
Function
add_api_headers
(response)
backend/api.py:90
Method
allocate
分配��个活跃波束槽位,更新当前指向。 Parameters ---------- beam_key : str 波束唯一标识(如请求 ID 或 ``"<station>-<target>"``)。 azimu
backend/comms/beam_pointing.py:480
Method
antipodal
()
tests/test_perf_benchmarks.py:247
Function
apiUrl
(path)
frontend/app.js:311
Function
applyReqFilters
()
frontend/app.js:515
Method
as_dict
(self)
backend/config.py:157
Function
auth_login
账号密码登录,签发 access/refresh JWT。
backend/api.py:1516
Function
auth_refresh
用 refresh token 换取新的 access token。
backend/api.py:1532
Method
available_beam_slots
剩余可用波束槽位数。
backend/comms/beam_pointing.py:365
Method
bad_worker
()
tests/test_concurrency.py:324
Method
baseUrl
Current base URL (without trailing slash).
frontend/src/api/client.ts:75
Function
beforeUnmount
()
frontend/app.js:256
Function
bench_engine
不启动后台线程的固定种子引擎,模块作用域,避免重复初始化开销。
tests/test_perf_benchmarks.py:97
Function
bench_geo2_pos
第二个 GEO 中继星位置(多跳链路使用)。
tests/test_perf_benchmarks.py:91
Function
bench_geo_pos
固定 GEO 中继星位置。
tests/test_perf_benchmarks.py:85
Function
bench_gs_ka
Ka 天线地面站。
tests/test_perf_benchmarks.py:73
Function
bench_gs_x
X 天线地面站。
tests/test_perf_benchmarks.py:79
Function
bench_sat_pos
固定卫星位置(lat/lon/alt)。
tests/test_perf_benchmarks.py:67
Function
build_raw_image_engine
场景 2:RAW_IMAGE 仅直连场景引擎。 RAW_IMAGE 的 allowed_links=["direct"],中继路径必须被忽略。 本场景验证提交后的 transmission_method 仅为 "direct" 或请求处于等待(无链路时)。
tests/fixtures/scenarios.py:88
Function
build_relay_exhausted_engine
场景 3:中继带宽耗尽场景引擎。 预先手动填满 GEO 中继的带宽占用,使后续低优先级请求因 BANDWIDTH_EXCEEDED 被拒绝。
tests/fixtures/scenarios.py:97
Function
build_task_cmd_engine
场景 1:TASK_CMD 立即接受场景引擎。 TASK_CMD 属于 immediate=True 类型,_evaluate_request 会直接返回 (True, "指令类型立即接受")。 本场景验证无需任何链路可见、立即进入 accepted 状态。
tests/fixtures/scenarios.py:79
Function
build_timeout_engine
场景 4:等待超时场景引擎。 创建引擎后推进超过 max_delay 的时间,使 accepted 状态的请求触发 TIMEOUT_WAIT 拒绝。 本场景通过极短的 max_delay 快速触发超时。
tests/fixtures/scenarios.py:120
Method
burst_submit
高频提交 TASK_CMD 请求,制造峰值并发压力。
tests/load/locustfile.py:157
Method
can_use_ground_station
(gs_id)
backend/scheduling/strategy.py:36
Method
can_use_ground_station
(gs_id)
backend/scheduling/qos.py:311
Method
can_use_satellite
()
backend/scheduling/strategy.py:33
Method
can_use_satellite
()
backend/scheduling/qos.py:306
Method
check
校验对目标 (azimuth, elevation) 的波束指向请求。 Parameters ---------- azimuth_deg : float 目标方位角(度),相对天线法线方向。 elevatio
backend/comms/beam_pointing.py:372
Method
check_health
轮询健康检查接口,监控系统在高负载下的响应能力。
tests/load/locustfile.py:125
Method
check_resource_utilization
轮询资源利用率接口,采集基线数据。
tests/load/locustfile.py:143
Method
check_system_info
轮询系统信息接口,监控统计计数。
tests/load/locustfile.py:138
Function
client
将干净引擎注入 api.app,返回 Flask test_client。 通过替换 api.simulation_engine 避免全局状态污染;测试结束后恢复原始引擎。
tests/test_api_integration.py:47
Function
client
将干净引擎注入 api.app,返回 Flask test_client。 测试结束后恢复原始引擎,避免全局状态污染。
tests/test_api.py:47
Function
compareMetricClass
(delta)
frontend/app.js:1381
Function
computeCoverageRadius
* 根据卫星/中继高度和最小仰角计算地面覆盖半径(米)。 * * 几何关系(球形地球): * R_E — 地球半径 6371 km * h — 卫星高度(米) * ε — 最小仰角(度) * * 天底
frontend/app.js:1088
Method
constructor
( message: string, public readonly status?: number, public readonly isTimeout = false, )
frontend/src/api/client.ts:51
Method
constructor
(baseUrl?: string, defaultTimeoutMs = DEFAULT_TIMEOUT_MS)
frontend/src/api/client.ts:69
Function
data
()
frontend/app.js:31
Function
dataTypeOptions
()
frontend/app.js:172
Function
decorator
(fn)
backend/ratelimit.py:52
Function
decorator
(fn)
backend/rbac.py:25
Function
deleteScenario
(name)
frontend/app.js:1340
Function
destroyViewer
()
frontend/src/composables/use-cesium-scene.ts:462
Function
drawLink
* @deprecated 由 upsertLink 取代,保留仅供外部可能调用的场景兼容。 * 直接新建一个 polyline 实体(不索引,不复用)。
frontend/app.js:955
Function
drawRequestLinks
* @deprecated 由 updateRequestLinks 取代。
frontend/app.js:971
Function
engine
()
tests/test_store.py:15
Method
engine
(self)
tests/test_rate_calc.py:316
Function
engine_no_threads
使用固定种子、不启动后台线程的引擎,适合纯功能单测。
tests/conftest.py:40
Function
engine_seeded
与 engine_no_threads 相同,但以工厂默认参数创建,供需要两个独立实例的测试使用。
tests/conftest.py:49
Function
err
(code, message=None, http_status=None, details=None)
backend/envelope.py:39
Function
exportScenario
(format: 'json' | 'yaml' = 'json')
frontend/src/api/endpoints.ts:176
Function
extract_request_snapshot
从请求字典中提取黄金快照所需的字段子集(排除时间戳等易变字段)。 Args: req_dict: TransmissionRequest.to_dict() 的返回值 Returns: 包含核心稳定字段的字典,用于黄金比对
tests/fixtures/scenarios.py:129
Function
extract_stats_snapshot
从引擎统计中提取黄金快照所需的计数字段(排除浮点利用率等非确定字段)。 Args: stats: engine.stats 字典 Returns: 包含请求计数的稳定字典,用于黄金比对
tests/fixtures/scenarios.py:147
Function
favicon
返回空favicon避免404错误
backend/api.py:1626
Function
fetchCurrentScenario
()
frontend/src/api/endpoints.ts:154
Function
fetchJson
(path, options = {})
frontend/app.js:315
Function
fetchSnapshotAt
(t: number)
frontend/src/api/endpoints.ts:144
Function
flask_client
注入干净引擎(seed=0, autostart=False)的 Flask test_client。 替换 api.simulation_engine 后在函数作用域内运行测试,测试结束后恢复原始引擎, 保证测试间无状态污染。适合 API 集成测试中只需 client、不需直接操
tests/conftest.py:59
Function
flask_client_engine
与 flask_client 相同,但同时暴露底层引擎,供需要断言引擎内部状态的测试使用。 Yields: (client, engine): Flask test_client 与对应的 SimulationEngine 实例。
tests/conftest.py:119
Method
forget
(self, req_id)
backend/scheduling/handover.py:28
Function
formatDuration
(seconds)
frontend/app.js:1448
Function
formatMetricValue
(value)
frontend/app.js:1388
Function
formatProgress
(progress)
frontend/app.js:1455
Function
formatTime
(seconds)
frontend/app.js:1460
Method
from_dict
(cls, d: dict)
backend/models.py:23
Method
from_dict
(cls, d: dict)
backend/models.py:63
Method
from_json
从 JSON 字符串反序列化场景字典。
backend/scenario.py:218
Method
from_tle
由 TLE 两行根数创建传播器;若 sgp4 不可用则需提供 orbital_elements 回退。
backend/physics/propagator.py:293
Function
frontend_assets
(filename)
backend/api.py:1511
Function
frontend_index
()
backend/api.py:1506
Function
ganttBarClass
(evt)
frontend/app.js:1429
Function
ganttBarStyle
(evt)
frontend/app.js:1422
Function
ganttBarTooltip
(evt)
frontend/app.js:1433
Function
ganttGroups
()
frontend/app.js:214
Function
ganttHover
(evt)
frontend/app.js:1440
Function
ganttLeave
()
frontend/app.js:1444
Function
ganttRangeSpan
()
frontend/app.js:199
Function
ganttTimeRange
()
frontend/app.js:193
Function
ganttTimeTicks
()
frontend/app.js:203
Function
ganttToPct
* 将仿真时刻转换为时间轴上的百分比位置。
frontend/app.js:1416
Function
geoRelayCount
()
frontend/app.js:168
Function
geoRelays
()
frontend/app.js:130
Function
get_all_requests_with_background
获取所有请求(包括背景任务)- 用于资源时间线可视化
backend/api.py:274
Function
get_all_transmission_requests
获取所有用户传输请求(不包括背景任务)
backend/api.py:178
← previous
next →
401–500 of 1,201, ranked by callers