add ensp14ing
This commit is contained in:
parent
ab983a5e14
commit
41d0a925de
|
|
@ -0,0 +1,21 @@
|
|||
# ensping
|
||||
### 1、项目说明
|
||||
总体思路:网络协议仿真项目开发的总体思路如图1.1示意,网络协议仿真项目拟实现一个仿真系统,具体功能描述:(1)能够仿真主机和路由器上各种数据包的产生、分解(将一个数据包拆分成多个数据包)、封包(将地址等信息与数据包封装成一个新的数据包)、解包(将接收的数据包解析并提取出地址等相关信息)等数据传输过程,进而理解一个数据包是如何经网络由一台主机传输到另一台主机。(2)能够支持用户交互地进行各层(应用层、传输层、网络层、链路层、物理层)封包与解包操作,并由系统自动判断用户封包与解包操作的正确性。(3)能够完整地实现由一台主机经五层协议变换发送一个完整数据,再经由多个路由器三层协议正向变换与逆向变换,最终到达目的主机以及目的主机经五层协议逆向变换正确解析出完整数据的全过程。
|
||||
图1.1 项目开发的总体思路图
|
||||
<img src="figs/overall.png" width=80% /></center>
|
||||
|
||||
|
||||
### 2、开发环境说明
|
||||
(1)系统版本:OpenHarmony 4.0 Release
|
||||
(2)SDK版本:API 10
|
||||
(3)Model类型:Stage
|
||||
(4)DevEco Studio版本:Deveco Studio 4.0 release
|
||||
(5)硬件环境:Unionpi Whale、RK3566开发板
|
||||
(6)预览器参数:(1)DeviceType:default;(2)Resolution:560-1280;(3)DPI:240;其余参数自定。
|
||||
### 3、项目主要函数调用关系图与项目输出界面演进图
|
||||
图3.1 项目主要函数调用关系图
|
||||
<img src="figs/relation.png" width=80% /></center>
|
||||
|
||||
|
||||
图3.2 项目输出界面演进图
|
||||
<img src="figs/evolution.png" width=80% /></center>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
ColumnLimit: 120
|
||||
SortIncludes: CaseSensitive
|
||||
TabWidth: 4
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
AccessModifierOffset: -4
|
||||
ContinuationIndentWidth: 4
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentGotoLabels: true
|
||||
IndentWrappedFunctionNames: false
|
||||
SortUsingDeclarations: false
|
||||
NamespaceIndentation: None
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
AlignTrailingComments: true
|
||||
AlignAfterOpenBracket: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
InsertBraces: false
|
||||
IndentExternBlock: NoIndent
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
ReflowComments: true
|
||||
MaxEmptyLinesToKeep: 2
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"compileSdkVersion":10,"hvigorVersion":"5.17.6","toolChainsVersion":"4.0.10.16"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"basePath":"E:\\jiaocai\\ensp14\\.hvigor\\dependencyMap\\dependencyMap.json5","rootDependency":"./oh-package.json5","dependencyMap":{"entry":"./entry/oh-package.json5"},"modules":[{"name":"entry","srcPath":"..\\..\\..\\entry"}]}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"modelVersion":"5.0.5","license":"","devDependencies":{"@ohos/hypium":"1.0.11"},"author":"","name":"ensp_fourteen","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}}
|
||||
|
|
@ -0,0 +1,574 @@
|
|||
[2025-11-23T15:56:50.410] [DEBUG] debug-file - env: nodejsVersion=v18.20.1
|
||||
[2025-11-23T15:56:56.411] [DEBUG] debug-file - Hvigor init with startParameters:{
|
||||
hvigorfileTypeCheck: false,
|
||||
parallelExecution: true,
|
||||
incrementalExecution: true,
|
||||
printStackTrace: false,
|
||||
daemon: false,
|
||||
analyze: 0,
|
||||
logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' }
|
||||
}
|
||||
[2025-11-23T15:56:56.431] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.407] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: appTasks], plugins: [] } }
|
||||
[2025-11-23T15:57:25.623] [DEBUG] debug-file - Obtain build option for product 'default'in this build.
|
||||
[2025-11-23T15:57:25.618] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug.
|
||||
[2025-11-23T15:57:25.680] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.670] [DEBUG] debug-file - Project task initialization takes 24 ms
|
||||
[2025-11-23T15:57:25.699] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug
|
||||
[2025-11-23T15:57:25.706] [DEBUG] debug-file - Module entry task initialization takes 4 ms
|
||||
[2025-11-23T15:57:25.709] [DEBUG] debug-file - project has submodules:entry
|
||||
[2025-11-23T15:57:25.750] [DEBUG] debug-file - Configuration task cost before running: 29 s 354 ms
|
||||
[2025-11-23T15:57:25.752] [DEBUG] debug-file - Executing task :entry:clean
|
||||
[2025-11-23T15:57:25.755] [DEBUG] debug-file - entry : clean cost memory 0.22447967529296875
|
||||
[2025-11-23T15:57:25.637] [DEBUG] debug-file - Start recording SDK configuration permission data.
|
||||
[2025-11-23T15:56:50.412] [DEBUG] debug-file - env: hvigor-config.json5 content = {
|
||||
modelVersion: '5.0.5',
|
||||
dependencies: {},
|
||||
execution: {},
|
||||
logging: {},
|
||||
debugging: {}
|
||||
}
|
||||
[2025-11-23T15:56:56.413] [DEBUG] debug-file - Since current hvigor version 5.17.6 differs from last hvigor version
|
||||
undefined, delete file-cache.json and task-cache.json.
|
||||
[2025-11-23T15:57:25.772] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build.
|
||||
[2025-11-23T15:57:25.819] [DEBUG] debug-file - Create resident worker with id: 0.
|
||||
[2025-11-23T15:57:25.408] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: appTasks]
|
||||
[2025-11-23T15:57:25.625] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed.
|
||||
[2025-11-23T15:57:25.618] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'.
|
||||
[2025-11-23T15:57:25.686] [DEBUG] debug-file - hvigorfile, require result: { default: { system: [Function: hapTasks], plugins: [] } }
|
||||
[2025-11-23T15:57:25.671] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:57:25.699] [DEBUG] debug-file - Target 'default' config initialized
|
||||
[2025-11-23T15:57:25.707] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:57:25.710] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk
|
||||
[2025-11-23T15:57:25.753] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||
[2025-11-23T15:57:25.755] [DEBUG] debug-file - runTaskFromQueue task cost before running: 29 s 360 ms
|
||||
[2025-11-23T15:56:50.414] [DEBUG] debug-file - env: daemon=false
|
||||
[2025-11-23T15:57:25.644] [DEBUG] debug-file - The file does not exist. At D:\Huawei\OpenHarmony\10\10\previewer\common\resources\module.json
|
||||
[2025-11-23T15:56:56.414] [DEBUG] debug-file - Cache service initialization finished in 3 ms
|
||||
[2025-11-23T15:57:25.774] [DEBUG] debug-file - Obtain build option for module 'entry' target 'ohosTest'in this build.
|
||||
[2025-11-23T15:57:25.822] [DEBUG] debug-file - Create resident worker with id: 1.
|
||||
[2025-11-23T15:57:25.619] [DEBUG] debug-file - Product 'default' build option initialized
|
||||
[2025-11-23T15:57:25.686] [DEBUG] debug-file - hvigorfile, binding system plugins [Function: hapTasks]
|
||||
[2025-11-23T15:57:25.671] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.707] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.719] [DEBUG] debug-file - load to the disk finished
|
||||
[2025-11-23T15:57:25.700] [DEBUG] debug-file - Target 'ohosTest' config initialized
|
||||
[2025-11-23T15:57:25.756] [INFO] debug-file - Finished :entry:clean... after 3 ms
|
||||
[2025-11-23T15:56:50.414] [DEBUG] debug-file - no-daemon, use the parent process.execArgv --max-old-space-size=8192,--expose-gc
|
||||
[2025-11-23T15:57:25.645] [DEBUG] debug-file - Sdk init in 19 ms
|
||||
[2025-11-23T15:57:25.824] [DEBUG] debug-file - Current worker pool is stopped or closed.
|
||||
[2025-11-23T15:57:25.789] [DEBUG] debug-file - Since there is no instance or instance is terminated, create a new worker pool.
|
||||
[2025-11-23T15:57:25.619] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'.
|
||||
[2025-11-23T15:57:25.671] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.700] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized
|
||||
[2025-11-23T15:57:25.720] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:57:25.707] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:57:25.825] [DEBUG] debug-file - Clear worker 0.
|
||||
[2025-11-23T15:57:25.756] [DEBUG] debug-file - Executing task ::clean
|
||||
[2025-11-23T15:57:25.790] [DEBUG] debug-file - Worker pool is initialized with config: {
|
||||
minPoolNum: 2,
|
||||
maxPoolNum: undefined,
|
||||
maxCoreSize: undefined,
|
||||
cacheCapacity: undefined,
|
||||
cacheTtl: undefined
|
||||
}
|
||||
[2025-11-23T15:57:25.700] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized
|
||||
[2025-11-23T15:57:25.739] [DEBUG] debug-file - Module ensp14 Collected Dependency:
|
||||
[2025-11-23T15:57:25.825] [DEBUG] debug-file - Worker 0 has been cleared.
|
||||
[2025-11-23T15:57:25.756] [DEBUG] debug-file - clean: Worker pool is inactive.
|
||||
[2025-11-23T15:57:25.700] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
|
||||
[2025-11-23T15:57:25.739] [DEBUG] debug-file - Module ensp14's total dependency: 0
|
||||
[2025-11-23T15:57:25.825] [DEBUG] debug-file - Current idle worker size: 1.
|
||||
[2025-11-23T15:57:25.757] [DEBUG] debug-file - ensp14 : clean cost memory 0.0274200439453125
|
||||
[2025-11-23T15:57:25.701] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build.
|
||||
[2025-11-23T15:57:25.740] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:57:25.825] [DEBUG] debug-file - Current busy worker size: 0.
|
||||
[2025-11-23T15:57:25.757] [DEBUG] debug-file - runTaskFromQueue task cost before running: 29 s 361 ms
|
||||
[2025-11-23T15:57:25.741] [DEBUG] debug-file - Module entry Collected Dependency:
|
||||
[2025-11-23T15:57:25.825] [DEBUG] debug-file - Clear worker 1.
|
||||
[2025-11-23T15:57:25.757] [INFO] debug-file - Finished ::clean... after 1 ms
|
||||
[2025-11-23T15:57:25.741] [DEBUG] debug-file - Module entry's total dependency: 0
|
||||
[2025-11-23T15:57:25.834] [DEBUG] debug-file - Worker 1 has been cleared.
|
||||
[2025-11-23T15:57:25.757] [DEBUG] debug-file - Executing task :entry:init
|
||||
[2025-11-23T15:57:25.745] [DEBUG] debug-file - Configuration phase cost:29 s 324 ms
|
||||
[2025-11-23T15:57:25.834] [DEBUG] debug-file - Current idle worker size: 0.
|
||||
[2025-11-23T15:57:25.757] [DEBUG] debug-file - entry : init cost memory 0.0101470947265625
|
||||
[2025-11-23T15:57:25.835] [DEBUG] debug-file - Current busy worker size: 0.
|
||||
[2025-11-23T15:57:25.757] [DEBUG] debug-file - runTaskFromQueue task cost before running: 29 s 362 ms
|
||||
[2025-11-23T15:57:25.836] [DEBUG] debug-file - hvigor build process will be closed.
|
||||
[2025-11-23T15:57:25.758] [INFO] debug-file - Finished :entry:init... after 1 ms
|
||||
[2025-11-23T15:57:25.840] [DEBUG] debug-file - worker[1] exits with exit code 0.
|
||||
[2025-11-23T15:57:25.758] [DEBUG] debug-file - Executing task ::init
|
||||
[2025-11-23T15:57:25.840] [DEBUG] debug-file - worker[0] exits with exit code 0.
|
||||
[2025-11-23T15:57:25.758] [DEBUG] debug-file - ensp14 : init cost memory 0.0089263916015625
|
||||
[2025-11-23T15:57:25.840] [DEBUG] debug-file - Current worker pool is terminated.
|
||||
[2025-11-23T15:57:25.758] [DEBUG] debug-file - runTaskFromQueue task cost before running: 29 s 362 ms
|
||||
[2025-11-23T15:57:25.758] [INFO] debug-file - Finished ::init... after 1 ms
|
||||
[2025-11-23T15:57:54.119] [DEBUG] debug-file - env: nodejsVersion=v18.20.1
|
||||
[2025-11-23T15:57:54.278] [DEBUG] debug-file - env: daemon=true
|
||||
[2025-11-23T15:57:54.121] [DEBUG] debug-file - env: hvigor-config.json5 content = {
|
||||
modelVersion: '5.0.5',
|
||||
dependencies: {},
|
||||
execution: {},
|
||||
logging: {},
|
||||
debugging: {}
|
||||
}
|
||||
[2025-11-23T15:57:56.553] [DEBUG] debug-file - java daemon tryConnect failed Error: connect ECONNREFUSED 127.0.0.1:45050
|
||||
[2025-11-23T15:57:59.876] [DEBUG] debug-file - java daemon started at port 45050 pid 20456
|
||||
[2025-11-23T15:57:59.908] [DEBUG] debug-file - session manager: set active socket. socketId=vPQXs0zHP2bzyRCrAAAB
|
||||
[2025-11-23T15:57:59.972] [DEBUG] debug-file - watch worker: worker id should be larger than 0. Nothing will be sent to any worker thread.
|
||||
[2025-11-23T15:57:59.999] [DEBUG] debug-file - Hvigor init with startParameters:{
|
||||
hvigorfileTypeCheck: false,
|
||||
parallelExecution: true,
|
||||
incrementalExecution: true,
|
||||
printStackTrace: false,
|
||||
daemon: true,
|
||||
analyze: 0,
|
||||
logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' }
|
||||
}
|
||||
[2025-11-23T15:58:00.004] [DEBUG] debug-file - Cache service initialization finished in 2 ms
|
||||
[2025-11-23T15:58:00.042] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.688] [DEBUG] debug-file - hvigorfile, require result: { default: { plugins: [] } }
|
||||
[2025-11-23T15:58:01.689] [DEBUG] debug-file - hvigorfile, binding system plugins null
|
||||
[2025-11-23T15:58:01.876] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug.
|
||||
[2025-11-23T15:58:01.876] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'.
|
||||
[2025-11-23T15:58:01.877] [DEBUG] debug-file - Product 'default' build option initialized
|
||||
[2025-11-23T15:58:01.877] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'.
|
||||
[2025-11-23T15:58:01.880] [DEBUG] debug-file - Obtain build option for product 'default'in this build.
|
||||
[2025-11-23T15:58:01.883] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed.
|
||||
[2025-11-23T15:58:01.892] [DEBUG] debug-file - Start recording SDK configuration permission data.
|
||||
[2025-11-23T15:58:01.892] [DEBUG] debug-file - The file does not exist. At D:\Huawei\OpenHarmony\10\10\previewer\common\resources\module.json
|
||||
[2025-11-23T15:58:01.892] [DEBUG] debug-file - Sdk init in 8 ms
|
||||
[2025-11-23T15:58:01.909] [DEBUG] debug-file - Project task initialization takes 16 ms
|
||||
[2025-11-23T15:58:01.910] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:58:01.910] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.910] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.916] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.922] [DEBUG] debug-file - hvigorfile, require result: { default: { plugins: [] } }
|
||||
[2025-11-23T15:58:01.922] [DEBUG] debug-file - hvigorfile, binding system plugins null
|
||||
[2025-11-23T15:58:01.935] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug
|
||||
[2025-11-23T15:58:01.935] [DEBUG] debug-file - Target 'default' config initialized
|
||||
[2025-11-23T15:58:01.937] [DEBUG] debug-file - Target 'ohosTest' config initialized
|
||||
[2025-11-23T15:58:01.937] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized
|
||||
[2025-11-23T15:58:01.937] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized
|
||||
[2025-11-23T15:58:01.937] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
|
||||
[2025-11-23T15:58:01.938] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build.
|
||||
[2025-11-23T15:58:01.942] [DEBUG] debug-file - Module entry task initialization takes 4 ms
|
||||
[2025-11-23T15:58:01.943] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:58:01.943] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.943] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:01.960] [DEBUG] debug-file - hvigorfile, resolve hvigorfile dependencies in 15 ms
|
||||
[2025-11-23T15:58:01.961] [DEBUG] debug-file - project has submodules:entry
|
||||
[2025-11-23T15:58:01.963] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk
|
||||
[2025-11-23T15:58:01.969] [DEBUG] debug-file - load to the disk finished
|
||||
[2025-11-23T15:58:01.970] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:58:01.974] [DEBUG] debug-file - Module ensp14 Collected Dependency:
|
||||
[2025-11-23T15:58:01.974] [DEBUG] debug-file - Module ensp14's total dependency: 0
|
||||
[2025-11-23T15:58:01.974] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:58:01.976] [DEBUG] debug-file - Module entry Collected Dependency:
|
||||
[2025-11-23T15:58:01.976] [DEBUG] debug-file - Module entry's total dependency: 0
|
||||
[2025-11-23T15:58:01.980] [DEBUG] debug-file - Configuration phase cost:1 s 952 ms
|
||||
[2025-11-23T15:58:01.983] [DEBUG] debug-file - Configuration task cost before running: 2 s 8 ms
|
||||
[2025-11-23T15:58:01.984] [DEBUG] debug-file - Executing task :entry:init
|
||||
[2025-11-23T15:58:01.984] [DEBUG] debug-file - entry : init cost memory 0.01548004150390625
|
||||
[2025-11-23T15:58:01.984] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 9 ms
|
||||
[2025-11-23T15:58:01.984] [INFO] debug-file - Finished :entry:init... after 1 ms
|
||||
[2025-11-23T15:58:01.985] [DEBUG] debug-file - Executing task ::init
|
||||
[2025-11-23T15:58:01.985] [DEBUG] debug-file - ensp14 : init cost memory 0.01280975341796875
|
||||
[2025-11-23T15:58:01.985] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 10 ms
|
||||
[2025-11-23T15:58:01.985] [INFO] debug-file - Finished ::init... after 1 ms
|
||||
[2025-11-23T15:58:01.997] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build.
|
||||
[2025-11-23T15:58:02.000] [DEBUG] debug-file - Obtain build option for module 'entry' target 'ohosTest'in this build.
|
||||
[2025-11-23T15:58:02.004] [DEBUG] debug-file - Since there is no instance or instance is terminated, create a new worker pool.
|
||||
[2025-11-23T15:58:02.004] [DEBUG] debug-file - Worker pool is initialized with config: {
|
||||
minPoolNum: 2,
|
||||
maxPoolNum: undefined,
|
||||
maxCoreSize: undefined,
|
||||
cacheCapacity: undefined,
|
||||
cacheTtl: undefined
|
||||
}
|
||||
[2025-11-23T15:58:02.005] [DEBUG] debug-file - Create resident worker with id: 0.
|
||||
[2025-11-23T15:58:02.007] [DEBUG] debug-file - session manager: send message to worker process.
|
||||
[2025-11-23T15:58:02.007] [DEBUG] debug-file - session manager: send message to worker process.
|
||||
[2025-11-23T15:58:02.010] [DEBUG] debug-file - Create resident worker with id: 1.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Cleanup worker 0.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Worker 0 has been cleaned up.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Current idle worker size: 1.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Current resident worker size: 2.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Cleanup worker 1.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Worker 1 has been cleaned up.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Current idle worker size: 0.
|
||||
[2025-11-23T15:58:02.012] [DEBUG] debug-file - Current resident worker size: 2.
|
||||
[2025-11-23T15:58:02.013] [DEBUG] debug-file - hvigor build process will be closed.
|
||||
[2025-11-23T15:58:02.017] [DEBUG] debug-file - watch worker: worker id should be larger than 0. Nothing will be sent to any worker thread.
|
||||
[2025-11-23T15:58:02.017] [DEBUG] debug-file - watch worker: worker id should be larger than 0. Nothing will be sent to any worker thread.
|
||||
[2025-11-23T15:58:02.027] [DEBUG] debug-file - worker[0] exits with exit code 0.
|
||||
[2025-11-23T15:58:02.028] [DEBUG] debug-file - worker[1] exits with exit code 0.
|
||||
[2025-11-23T15:58:49.024] [DEBUG] debug-file - session manager: set active socket. socketId=BHgztvG5se-tAEEKAAAD
|
||||
[2025-11-23T15:58:49.054] [DEBUG] debug-file - watch worker: worker id should be larger than 0. Nothing will be sent to any worker thread.
|
||||
[2025-11-23T15:58:49.126] [DEBUG] debug-file - Hvigor init with startParameters:{
|
||||
hvigorfileTypeCheck: false,
|
||||
parallelExecution: true,
|
||||
incrementalExecution: true,
|
||||
printStackTrace: false,
|
||||
daemon: true,
|
||||
analyze: 0,
|
||||
logLevel: Level { level: 20000, levelStr: 'INFO', colour: 'green' }
|
||||
}
|
||||
[2025-11-23T15:58:49.132] [DEBUG] debug-file - Cache service initialization finished in 6 ms
|
||||
[2025-11-23T15:58:49.165] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.175] [DEBUG] debug-file - hvigorfile, require result: { default: { plugins: [] } }
|
||||
[2025-11-23T15:58:49.176] [DEBUG] debug-file - hvigorfile, binding system plugins null
|
||||
[2025-11-23T15:58:49.180] [DEBUG] debug-file - Start initialize project's product build option map with build mode debug.
|
||||
[2025-11-23T15:58:49.180] [DEBUG] debug-file - Picking option from product 'default' with build mode 'debug'.
|
||||
[2025-11-23T15:58:49.180] [DEBUG] debug-file - Product 'default' build option initialized
|
||||
[2025-11-23T15:58:49.180] [DEBUG] debug-file - End initialize project's product build option map with build mode 'debug'.
|
||||
[2025-11-23T15:58:49.181] [DEBUG] debug-file - Obtain build option for product 'default'in this build.
|
||||
[2025-11-23T15:58:49.183] [DEBUG] debug-file - No signingConfig found, initRemoteHspCache failed.
|
||||
[2025-11-23T15:58:49.187] [DEBUG] debug-file - Start recording SDK configuration permission data.
|
||||
[2025-11-23T15:58:49.187] [DEBUG] debug-file - The file does not exist. At D:\Huawei\OpenHarmony\10\10\previewer\common\resources\module.json
|
||||
[2025-11-23T15:58:49.187] [DEBUG] debug-file - Sdk init in 4 ms
|
||||
[2025-11-23T15:58:49.199] [DEBUG] debug-file - Project task initialization takes 12 ms
|
||||
[2025-11-23T15:58:49.199] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:58:49.199] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.199] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.204] [DEBUG] debug-file - hvigorfile, resolving E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.207] [DEBUG] debug-file - hvigorfile, require result: { default: { plugins: [] } }
|
||||
[2025-11-23T15:58:49.207] [DEBUG] debug-file - hvigorfile, binding system plugins null
|
||||
[2025-11-23T15:58:49.211] [DEBUG] debug-file - Start initialize module-target build option map, moduleName=entry, buildMode=debug
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - Target 'default' config initialized
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - Target 'ohosTest' config initialized
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - Module 'entry' target 'default' build option initialized
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - Module 'entry' target 'ohosTest' build option initialized
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - End initialize module-target build option map, moduleName=entry
|
||||
[2025-11-23T15:58:49.212] [DEBUG] debug-file - Obtain build option for module 'entry' target 'default'in this build.
|
||||
[2025-11-23T15:58:49.224] [DEBUG] debug-file - Module entry task initialization takes 2 ms
|
||||
[2025-11-23T15:58:49.224] [DEBUG] debug-file - hvigorfile, binding custom plugins []
|
||||
[2025-11-23T15:58:49.224] [DEBUG] debug-file - hvigorfile, no custom plugins were found in E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.224] [DEBUG] debug-file - hvigorfile, resolve finished E:\jiaocai\ensp14\entry\hvigorfile.ts
|
||||
[2025-11-23T15:58:49.244] [DEBUG] debug-file - hvigorfile, resolve hvigorfile dependencies in 20 ms
|
||||
[2025-11-23T15:58:49.249] [DEBUG] debug-file - project has submodules:entry
|
||||
[2025-11-23T15:58:49.255] [DEBUG] debug-file - start to load updatedOhPackageInfo to the disk
|
||||
[2025-11-23T15:58:49.268] [DEBUG] debug-file - load to the disk finished
|
||||
[2025-11-23T15:58:49.272] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:58:49.278] [DEBUG] debug-file - Module ensp14 Collected Dependency:
|
||||
[2025-11-23T15:58:49.278] [DEBUG] debug-file - Module ensp14's total dependency: 0
|
||||
[2025-11-23T15:58:49.278] [DEBUG] debug-file - Start to initialize dependency information.
|
||||
[2025-11-23T15:58:49.282] [DEBUG] debug-file - Module entry Collected Dependency:
|
||||
[2025-11-23T15:58:49.282] [DEBUG] debug-file - Module entry's total dependency: 0
|
||||
[2025-11-23T15:58:49.286] [DEBUG] debug-file - Configuration phase cost:137 ms
|
||||
[2025-11-23T15:58:49.292] [DEBUG] debug-file - Configuration task cost before running: 220 ms
|
||||
[2025-11-23T15:58:49.293] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.294] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.294] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.297] [DEBUG] debug-file - Executing task :entry:default@PreBuild
|
||||
[2025-11-23T15:58:49.300] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.301] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.301] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.648] [DEBUG] debug-file - current product is not Atomic service.
|
||||
[2025-11-23T15:58:49.649] [DEBUG] debug-file - Use tool [win32: JAVA_HOME, CLASSPATH]
|
||||
[
|
||||
{ JAVA_HOME: 'D:\\Program Files\\Huawei\\DevEco Studio\\jbr' },
|
||||
{ CLASSPATH: undefined }
|
||||
]
|
||||
[2025-11-23T15:58:49.649] [DEBUG] debug-file - Use tool [win32: NODE_HOME]
|
||||
[
|
||||
{
|
||||
NODE_HOME: 'D:\\Program Files\\Huawei\\DevEco Studio\\tools\\node'
|
||||
}
|
||||
]
|
||||
[2025-11-23T15:58:49.649] [DEBUG] debug-file - entry : default@PreBuild cost memory 14.41229248046875
|
||||
[2025-11-23T15:58:49.652] [DEBUG] debug-file - runTaskFromQueue task cost before running: 580 ms
|
||||
[2025-11-23T15:58:49.655] [INFO] debug-file - Finished :entry:default@PreBuild... after 355 ms
|
||||
[2025-11-23T15:58:49.656] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.656] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.657] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.661] [DEBUG] debug-file - Executing task :entry:default@CreateModuleInfo
|
||||
[2025-11-23T15:58:49.662] [DEBUG] debug-file - Task 'entry:default@CreateModuleInfo' cost while wrapping incremental declarations: 1 ms
|
||||
[2025-11-23T15:58:49.663] [DEBUG] debug-file - entry : default@CreateModuleInfo cost memory 0.0558624267578125
|
||||
[2025-11-23T15:58:49.663] [DEBUG] debug-file - runTaskFromQueue task cost before running: 591 ms
|
||||
[2025-11-23T15:58:49.663] [INFO] debug-file - Finished :entry:default@CreateModuleInfo... after 2 ms
|
||||
[2025-11-23T15:58:49.664] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.665] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.665] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.665] [DEBUG] debug-file - Executing task :entry:default@MergeProfile
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - Change app api release type with 'Release'
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - Change app compile API version with '4.0.10.16'
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - Change app target API version with '10'
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - Change app minimum API version with '9'
|
||||
[2025-11-23T15:58:49.666] [DEBUG] debug-file - Use cli appEnvironment
|
||||
[2025-11-23T15:58:49.676] [DEBUG] debug-file - Clean the ArkTS cache due to SDK version is changed.
|
||||
[2025-11-23T15:58:49.692] [DEBUG] debug-file - entry : default@MergeProfile cost memory 0.29676055908203125
|
||||
[2025-11-23T15:58:49.695] [DEBUG] debug-file - runTaskFromQueue task cost before running: 623 ms
|
||||
[2025-11-23T15:58:49.697] [INFO] debug-file - Finished :entry:default@MergeProfile... after 30 ms
|
||||
[2025-11-23T15:58:49.704] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.704] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.704] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.705] [DEBUG] debug-file - Executing task :entry:default@PreCheckSyscap
|
||||
[2025-11-23T15:58:49.706] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.706] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.706] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.706] [DEBUG] debug-file - entry : default@PreCheckSyscap cost memory 0.12535858154296875
|
||||
[2025-11-23T15:58:49.706] [DEBUG] debug-file - runTaskFromQueue task cost before running: 635 ms
|
||||
[2025-11-23T15:58:49.706] [INFO] debug-file - Finished :entry:default@PreCheckSyscap... after 2 ms
|
||||
[2025-11-23T15:58:49.708] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.708] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.708] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.717] [DEBUG] debug-file - Executing task :entry:default@GeneratePkgContextInfo
|
||||
[2025-11-23T15:58:49.717] [DEBUG] debug-file - Task 'entry:default@GeneratePkgContextInfo' cost while wrapping incremental declarations: 1 ms
|
||||
[2025-11-23T15:58:49.717] [DEBUG] debug-file - entry : default@GeneratePkgContextInfo cost memory 0.03743743896484375
|
||||
[2025-11-23T15:58:49.717] [DEBUG] debug-file - runTaskFromQueue task cost before running: 646 ms
|
||||
[2025-11-23T15:58:49.718] [INFO] debug-file - Finished :entry:default@GeneratePkgContextInfo... after 1 ms
|
||||
[2025-11-23T15:58:49.719] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.719] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.719] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.720] [DEBUG] debug-file - Executing task :entry:default@ProcessProfile
|
||||
[2025-11-23T15:58:49.721] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.721] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.721] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.723] [DEBUG] debug-file - [
|
||||
'D:\\Program Files\\Huawei\\DevEco Studio\\tools\\node\\node.exe',
|
||||
'D:\\Huawei\\OpenHarmony\\10\\10\\ets\\build-tools\\ets-loader\\bin\\ark\\ts2abc.js',
|
||||
'--target-api-version',
|
||||
'9'
|
||||
]
|
||||
[2025-11-23T15:58:49.841] [DEBUG] debug-file - 9.0.0.0
|
||||
[2025-11-23T15:58:49.844] [DEBUG] debug-file - entry : default@ProcessProfile cost memory -11.834396362304688
|
||||
[2025-11-23T15:58:49.844] [DEBUG] debug-file - runTaskFromQueue task cost before running: 772 ms
|
||||
[2025-11-23T15:58:49.844] [INFO] debug-file - Finished :entry:default@ProcessProfile... after 124 ms
|
||||
[2025-11-23T15:58:49.846] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.846] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.846] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.847] [DEBUG] debug-file - Executing task :entry:default@ProcessRouterMap
|
||||
[2025-11-23T15:58:49.848] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.848] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.848] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.851] [DEBUG] debug-file - entry : default@ProcessRouterMap cost memory 0.11864471435546875
|
||||
[2025-11-23T15:58:49.851] [DEBUG] debug-file - runTaskFromQueue task cost before running: 779 ms
|
||||
[2025-11-23T15:58:49.856] [INFO] debug-file - Finished :entry:default@ProcessRouterMap... after 4 ms
|
||||
[2025-11-23T15:58:49.860] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.860] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.860] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.862] [DEBUG] debug-file - restool module names: entry; moduleName=entry, taskName=default@PreviewProcessResource
|
||||
[2025-11-23T15:58:49.867] [DEBUG] debug-file - Executing task :entry:default@PreviewProcessResource
|
||||
[2025-11-23T15:58:49.867] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.867] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.867] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.867] [DEBUG] debug-file - entry : default@PreviewProcessResource cost memory 0.11865997314453125
|
||||
[2025-11-23T15:58:49.868] [DEBUG] debug-file - runTaskFromQueue task cost before running: 796 ms
|
||||
[2025-11-23T15:58:49.869] [INFO] debug-file - Finished :entry:default@PreviewProcessResource... after 4 ms
|
||||
[2025-11-23T15:58:49.871] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.871] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.871] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.873] [DEBUG] debug-file - Executing task :entry:default@GenerateLoaderJson
|
||||
[2025-11-23T15:58:49.885] [DEBUG] debug-file - entry : default@GenerateLoaderJson cost memory 0.9593353271484375
|
||||
[2025-11-23T15:58:49.885] [DEBUG] debug-file - runTaskFromQueue task cost before running: 814 ms
|
||||
[2025-11-23T15:58:49.889] [INFO] debug-file - Finished :entry:default@GenerateLoaderJson... after 13 ms
|
||||
[2025-11-23T15:58:49.890] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.890] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:49.890] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:49.891] [DEBUG] debug-file - restool module names: entry; moduleName=entry, taskName=default@PreviewCompileResource
|
||||
[2025-11-23T15:58:49.892] [DEBUG] debug-file - Executing task :entry:default@PreviewCompileResource
|
||||
[2025-11-23T15:58:49.906] [DEBUG] debug-file - Use tool [D:\Huawei\OpenHarmony\10\10\toolchains\restool.exe]
|
||||
[
|
||||
'D:\\Huawei\\OpenHarmony\\10\\10\\toolchains\\restool.exe',
|
||||
'-x',
|
||||
'E:\\jiaocai\\ensp14\\AppScope\\resources',
|
||||
'-o',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\app_compiled'
|
||||
]
|
||||
[2025-11-23T15:58:49.908] [DEBUG] debug-file - current process memoryUsage: {
|
||||
rss: 176553984,
|
||||
heapTotal: 132415488,
|
||||
heapUsed: 106880504,
|
||||
external: 3197477,
|
||||
arrayBuffers: 191274
|
||||
} os memoryUsage :12.917472839355469
|
||||
[2025-11-23T15:58:51.503] [DEBUG] debug-file - Info: restool resources compile success.
|
||||
|
||||
[2025-11-23T15:58:51.508] [DEBUG] debug-file - Use tool [D:\Huawei\OpenHarmony\10\10\toolchains\restool.exe]
|
||||
[
|
||||
'D:\\Huawei\\OpenHarmony\\10\\10\\toolchains\\restool.exe',
|
||||
'-x',
|
||||
'E:\\jiaocai\\ensp14\\entry\\src\\main\\resources',
|
||||
'-o',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\module_compiled'
|
||||
]
|
||||
[2025-11-23T15:58:51.509] [DEBUG] debug-file - current process memoryUsage: {
|
||||
rss: 176652288,
|
||||
heapTotal: 132415488,
|
||||
heapUsed: 107157120,
|
||||
external: 3197603,
|
||||
arrayBuffers: 191415
|
||||
} os memoryUsage :12.913017272949219
|
||||
[2025-11-23T15:58:51.536] [DEBUG] debug-file - Info: restool resources compile success.
|
||||
|
||||
[2025-11-23T15:58:51.571] [DEBUG] debug-file - Use tool [D:\Huawei\OpenHarmony\10\10\toolchains\restool.exe]
|
||||
[
|
||||
'D:\\Huawei\\OpenHarmony\\10\\10\\toolchains\\restool.exe',
|
||||
'-m',
|
||||
'entry',
|
||||
'-f',
|
||||
'-j',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\process_profile\\default\\module.json',
|
||||
'-p',
|
||||
'c***n',
|
||||
'-r',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\generated\\r\\default\\ResourceTable.h',
|
||||
'-z',
|
||||
'--ids',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\ids_map',
|
||||
'--defined-ids',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\ids_map\\id_defined.json',
|
||||
'-i',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\app_compiled',
|
||||
'-i',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\module_compiled',
|
||||
'-o',
|
||||
'E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default'
|
||||
]
|
||||
[2025-11-23T15:58:51.572] [DEBUG] debug-file - current process memoryUsage: {
|
||||
rss: 176652288,
|
||||
heapTotal: 132415488,
|
||||
heapUsed: 107444480,
|
||||
external: 3197729,
|
||||
arrayBuffers: 192345
|
||||
} os memoryUsage :12.9140625
|
||||
[2025-11-23T15:58:51.630] [DEBUG] debug-file - Info: restool resources compile success.
|
||||
|
||||
[2025-11-23T15:58:51.653] [DEBUG] debug-file - entry : default@PreviewCompileResource cost memory 1.2355880737304688
|
||||
[2025-11-23T15:58:51.654] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 583 ms
|
||||
[2025-11-23T15:58:51.656] [INFO] debug-file - Finished :entry:default@PreviewCompileResource... after 1 s 762 ms
|
||||
[2025-11-23T15:58:51.658] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.658] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.658] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - Executing task :entry:default@PreviewHookCompileResource
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - entry : default@PreviewHookCompileResource cost memory 0.04883575439453125
|
||||
[2025-11-23T15:58:51.659] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 588 ms
|
||||
[2025-11-23T15:58:51.659] [INFO] debug-file - Finished :entry:default@PreviewHookCompileResource... after 1 ms
|
||||
[2025-11-23T15:58:51.661] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.661] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.661] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.662] [DEBUG] debug-file - Executing task :entry:default@CopyPreviewProfile
|
||||
[2025-11-23T15:58:51.662] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.662] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.662] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.682] [DEBUG] debug-file - entry : default@CopyPreviewProfile cost memory 0.14804840087890625
|
||||
[2025-11-23T15:58:51.683] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 611 ms
|
||||
[2025-11-23T15:58:51.684] [INFO] debug-file - Finished :entry:default@CopyPreviewProfile... after 22 ms
|
||||
[2025-11-23T15:58:51.691] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.691] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.691] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - Executing task :entry:default@ReplacePreviewerPage
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - entry : default@ReplacePreviewerPage cost memory 0.04885101318359375
|
||||
[2025-11-23T15:58:51.692] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 621 ms
|
||||
[2025-11-23T15:58:51.692] [INFO] debug-file - Finished :entry:default@ReplacePreviewerPage... after 1 ms
|
||||
[2025-11-23T15:58:51.697] [DEBUG] debug-file - Executing task :entry:buildPreviewerResource
|
||||
[2025-11-23T15:58:51.697] [DEBUG] debug-file - entry : buildPreviewerResource cost memory 0.01218414306640625
|
||||
[2025-11-23T15:58:51.698] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 626 ms
|
||||
[2025-11-23T15:58:51.698] [INFO] debug-file - Finished :entry:buildPreviewerResource... after 1 ms
|
||||
[2025-11-23T15:58:51.703] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.703] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.703] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.704] [DEBUG] debug-file - Executing task :entry:default@PreviewUpdateAssets
|
||||
[2025-11-23T15:58:51.705] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.705] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.705] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.720] [DEBUG] debug-file - entry : default@PreviewUpdateAssets cost memory 0.3285064697265625
|
||||
[2025-11-23T15:58:51.720] [DEBUG] debug-file - runTaskFromQueue task cost before running: 2 s 649 ms
|
||||
[2025-11-23T15:58:51.721] [INFO] debug-file - Finished :entry:default@PreviewUpdateAssets... after 16 ms
|
||||
[2025-11-23T15:58:51.722] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.722] [DEBUG] debug-file - jsonObjWithoutParam {} at undefined
|
||||
[2025-11-23T15:58:51.722] [DEBUG] debug-file - jsonObjWithoutParam {"license":"","devDependencies":{},"author":"","name":"entry","description":"Please describe the basic information.","main":"","version":"1.0.0","dependencies":{}} at undefined
|
||||
[2025-11-23T15:58:51.725] [DEBUG] debug-file - Executing task :entry:default@PreviewArkTS
|
||||
[2025-11-23T15:58:51.742] [DEBUG] debug-file - session manager: binding session. socketId=BHgztvG5se-tAEEKAAAD, threadId=1@1.
|
||||
[2025-11-23T15:58:51.743] [DEBUG] debug-file - entry : default@PreviewArkTS cost memory -5.783134460449219
|
||||
[2025-11-23T15:59:10.193] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchStart
|
||||
[2025-11-23T15:59:10.194] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchStart
|
||||
[2025-11-23T15:59:15.204] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.207] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:15.209] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.210] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:15.474] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.476] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:15.475] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.477] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:15.476] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.482] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:15.476] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchLog
|
||||
[2025-11-23T15:59:15.483] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchLog
|
||||
[2025-11-23T15:59:19.602] [DEBUG] debug-file - watch worker: send response to session manager. Response type: WatchResult
|
||||
[2025-11-23T15:59:19.612] [DEBUG] debug-file - session manager: watch message received from worker 1. Type: WatchResult
|
||||
[2025-11-23T15:59:19.610] [DEBUG] debug-file - Ark compile finished.
|
||||
[2025-11-23T15:59:19.624] [INFO] debug-file - Finished :entry:default@PreviewArkTS... after 27 s 899 ms
|
||||
[2025-11-23T15:59:19.626] [DEBUG] debug-file - Executing task :entry:PreviewBuild
|
||||
[2025-11-23T15:59:19.626] [DEBUG] debug-file - entry : PreviewBuild cost memory 0.01180267333984375
|
||||
[2025-11-23T15:59:19.626] [DEBUG] debug-file - runTaskFromQueue task cost before running: 30 s 555 ms
|
||||
[2025-11-23T15:59:19.626] [INFO] debug-file - Finished :entry:PreviewBuild... after 1 ms
|
||||
[2025-11-23T15:59:19.637] [DEBUG] debug-file - BUILD SUCCESSFUL in 30 s 566 ms
|
||||
[2025-11-23T15:59:19.638] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\AppScope\app.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.639] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\entry\src\main\module.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\build-profile.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\entry\build-profile.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\entry\src\main\resources\base\profile\main_pages.json cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\hvigor\hvigor-config.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\entry\oh-package.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.640] [DEBUG] debug-file - Update task entry:default@PreBuild input file:E:\jiaocai\ensp14\oh-package.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.641] [DEBUG] debug-file - Incremental task entry:default@PreBuild post-execution cost:3 ms .
|
||||
[2025-11-23T15:59:19.641] [DEBUG] debug-file - Update task entry:default@CreateModuleInfo output file:E:\jiaocai\ensp14\entry\.preview\default\generated\profile\default\ModuleInfo.ts cache.
|
||||
[2025-11-23T15:59:19.641] [DEBUG] debug-file - Incremental task entry:default@CreateModuleInfo post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.641] [DEBUG] debug-file - Update task entry:default@MergeProfile input file:E:\jiaocai\ensp14\AppScope\app.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.641] [DEBUG] debug-file - Update task entry:default@MergeProfile input file:E:\jiaocai\ensp14\build-profile.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Update task entry:default@MergeProfile input file:E:\jiaocai\ensp14\entry\src\main\module.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Update task entry:default@MergeProfile output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\merge_profile\default\module.json cache.
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Incremental task entry:default@MergeProfile post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Update task entry:default@GeneratePkgContextInfo output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\loader\default\pkgContextInfo.json cache.
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Incremental task entry:default@GeneratePkgContextInfo post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.642] [DEBUG] debug-file - Update task entry:default@ProcessProfile input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\merge_profile\default\module.json cache by regenerate.
|
||||
[2025-11-23T15:59:19.643] [DEBUG] debug-file - Update task entry:default@ProcessProfile output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\process_profile\default\module.json cache.
|
||||
[2025-11-23T15:59:19.643] [DEBUG] debug-file - Incremental task entry:default@ProcessProfile post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.643] [DEBUG] debug-file - Update task entry:default@ProcessRouterMap input file:E:\jiaocai\ensp14\entry\oh-package.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.643] [DEBUG] debug-file - Update task entry:default@ProcessRouterMap input file:E:\jiaocai\ensp14\oh-package.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.643] [DEBUG] debug-file - Update task entry:default@ProcessRouterMap input file:E:\jiaocai\ensp14\entry\src\main\module.json5 cache by regenerate.
|
||||
[2025-11-23T15:59:19.644] [DEBUG] debug-file - Update task entry:default@ProcessRouterMap output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\router_map\default\temp-router-map.json cache.
|
||||
[2025-11-23T15:59:19.644] [DEBUG] debug-file - Update task entry:default@ProcessRouterMap output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\router_map\default\loader-router-map.json cache.
|
||||
[2025-11-23T15:59:19.644] [DEBUG] debug-file - Incremental task entry:default@ProcessRouterMap post-execution cost:2 ms .
|
||||
[2025-11-23T15:59:19.645] [DEBUG] debug-file - Update task entry:default@GenerateLoaderJson input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\router_map\default\temp-router-map.json cache by regenerate.
|
||||
[2025-11-23T15:59:19.645] [DEBUG] debug-file - Update task entry:default@GenerateLoaderJson output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\loader\default\loader.json cache.
|
||||
[2025-11-23T15:59:19.645] [DEBUG] debug-file - Incremental task entry:default@GenerateLoaderJson post-execution cost:2 ms .
|
||||
[2025-11-23T15:59:19.646] [DEBUG] debug-file - Update task entry:default@PreviewCompileResource input file:E:\jiaocai\ensp14\entry\src\main\resources cache by regenerate.
|
||||
[2025-11-23T15:59:19.659] [DEBUG] debug-file - Update task entry:default@PreviewCompileResource input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\merge_profile\default\module.json cache by regenerate.
|
||||
[2025-11-23T15:59:19.660] [DEBUG] debug-file - Update task entry:default@PreviewCompileResource output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default cache.
|
||||
[2025-11-23T15:59:19.661] [DEBUG] debug-file - Update task entry:default@PreviewCompileResource output file:E:\jiaocai\ensp14\entry\.preview\default\generated\r\default cache.
|
||||
[2025-11-23T15:59:19.662] [DEBUG] debug-file - Incremental task entry:default@PreviewCompileResource post-execution cost:17 ms .
|
||||
[2025-11-23T15:59:19.662] [DEBUG] debug-file - Update task entry:default@CopyPreviewProfile input file:E:\jiaocai\ensp14\entry\src\main\resources\base\profile cache by regenerate.
|
||||
[2025-11-23T15:59:19.662] [DEBUG] debug-file - Update task entry:default@CopyPreviewProfile output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default\resources\base\profile cache.
|
||||
[2025-11-23T15:59:19.662] [DEBUG] debug-file - Incremental task entry:default@CopyPreviewProfile post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.663] [DEBUG] debug-file - Update task entry:default@PreviewUpdateAssets output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default\module.json cache.
|
||||
[2025-11-23T15:59:19.663] [DEBUG] debug-file - Update task entry:default@PreviewUpdateAssets output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default\resources\base\profile\main_pages.json cache.
|
||||
[2025-11-23T15:59:19.663] [DEBUG] debug-file - Incremental task entry:default@PreviewUpdateAssets post-execution cost:1 ms .
|
||||
[2025-11-23T15:59:19.664] [DEBUG] debug-file - Update task entry:default@PreviewArkTS input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\loader\default cache by regenerate.
|
||||
[2025-11-23T15:59:19.664] [DEBUG] debug-file - Update task entry:default@PreviewArkTS input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default\ResourceTable.txt cache by regenerate.
|
||||
[2025-11-23T15:59:19.664] [DEBUG] debug-file - Update task entry:default@PreviewArkTS input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\process_profile\default\module.json cache by regenerate.
|
||||
[2025-11-23T15:59:19.665] [DEBUG] debug-file - Update task entry:default@PreviewArkTS input file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\res\default\resources\base\profile cache by regenerate.
|
||||
[2025-11-23T15:59:19.665] [DEBUG] debug-file - Update task entry:default@PreviewArkTS input file:E:\jiaocai\ensp14\entry\src\main\ets cache by regenerate.
|
||||
[2025-11-23T15:59:19.666] [DEBUG] debug-file - Update task entry:default@PreviewArkTS output file:E:\jiaocai\ensp14\entry\.preview\default\intermediates\loader_out\default\ets cache.
|
||||
[2025-11-23T15:59:19.667] [DEBUG] debug-file - Incremental task entry:default@PreviewArkTS post-execution cost:4 ms .
|
||||
[2025-11-23T15:59:19.681] [DEBUG] debug-file - Current worker pool is stopped or closed.
|
||||
[2025-11-23T15:59:19.681] [DEBUG] debug-file - There's no busy workers and idle workers need to be cleared.
|
||||
[2025-11-23T15:59:19.682] [DEBUG] debug-file - hvigor build process will be closed.
|
||||
[2025-11-23T15:59:19.684] [DEBUG] debug-file - Current worker pool is terminated.
|
||||
[2025-11-23T16:01:13.245] [DEBUG] debug-file - session manager: send message to worker process.
|
||||
[2025-11-23T16:01:13.245] [DEBUG] debug-file - session manager: send message to worker process.
|
||||
[2025-11-23T16:01:13.430] [DEBUG] debug-file - bad codeSnippet [object Object]
|
||||
[2025-11-23T16:01:13.525] [DEBUG] debug-file - watch worker: worker is ready to be terminated.
|
||||
[2025-11-23T16:01:13.526] [DEBUG] debug-file - Server currently has 0 watch-worker
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"HVIGOR_OHOS_PLUGIN": {
|
||||
"MODULES": [
|
||||
{
|
||||
"MODULE_NAME": "1043bfc77febe75fafec0c4309faccf1",
|
||||
"API_TYPE": "stageMode"
|
||||
}
|
||||
],
|
||||
"BUILD_MODE": "debug"
|
||||
},
|
||||
"HVIGOR": {
|
||||
"IS_INCREMENTAL": true,
|
||||
"IS_DAEMON": true,
|
||||
"IS_PARALLEL": true,
|
||||
"IS_HVIGORFILE_TYPE_CHECK": false,
|
||||
"TASK_TIME": {
|
||||
"1043bfc77febe75fafec0c4309faccf1": {
|
||||
"init": 704600,
|
||||
"PreBuild": 357989000,
|
||||
"CreateModuleInfo": 2293100,
|
||||
"MergeProfile": 30274900,
|
||||
"PreCheckSyscap": 1206200,
|
||||
"GeneratePkgContextInfo": 755800,
|
||||
"ProcessProfile": 123592500,
|
||||
"ProcessRouterMap": 7508700,
|
||||
"PreviewProcessResource": 4800500,
|
||||
"GenerateLoaderJson": 15193100,
|
||||
"PreviewCompileResource": 1764038600,
|
||||
"PreviewHookCompileResource": 575700,
|
||||
"CopyPreviewProfile": 22562700,
|
||||
"ReplacePreviewerPage": 523800,
|
||||
"buildPreviewerResource": 277200,
|
||||
"PreviewUpdateAssets": 16280600,
|
||||
"PreviewArkTS": 27900467700,
|
||||
"PreviewBuild": 275300
|
||||
},
|
||||
"APP": {
|
||||
"init": 280200
|
||||
}
|
||||
},
|
||||
"BUILD_ID": "202511231558490680",
|
||||
"TOTAL_TIME": 30565983600
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"CACHE_SYNC_FILE_HASH":{"E:\\jiaocai\\ensp14\\hvigor\\hvigor-config.json5":"334a374b888911d2ab8202ff66556e3721271120256ad94f9facea1e6655b42f","E:\\jiaocai\\ensp14\\build-profile.json5":"2eee20db821c2e0229c0e680b3a52f86d9e32f0ee6b1fee3d8461184c86dce40","E:\\jiaocai\\ensp14\\hvigorfile.ts":"72f0dcd1eefa94e7b020ebba799a661b26e91815f0b8c3f9fd58c4b743bb07bf","E:\\jiaocai\\ensp14\\oh-package.json5":"46ff84d32c523c28c24b8b9da299c7cf8b9477396f11766e67ab8c2e340df38e","E:\\jiaocai\\ensp14\\entry\\build-profile.json5":"f931211b917ee41047c061552afeca79100b06c76b55ab8f29c2fd861881e616","E:\\jiaocai\\ensp14\\entry\\hvigorfile.ts":"72f0dcd1eefa94e7b020ebba799a661b26e91815f0b8c3f9fd58c4b743bb07bf","E:\\jiaocai\\ensp14\\entry\\oh-package.json5":"280616c9d6433d295128fad70eb12627c718739d6a21dbd5dfe1896667ed5f58","E:\\jiaocai\\ensp14\\.hvigor\\outputs\\sync\\output.json":"5c0908842edbbf6b0c8a2d42eb700108e9035d1a3302c1ee68c0378afa32e8a1","SDK_LOCATION":"D:/Program Files/Huawei/DevEco Studio/sdk"},"OHPM_INSTALL_FILE_HASH":{"E:\\jiaocai\\ensp14\\oh-package.json5":"46ff84d32c523c28c24b8b9da299c7cf8b9477396f11766e67ab8c2e340df38e","E:\\jiaocai\\ensp14\\oh_modules\\.ohpm\\lock.json5":"aca9115dc765530c0236034b04e66fcb1e557cff53fa631297cead7ddce0336c","E:\\jiaocai\\ensp14\\entry\\oh-package.json5":"280616c9d6433d295128fad70eb12627c718739d6a21dbd5dfe1896667ed5f58","E:\\jiaocai\\ensp14\\oh_modules":true,"E:\\jiaocai\\ensp14\\entry\\oh_modules":false}}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
{
|
||||
"ohos-module-entry": {
|
||||
"SELECT_TARGET": "default",
|
||||
"MODULE_BUILD_DIR": "E:\\jiaocai\\ensp14\\entry\\build",
|
||||
"DEPENDENCY_INFO": {},
|
||||
"TARGETS": {
|
||||
"default": {
|
||||
"SOURCE_ROOT": "E:\\jiaocai\\ensp14\\entry\\src\\main",
|
||||
"RESOURCES_PATH": [
|
||||
"E:\\jiaocai\\ensp14\\entry\\src\\main\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\outputs\\default",
|
||||
"INTERMEDIA_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out\\default",
|
||||
"JS_LITE_ASSETS_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"RES_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\default",
|
||||
"RES_PROFILE_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\manifest\\default",
|
||||
"OUTPUT_METADATA_JSON": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\source_map\\default"
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"debuggable": true
|
||||
}
|
||||
},
|
||||
"ohosTest": {
|
||||
"SOURCE_ROOT": "E:\\jiaocai\\ensp14\\entry\\src\\ohosTest",
|
||||
"RESOURCES_PATH": [
|
||||
"E:\\jiaocai\\ensp14\\entry\\src\\ohosTest\\resources"
|
||||
],
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\outputs\\ohosTest",
|
||||
"INTERMEDIA_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates",
|
||||
"JS_ASSETS_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out\\ohosTest",
|
||||
"JS_LITE_ASSETS_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out_lite\\ohosTest",
|
||||
"RES_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\ohosTest",
|
||||
"RES_PROFILE_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\ohosTest\\resources\\base\\profile",
|
||||
"ETS_SUPER_VISUAL_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileArkTS\\esmodule",
|
||||
"JS_SUPER_VISUAL_PATH": "E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\ohosTest\\ohosTest@OhosTestCompileJS\\jsbundle",
|
||||
"WORKER_LOADER": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader\\ohosTest\\loader.json",
|
||||
"MANIFEST_JSON": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\manifest\\ohosTest",
|
||||
"OUTPUT_METADATA_JSON": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\hap_metadata\\ohosTest\\output_metadata.json",
|
||||
"SOURCE_MAP_DIR": "E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\source_map\\ohosTest"
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"debuggable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"BUILD_OPTION": {
|
||||
"default-default": {
|
||||
"debuggable": true,
|
||||
"copyFrom": "default",
|
||||
"arkOptions": {},
|
||||
"name": "debug"
|
||||
}
|
||||
},
|
||||
"BUILD_PROFILE_OPT": {
|
||||
"apiType": "stageMode",
|
||||
"buildOption": {
|
||||
"arkOptions": {}
|
||||
},
|
||||
"buildOptionSet": [
|
||||
{
|
||||
"name": "release",
|
||||
"arkOptions": {
|
||||
"obfuscation": {
|
||||
"ruleOptions": {
|
||||
"enable": true,
|
||||
"files": [
|
||||
"./obfuscation-rules.txt"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "debug"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "ohosTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
"BUILD_CACHE_DIR": ""
|
||||
},
|
||||
"ohos-project": {
|
||||
"SELECT_PRODUCT_NAME": "default",
|
||||
"MODULE_BUILD_DIR": "E:\\jiaocai\\ensp14\\build",
|
||||
"BUNDLE_NAME": "com.example.ensp_fourteen",
|
||||
"BUILD_PATH": {
|
||||
"OUTPUT_PATH": "E:\\jiaocai\\ensp14\\build\\outputs\\default"
|
||||
},
|
||||
"MODULES": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "E:\\jiaocai\\ensp14\\entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
],
|
||||
"belongProjectPath": "E:\\jiaocai\\ensp14"
|
||||
}
|
||||
],
|
||||
"PROFILE_OPT": {
|
||||
"app": {
|
||||
"signingConfigs": [],
|
||||
"products": [
|
||||
{
|
||||
"name": "default",
|
||||
"signingConfig": "default",
|
||||
"compileSdkVersion": 10,
|
||||
"compatibleSdkVersion": 9,
|
||||
"runtimeOS": "OpenHarmony"
|
||||
}
|
||||
],
|
||||
"buildModeSet": [
|
||||
{
|
||||
"name": "debug"
|
||||
},
|
||||
{
|
||||
"name": "release"
|
||||
}
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "./entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"CONFIG_PROPERTIES": {
|
||||
"enableSignTask": true,
|
||||
"skipNativeIncremental": false,
|
||||
"hvigor.keepDependency": true
|
||||
},
|
||||
"OVERALL_PROJECT_PATHS": [
|
||||
"E:\\jiaocai\\ensp14"
|
||||
],
|
||||
"BUILD_CACHE_DIR": ""
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"workLog": [],
|
||||
"workerIdList": [
|
||||
-1
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739231,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreBuild",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739227
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739235,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@MergeProfile",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739233
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739241,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@GenerateLoaderJson",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739235
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739245,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@ProcessProfile",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739244
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739245,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreviewProcessResource",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739245
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739855,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreviewCompileResource",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739246
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739856,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreviewHookCompileResource",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739856
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739867,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@ReplacePreviewerPage",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739856
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739868,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "buildPreviewerResource",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739867
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055739871,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreviewUpdateAssets",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739868
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055750773,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "default@PreviewArkTS",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055739871
|
||||
},
|
||||
{
|
||||
"type": "build_line",
|
||||
"endTime": 1724055750777,
|
||||
"status": "closed",
|
||||
"children": [],
|
||||
"name": "overallTime",
|
||||
"taskName": "PreviewBuild",
|
||||
"taskPath": "entry",
|
||||
"workerId": -1,
|
||||
"startTime": 1724055750777
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"CommonInfo":{
|
||||
"current.select.target":"default"
|
||||
},
|
||||
"BuildOptions":{
|
||||
"SELECT_BUILD_TARGET":"default",
|
||||
"BUILD_PATH":{
|
||||
"OUTPUT_METADATA_JSON":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\hap_metadata\\default\\output_metadata.json",
|
||||
"OUTPUT_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\outputs\\default",
|
||||
"RES_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\default",
|
||||
"ETS_SUPER_VISUAL_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule",
|
||||
"JS_ASSETS_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out\\default",
|
||||
"SOURCE_MAP_DIR":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\source_map\\default",
|
||||
"INTERMEDIA_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates",
|
||||
"RES_PROFILE_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile",
|
||||
"WORKER_LOADER":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader\\default\\loader.json",
|
||||
"MANIFEST_JSON":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\manifest\\default",
|
||||
"JS_LITE_ASSETS_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\intermediates\\loader_out_lite\\default",
|
||||
"JS_SUPER_VISUAL_PATH":"E:\\jiaocai\\ensp14\\entry\\build\\default\\cache\\default\\default@CompileJS\\jsbundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"CommonInfo":{
|
||||
"crossplatform.projectType":"",
|
||||
"project.ide.version":"5.0.13.240",
|
||||
"current.select.product":"default",
|
||||
"current.select.buildMode":""
|
||||
},
|
||||
"BuildOptions":{
|
||||
"BUNDLE_NAME":"com.example.ensp_fourteen",
|
||||
"SELECT_BUILD_MODE":"",
|
||||
"BUILD_PATH":{
|
||||
"OUTPUT_PATH":"E:\\jiaocai\\ensp14\\build\\outputs\\default"
|
||||
},
|
||||
"SELECT_BUILD_PRODUCT":"default"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/ensp14.iml" filepath="$PROJECT_DIR$/.idea/modules/ensp14.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/entry/entry.iml" filepath="$PROJECT_DIR$/.idea/modules/entry/entry.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../..">
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../oh_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/.gradle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/app/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/library/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/ios/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/app/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../.arkui-x/android/library/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/node_modules" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.cxx" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.test" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/.preview" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../entry/oh_modules" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" exported="" scope="PROVIDED">
|
||||
<library name="ArkTS-API 10" type="ArkUI">
|
||||
<CLASSES />
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://D:/Huawei/OpenHarmony/10/10/ets/api" />
|
||||
<root url="file://D:/Huawei/OpenHarmony/10/10/ets/component" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../../../entry" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"setting": {
|
||||
"1.0.1": {
|
||||
"Language": {
|
||||
"args": {
|
||||
"Language": "zh_CN"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"1.0.0": {
|
||||
"Resolution": {
|
||||
"args": {
|
||||
"Resolution": "360*780"
|
||||
}
|
||||
},
|
||||
"DeviceType": {
|
||||
"args": {
|
||||
"DeviceType": "default"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"1.0.0": {
|
||||
"LastPreviewDevice": {}
|
||||
},
|
||||
"1.0.1": {
|
||||
"profileList": [
|
||||
{
|
||||
"id": "Default",
|
||||
"deviceType": "default",
|
||||
"width": 1080,
|
||||
"height": 2340,
|
||||
"shape": "rect",
|
||||
"dpi": 480,
|
||||
"orientation": "portrait",
|
||||
"language": "zh_CN",
|
||||
"colorMode": "light"
|
||||
},
|
||||
{
|
||||
"id": "Tablet",
|
||||
"deviceType": "tablet",
|
||||
"width": 2560,
|
||||
"height": 1600,
|
||||
"shape": "rect",
|
||||
"dpi": 400,
|
||||
"orientation": "landscape",
|
||||
"language": "zh_CN",
|
||||
"colorMode": "light"
|
||||
}
|
||||
],
|
||||
"runningProfileList": [
|
||||
"Tablet"
|
||||
],
|
||||
"availableProfileList": [
|
||||
"Default"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"setting": {
|
||||
"1.0.1": {
|
||||
"Language": {
|
||||
"args": {
|
||||
"Language": "zh_CN"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"1.0.0": {
|
||||
"Resolution": {
|
||||
"args": {
|
||||
"Resolution": "1024*640"
|
||||
}
|
||||
},
|
||||
"DeviceType": {
|
||||
"args": {
|
||||
"DeviceType": "tablet"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"setting": {
|
||||
"1.0.1": {
|
||||
"Language": {
|
||||
"args": {
|
||||
"Language": "zh_CN"
|
||||
}
|
||||
},
|
||||
"AvoidArea": {
|
||||
"args": {
|
||||
"topRect": {
|
||||
"posX": 0,
|
||||
"posY": 0,
|
||||
"width": 2560,
|
||||
"height": 97.5
|
||||
},
|
||||
"leftRect": {
|
||||
"posX": 0,
|
||||
"posY": 97.5,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"rightRect": {
|
||||
"posX": 2560,
|
||||
"posY": 97.5,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"bottomRect": {
|
||||
"posX": 0,
|
||||
"posY": 2256,
|
||||
"width": 1530,
|
||||
"height": 70
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"frontend": {
|
||||
"1.0.0": {
|
||||
"Resolution": {
|
||||
"args": {
|
||||
"Resolution": "2560*1600"
|
||||
}
|
||||
},
|
||||
"DeviceType": {
|
||||
"args": {
|
||||
"DeviceType": "tablet"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"app": {
|
||||
"bundleName": "com.example.ensp_fourteen",
|
||||
"vendor": "example",
|
||||
"versionCode": 1000000,
|
||||
"versionName": "1.0.0",
|
||||
"icon": "$media:app_icon",
|
||||
"label": "$string:app_name"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"string": [
|
||||
{
|
||||
"name": "app_name",
|
||||
"value": "ENSP_fourteen"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"app": {
|
||||
"signingConfigs": [],
|
||||
"products": [
|
||||
{
|
||||
"name": "default",
|
||||
"signingConfig": "default",
|
||||
"compileSdkVersion": 10,
|
||||
"compatibleSdkVersion": 9,
|
||||
"runtimeOS": "OpenHarmony",
|
||||
}
|
||||
],
|
||||
"buildModeSet": [
|
||||
{
|
||||
"name": "debug",
|
||||
},
|
||||
{
|
||||
"name": "release"
|
||||
}
|
||||
]
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"name": "entry",
|
||||
"srcPath": "./entry",
|
||||
"targets": [
|
||||
{
|
||||
"name": "default",
|
||||
"applyToProducts": [
|
||||
"default"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"APP_RESOURCES":"E:\\jiaocai\\ensp14\\AppScope\\resources","MODULE_RESOURCES":"{\"E:\\\\jiaocai\\\\ensp14\\\\entry\\\\src\\\\main\\\\resources\":\"module_compiled\"}","HAR_RESOURCES":"{}","PREVIEW_GENERATE_SOURCE_DIR":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\generated\\r\\default","PREVIEW_COMPILE_MODULE_NAMES":"entry"}
|
||||
1715
ensp14ing/ensp14/entry/.preview/cache/.default/ArkTS/ArkTSLinter_output.json
vendored
Normal file
1715
ensp14ing/ensp14/entry/.preview/cache/.default/ArkTS/ArkTSLinter_output.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
string EntryAbility_desc 0x01000004
|
||||
string EntryAbility_label 0x01000005
|
||||
string app_name 0x01000000
|
||||
string module_desc 0x01000006
|
||||
color start_window_background 0x01000008
|
||||
media app_icon 0x01000001
|
||||
media icon 0x01000003
|
||||
media jiaohuanji 0x01000010
|
||||
media jiaohuanji_tm 0x0100000b
|
||||
media jixianqi 0x0100000c
|
||||
media jixianqi_tm 0x01000009
|
||||
media luyouqi 0x0100000d
|
||||
media luyouqi_tm 0x01000011
|
||||
media packet 0x0100000f
|
||||
media startIcon 0x01000002
|
||||
media zhuji 0x0100000a
|
||||
media zhuji_tm 0x0100000e
|
||||
profile main_pages 0x01000007
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.protoBin
vendored
Normal file
Binary file not shown.
220
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.ts
vendored
Normal file
220
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.ts
vendored
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
import type { SimHost } from "./OtherSimObjects";
|
||||
// 应用层数据包(解封包)
|
||||
export class AppData {
|
||||
objId: symbol; // 主机id
|
||||
objLabel: string; // 主机标识
|
||||
appPackId: symbol; // 应用层数据包id
|
||||
appPackSize: number; // 应用层数据包大小
|
||||
appPackTag: string; // 应用层数据包内容
|
||||
sourceAppAddr: string; // 源主机应用层信息
|
||||
targetAppAddr: string; // 目的主机应用层信息
|
||||
timeStamp: number; // 时间戳
|
||||
appPackedString: string; // 上述所有信息总和
|
||||
constructor(objId: symbol, objLabel: string, appPackSize: number, appPackTag: string, sourceAppAddr: string, targetAppAddr: string) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.appPackId = Symbol();
|
||||
this.appPackSize = appPackSize;
|
||||
this.appPackTag = appPackTag;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.timeStamp = Date.parse(new Date().toString());
|
||||
this.appPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",appPackId: " + this.appPackId.toString() + ",appPackSize: " + this.appPackSize.toString() + ",appPackTag: " + this.appPackTag + "\nsourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + ",timeStamp: " + this.timeStamp + "\n";
|
||||
}
|
||||
pack(): AppData {
|
||||
return this;
|
||||
} // 应用层封包
|
||||
unpack(simHost: SimHost) {
|
||||
simHost.appData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
appPackId: this.appPackId,
|
||||
sourceAppAddr: this.sourceAppAddr,
|
||||
targetAppAddr: this.targetAppAddr,
|
||||
toString: (): string => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",appPackId:" + this.appPackId.toString() + ",sourceAppAddr:" + this.sourceAppAddr.toString() + ",targetAppAddr:" + this.targetAppAddr.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 应用层解包
|
||||
isValid(sourceAppAddr: string, targetAppAddr: string) {
|
||||
return this.sourceAppAddr === sourceAppAddr && this.targetAppAddr === targetAppAddr;
|
||||
} // 根据用户输入的应用层地址判断是否正确
|
||||
}
|
||||
// 传输层数据包(解封包)
|
||||
export class TransData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
transPackId: symbol;
|
||||
transSeq: number;
|
||||
transTag: string;
|
||||
appPackId: symbol;
|
||||
sourcePort: number;
|
||||
targetPort: number;
|
||||
sourceAppAddr: string;
|
||||
targetAppAddr: string;
|
||||
timeStamp: number;
|
||||
transPackedString: string;
|
||||
constructor(objId: symbol, objLabel: string, transSeq: number, transTag: string, appPackId: symbol, sourcePort: number, targetPort: number, sourceAppAddr: string, targetAppAddr: string) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.transPackId = Symbol();
|
||||
this.transSeq = transSeq;
|
||||
this.transTag = transTag;
|
||||
this.appPackId = appPackId;
|
||||
this.sourcePort = sourcePort;
|
||||
this.targetPort = targetPort;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.timeStamp = Date.parse(new Date().toString());
|
||||
this.transPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",transPackId: " + this.transPackId.toString() + ",transSeq: " + this.transSeq.toString() + ",transTag: " + this.transTag + ",appPackId: " + this.appPackId.toString() + "\nsourcePort: " + this.sourcePort.toString() + "\ntargetPort: " + this.targetPort.toString() + ",sourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + ",timeStamp: " + this.timeStamp + "\n";
|
||||
}
|
||||
calcNumSplits(): number {
|
||||
const MTU = 2048;
|
||||
return (this.transPackedString.length + MTU - 1) / MTU;
|
||||
} // 计算拆分数量
|
||||
pack(): Array<TransData> {
|
||||
const numSplits = this.calcNumSplits();
|
||||
let transDataList: TransData[] = [];
|
||||
for (let i = 0; i < numSplits; i++) {
|
||||
transDataList.push(new TransData(this.objId, this.objLabel, i + 1, this.transTag, this.appPackId, this.sourcePort, this.targetPort, this.sourceAppAddr, this.targetAppAddr));
|
||||
}
|
||||
return transDataList;
|
||||
} // 传输层封包
|
||||
unPack(simHost: SimHost) {
|
||||
simHost.transData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
transPackId: this.transPackId,
|
||||
sourcePort: this.sourcePort,
|
||||
targetPort: this.targetPort,
|
||||
toString: (): string => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",transPackId:" + this.transPackId.toString() + ",sourcePort:" + this.sourcePort.toString() + ",targetPort:" + this.targetPort.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 传输层解包
|
||||
isValid(sourcePort: number, targetPort: number) {
|
||||
return this.sourcePort === sourcePort && this.targetPort === targetPort;
|
||||
} // 根据用户输入的端口判断是否正确
|
||||
}
|
||||
// 网络层数据包(解封包)
|
||||
export class IPData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
ipPackId: symbol;
|
||||
transPackId: symbol;
|
||||
sourceIp: string;
|
||||
targetIp: string;
|
||||
sourceAppAddr: string;
|
||||
targetAppAddr: string;
|
||||
ipPackedString: string;
|
||||
constructor(objId: symbol, objLabel: string, transPackId: symbol, sourceIp: string, targetIp: string, sourceAppAddr: string, targetAppAddr: string) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.ipPackId = Symbol();
|
||||
this.transPackId = transPackId;
|
||||
this.sourceIp = sourceIp;
|
||||
this.targetIp = targetIp;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.ipPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",ipPackId: " + this.ipPackId.toString() + ",transPackId: " + this.transPackId.toString() + "\nsourceIp: " + this.sourceIp.toString() + "\ntargetIp: " + this.targetIp.toString() + ",sourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + "\n";
|
||||
}
|
||||
pack(): IPData {
|
||||
let ipData: IPData;
|
||||
ipData = new IPData(this.objId, this.objLabel, this.transPackId, this.sourceIp, this.targetIp, this.sourceAppAddr, this.targetAppAddr);
|
||||
return ipData;
|
||||
} // 网络层封包
|
||||
unpack(simHost: SimHost) {
|
||||
simHost.ipData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
ipPackId: this.ipPackId,
|
||||
sourceIp: this.sourceIp,
|
||||
targetIp: this.targetIp,
|
||||
toString: (): string => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",ipPackId:" + this.ipPackId.toString() + ",sourceIp:" + this.sourceIp.toString() + ",targetIp:" + this.targetIp.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 网络层解包
|
||||
isValid(sourceIp: string, targetIp: string) {
|
||||
return this.sourceIp === sourceIp && this.targetIp === targetIp;
|
||||
} // 根据用户输入的ip地址判断是否正确
|
||||
}
|
||||
// 链路层数据包(解封包)
|
||||
export class MACData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
macPackId: symbol;
|
||||
ipPackId: symbol;
|
||||
sourceMac: string;
|
||||
targetMac: string;
|
||||
sourceIp: string;
|
||||
targetIp: string;
|
||||
sourceAppAddr: string;
|
||||
targetAppAddr: string;
|
||||
macPackedString: string;
|
||||
constructor(objID: symbol, objLabel: string, ipPackID: symbol, sourceMac: string, targetMac: string, sourceIp: string, targetIp: string, sourceAppAddr: string, targetAppAddr: string) {
|
||||
this.objId = objID;
|
||||
this.objLabel = objLabel;
|
||||
this.macPackId = Symbol();
|
||||
this.ipPackId = ipPackID;
|
||||
this.sourceMac = sourceMac;
|
||||
this.targetMac = targetMac;
|
||||
this.sourceIp = sourceIp;
|
||||
this.targetIp = targetIp;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.macPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",macPackId: " + this.macPackId.toString() + ",ipPackId: " + this.ipPackId.toString() + "\nsentMac: " + this.sourceMac.toString() + ",rpctMac: " + this.targetMac.toString() + ",sourceIp: " + this.sourceIp.toString() + ",targetIp: " + this.targetIp.toString() + "\nsourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + "\n";
|
||||
}
|
||||
pack(): MACData {
|
||||
let macData: MACData;
|
||||
macData = new MACData(this.objId, this.objLabel, this.ipPackId, this.sourceMac, this.targetMac, this.sourceIp, this.targetIp, this.sourceAppAddr, this.targetAppAddr);
|
||||
return macData;
|
||||
} // 链路层封包
|
||||
unPack(simHost: SimHost) {
|
||||
simHost.macData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
macPackId: this.macPackId,
|
||||
sourceMac: this.sourceMac,
|
||||
targetMac: this.targetMac,
|
||||
toString: (): string => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",macPackId:" + this.macPackId.toString() + ",sourceMac:" + this.sourceMac.toString() + ",targetMac:" + this.targetMac.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 链路层解包
|
||||
isValid(sentMac: string, rcptMac: string) {
|
||||
return this.sourceMac === sentMac && this.targetMac === rcptMac;
|
||||
} // 根据用户输入的mac地址判断是否正确
|
||||
}
|
||||
export interface macData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
macPackId: symbol;
|
||||
sourceMac: string;
|
||||
targetMac: string;
|
||||
toString: Function;
|
||||
} // 主机收到的链路层数据包的数据结构
|
||||
export interface ipData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
ipPackId: symbol;
|
||||
sourceIp: string;
|
||||
targetIp: string;
|
||||
toString: Function;
|
||||
} // 主机收到的网络层数据包的数据结构
|
||||
export interface transData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
transPackId: symbol;
|
||||
sourcePort: number;
|
||||
targetPort: number;
|
||||
toString: Function;
|
||||
} // 主机收到的传输层数据包的数据结构
|
||||
export interface appData {
|
||||
objId: symbol;
|
||||
objLabel: string;
|
||||
appPackId: symbol;
|
||||
sourceAppAddr: string;
|
||||
targetAppAddr: string;
|
||||
toString: Function;
|
||||
} // 主机收到的链路层数据包的数据结构
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.protoBin
vendored
Normal file
Binary file not shown.
409
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.ts
vendored
Normal file
409
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.ts
vendored
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
import { SimBase } from "@bundle:com.example.ensp_fourteen/entry/ets/classes/SimBase";
|
||||
import { AppData, IPData, MACData, TransData } from "@bundle:com.example.ensp_fourteen/entry/ets/classes/Datas";
|
||||
import type { macData, ipData, transData, appData } from "@bundle:com.example.ensp_fourteen/entry/ets/classes/Datas";
|
||||
import { updatePacketLog } from "@bundle:com.example.ensp_fourteen/entry/ets/functions/functions";
|
||||
@Observed
|
||||
export class SimPacket {
|
||||
firstSendHost: SimHost;
|
||||
sendHost: SimBase;
|
||||
targetHost: SimBase;
|
||||
sourceMac: string; // 源主机mac地址
|
||||
sourceIp: string; // 源主机ip地址
|
||||
targetMac: string; // 目的主机mac地址
|
||||
targetIp: string; // 目的主机ip地址
|
||||
message: string; // 数据包内容
|
||||
size: number; // 数据包大小
|
||||
allSimObj: SimBase[];
|
||||
allSimPacket: SimPacket[];
|
||||
id: symbol; // 使用symbol()生成数据包对象唯一标识
|
||||
upJump: any; // 上一跳连接对象,可以根据具体类型定义
|
||||
points: number[][]; // 路径点
|
||||
level: number; // 数据包展示优先级
|
||||
constructor(firstSendHost: SimHost, sendHost: SimBase, sourceMac: string, sourceIp: string, targetMac: string, targetIp: string, message: string, size: number, allSimObj: SimBase[], allSimPacket: SimPacket[]) {
|
||||
this.firstSendHost = firstSendHost;
|
||||
this.sendHost = sendHost;
|
||||
this.sourceMac = sourceMac;
|
||||
this.sourceIp = sourceIp;
|
||||
this.targetMac = targetMac;
|
||||
this.targetIp = targetIp;
|
||||
this.message = message;
|
||||
this.size = size;
|
||||
this.allSimObj = allSimObj;
|
||||
this.allSimPacket = allSimPacket;
|
||||
this.id = Symbol();
|
||||
this.upJump = null;
|
||||
this.points = [];
|
||||
}
|
||||
}
|
||||
@Observed
|
||||
export class SimConnect {
|
||||
nObjS: SimBase | null; // 线一端节点S
|
||||
nObjE: SimBase | null; // 线一端节点E
|
||||
ifsS: number; // 线一端节点S的端口
|
||||
ifsE: number; // 线一端节点E的端口
|
||||
width: number; // 线的粗细
|
||||
configCorrect: boolean; // 配置正确与否
|
||||
constructor(nobjs: SimBase | null, nobje: SimBase | null, ifss: number, ifse: number) {
|
||||
this.nObjS = nobjs;
|
||||
this.nObjE = nobje;
|
||||
this.ifsS = ifss;
|
||||
this.ifsE = ifse;
|
||||
if (nobjs != null && nobje != null) {
|
||||
this.configCorrect = true;
|
||||
}
|
||||
else {
|
||||
this.configCorrect = false;
|
||||
}
|
||||
this.width = this.configCorrect === false ? 1 : 4;
|
||||
}
|
||||
updateObjConn() {
|
||||
this.nObjS.interface[this.ifsS - 1] = this.nObjE.objID;
|
||||
this.nObjE.interface[this.ifsE - 1] = this.nObjS.objID;
|
||||
} // 更新仿真对象的接口信息
|
||||
deleteObjConn() {
|
||||
this.nObjS.interface[this.ifsS - 1] = null;
|
||||
this.nObjE.interface[this.ifsE - 1] = null;
|
||||
} // 删除仿真对象的接口信息
|
||||
equals(other: any): boolean {
|
||||
if (other instanceof SimConnect) {
|
||||
const otherIdS = other.nObjS.objID;
|
||||
const otherIdE = other.nObjE.objID;
|
||||
return this.nObjS.objID == otherIdS && this.nObjE.objID == otherIdE;
|
||||
}
|
||||
return false;
|
||||
} // 判断两个连接线是否相同
|
||||
}
|
||||
@Observed
|
||||
export class SimHost extends SimBase {
|
||||
isOnline: boolean = false; // 主机联网状态
|
||||
port: number;
|
||||
appAddr: string;
|
||||
macData: macData;
|
||||
ipData: ipData;
|
||||
transData: transData;
|
||||
appData: appData;
|
||||
constructor(x: number, y: number, type: number = 1) {
|
||||
super(x, y, type);
|
||||
this.objLabel = this.setDefaultName();
|
||||
this.ip = "";
|
||||
this.mac = "";
|
||||
this.img = { "id": 16777226, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 主机图片
|
||||
this.imgTm = { "id": 16777230, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 主机配置成功图片
|
||||
this.interface = [null]; // 主机只有一个接口
|
||||
this.connections = [null]; // 一个接口对应一根连接线
|
||||
this.port = 8080;
|
||||
this.appAddr = this.ip + ":" + this.port;
|
||||
}
|
||||
setDefaultName() {
|
||||
return `SHO${++SimBase.flag}`;
|
||||
} // 生成组件默认名称
|
||||
onlineSwitch() {
|
||||
this.isOnline = !this.isOnline;
|
||||
} // 切换联网状态
|
||||
createPacket(mac: string, ip: string, message: string, allSimObj: SimBase[], allSimPacket: SimPacket[]) {
|
||||
let isNewPacket: number = AppStorage.get("isNewPacket");
|
||||
console.log(isNewPacket.toString());
|
||||
AppStorage.set("isNewPacket", isNewPacket + 1);
|
||||
isNewPacket = AppStorage.get("isNewPacket");
|
||||
console.log(isNewPacket.toString());
|
||||
let packet = new SimPacket(this, this as SimBase, this.mac, this.ip, mac, ip, message, 1024, allSimObj, allSimPacket);
|
||||
packet.level = 1;
|
||||
packet.points.push([this.objX, this.objY]);
|
||||
packet.allSimPacket.push(packet);
|
||||
updatePacketLog(`主机-${this.objLabel}创建数据包成功,信息为[${packet.message}]!`);
|
||||
this.send(packet);
|
||||
} // 创建数据包
|
||||
createAppPacket(appPackSize: number, appPackTag: string, sourceAppAddr: string, targetAppAddr: string): AppData | null {
|
||||
let appPacket = new AppData(this.objID, this.objLabel, appPackSize, appPackTag, sourceAppAddr, targetAppAddr);
|
||||
if (appPacket.isValid(sourceAppAddr, targetAppAddr)) {
|
||||
appPacket.pack();
|
||||
updatePacketLog(`主机-${this.objLabel}创建应用层数据包成功,信息为[${appPacket.appPackTag}]!`);
|
||||
return appPacket;
|
||||
}
|
||||
console.log(`主机-${this.objLabel}创建数据包失败!`);
|
||||
return null;
|
||||
} // 创建应用层数据包
|
||||
createTransPackets(appPackSize: number, appPackTag: string, sourcePort: number, targetPort: number, sourceAppAddr: string, targetAppAddr: string): TransData[] | null {
|
||||
const appPacket = this.createAppPacket(appPackSize, appPackTag, sourceAppAddr, targetAppAddr);
|
||||
let transPacket = new TransData(appPacket.objId, appPacket.objLabel, 1, appPacket.appPackTag, appPacket.appPackId, sourcePort, targetPort, appPacket.sourceAppAddr, appPacket.targetAppAddr);
|
||||
if (transPacket.isValid(sourcePort, targetPort)) {
|
||||
let transSplitedPackets = transPacket.pack();
|
||||
let numbers = transSplitedPackets.length;
|
||||
updatePacketLog(`主机-${this.objLabel}创建传输层数据包成功,并成功分割为${numbers}个,信息为[${transPacket.transTag}]!`);
|
||||
return transSplitedPackets;
|
||||
}
|
||||
console.log(`主机-${this.objLabel}创建数据包失败!`);
|
||||
return null;
|
||||
} // 创建传输层数据包
|
||||
createIpPacket(appPackSize: number, appPackTag: string, sourcePort: number, targetPort: number, targetIp: string, sourceAppAddr: string, targetAppAddr: string): IPData[] | null {
|
||||
const transPacketList = this.createTransPackets(appPackSize, appPackTag, sourcePort, targetPort, sourceAppAddr, targetAppAddr);
|
||||
let ipPacketList: IPData[] = [];
|
||||
for (let i = 0; i < transPacketList.length; i++) {
|
||||
let ipPacket = new IPData(transPacketList[i].objId, transPacketList[i].objLabel, transPacketList[i].transPackId, this.ip, targetIp, transPacketList[i].sourceAppAddr, transPacketList[i].targetAppAddr);
|
||||
if (ipPacket.isValid(this.ip, targetIp)) {
|
||||
ipPacket.pack();
|
||||
updatePacketLog(`主机-${this.objLabel}创建网络层数据包成功,信息为[${transPacketList[i].transTag}]!`);
|
||||
ipPacketList.push(ipPacket);
|
||||
}
|
||||
}
|
||||
if (ipPacketList) {
|
||||
return ipPacketList;
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}创建数据包失败!`);
|
||||
return null;
|
||||
}
|
||||
} // 创建网络层数据包
|
||||
createMacPacket(allSimObj: SimBase[], allSimPacket: SimPacket[], appPackSize: number, appPackTag: string, sourcePort: number, targetPort: number, targetMac: string, targetIp: string, sourceAppAddr: string, targetAppAddr: string): MACData[] | null {
|
||||
const ipPacketList = this.createIpPacket(appPackSize, appPackTag, sourcePort, targetPort, targetIp, sourceAppAddr, targetAppAddr);
|
||||
let macPacketList: MACData[] = [];
|
||||
for (let i = 0; i < ipPacketList.length; i++) {
|
||||
let macPacket = new MACData(ipPacketList[i].objId, ipPacketList[i].objLabel, ipPacketList[i].ipPackId, this.mac, targetMac, ipPacketList[i].sourceIp, ipPacketList[i].targetIp, ipPacketList[i].sourceAppAddr, ipPacketList[i].targetAppAddr);
|
||||
if (macPacket.isValid(this.mac, targetMac)) {
|
||||
macPacket.pack();
|
||||
updatePacketLog(`主机-${this.objLabel}创建链路层数据包成功,信息为[${appPackTag}]!`);
|
||||
macPacketList.push(macPacket);
|
||||
}
|
||||
}
|
||||
if (macPacketList) {
|
||||
this.createPacket(targetMac, targetIp, appPackTag, allSimObj, allSimPacket);
|
||||
return macPacketList;
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}创建数据包失败!`);
|
||||
return null;
|
||||
}
|
||||
} // 创建链路层数据包
|
||||
createPhysicsPacket(allSimObj: SimBase[], allSimPacket: SimPacket[], appPackSize: number, appPackTag: string, sourcePort: number, targetPort: number, targetMac: string, targetIp: string, sourceAppAddr: string, targetAppAddr: string): boolean {
|
||||
if (this.createMacPacket(allSimObj, allSimPacket, appPackSize, appPackTag, sourcePort, targetPort, targetMac, targetIp, sourceAppAddr, targetAppAddr)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} // 创建物理层数据包
|
||||
receive(packet: SimPacket) {
|
||||
if (packet.targetIp == this.ip && packet.targetMac == this.mac) {
|
||||
let isNewPacketArrived: number = AppStorage.get("isNewPacketArrived");
|
||||
console.log(isNewPacketArrived.toString());
|
||||
AppStorage.set("isNewPacketArrived", isNewPacketArrived + 1);
|
||||
isNewPacketArrived = AppStorage.get("isNewPacketArrived");
|
||||
console.log(isNewPacketArrived.toString());
|
||||
packet.points.push([this.objX, this.objY]);
|
||||
updatePacketLog(`主机-${this.objLabel}链路层获取数据包成功,信息为[${packet.message}]!`);
|
||||
updatePacketLog(`主机-${this.objLabel}网络层获取数据包成功,信息为[${packet.message}]!`);
|
||||
updatePacketLog(`主机-${this.objLabel}传输层获取数据包成功,信息为[${packet.message}]!`);
|
||||
updatePacketLog(`主机-${this.objLabel}应用层获取数据包成功,信息为[${packet.message}]!`);
|
||||
updatePacketLog(`主机-${this.objLabel}获取数据包成功,信息为[${packet.message}]!`);
|
||||
}
|
||||
else {
|
||||
console.log(`主机${this.objLabel}获取数据包失败!`);
|
||||
}
|
||||
} // 接收数据包
|
||||
receiveMacPacket(packet: SimPacket, macPacket: MACData) {
|
||||
if (macPacket.targetMac == this.mac && macPacket.targetIp == this.ip) {
|
||||
this.receive(packet);
|
||||
macPacket.unPack(this);
|
||||
updatePacketLog(`主机-${this.objLabel}获取链路层数据包成功,信息为[${this.macData.toString}]!`);
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}链路层数据包解包失败!`);
|
||||
}
|
||||
} // 接收链路层数据包
|
||||
receiveIpPacket(packet: SimPacket, macPacket: MACData, ipPacket: IPData) {
|
||||
if (ipPacket.targetIp == this.ip && macPacket.targetMac == this.mac) {
|
||||
this.receiveMacPacket(packet, macPacket);
|
||||
ipPacket.unpack(this);
|
||||
updatePacketLog(`主机-${this.objLabel}获取网络层数据包成功,信息为[${this.ipData.toString}]!`);
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}网络层数据包解包失败!`);
|
||||
}
|
||||
} // 接收网络层数据包
|
||||
receiveTransPacket(packet: SimPacket, macPacket: MACData, ipPacket: IPData, transPacket: TransData) {
|
||||
if (transPacket.targetPort == this.port && ipPacket.targetIp == this.ip && macPacket.targetMac == this.mac) {
|
||||
this.receiveIpPacket(packet, macPacket, ipPacket);
|
||||
transPacket.unPack(this);
|
||||
updatePacketLog(`主机-${this.objLabel}获取传输层数据包成功,信息为[${this.transData.toString}]!`);
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}传输层数据包解包失败!`);
|
||||
}
|
||||
} // 接收传输层数据包
|
||||
receiveAppPacket(packet: SimPacket, macPacket: MACData, ipPacket: IPData, transPacket: TransData, appPacket: AppData) {
|
||||
if (appPacket.targetAppAddr == this.appAddr && transPacket.targetPort == this.port && ipPacket.targetIp == this.ip && macPacket.targetMac == this.mac) {
|
||||
this.receiveTransPacket(packet, macPacket, ipPacket, transPacket);
|
||||
updatePacketLog(`主机-${this.objLabel}获取应用层数据包成功,信息为[${this.appData.toString}]!`);
|
||||
}
|
||||
else {
|
||||
console.log(`主机-${this.objLabel}应用层数据包解包失败!`);
|
||||
}
|
||||
} // 接收应用层数据包
|
||||
send(packet: SimPacket) {
|
||||
const connObj: symbol = this.objID;
|
||||
packet.upJump = connObj;
|
||||
updatePacketLog(`主机-${this.objLabel}发送数据包成功,信息为[${packet.message}]!`);
|
||||
if (packet.allSimObj.find(item => item.objID === this.interface[0]) != undefined) {
|
||||
packet.allSimObj.find(item => item.objID === this.interface[0]).receive(packet);
|
||||
}
|
||||
// console.log("packet.targetIp:" + packet.targetIp)
|
||||
} // 发送数据包
|
||||
}
|
||||
@Observed
|
||||
export class SimRouter extends SimBase {
|
||||
constructor(x: number, y: number, type: number = 2) {
|
||||
super(x, y, type);
|
||||
this.objLabel = this.setDefaultName();
|
||||
this.ip = "";
|
||||
this.mac = "";
|
||||
this.img = { "id": 16777229, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 路由器图片
|
||||
this.imgTm = { "id": 16777233, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 路由器配置成功图片
|
||||
this.interface = [null, null, null, null]; // 路由器有四个接口
|
||||
this.connections = [null, null, null, null]; // 四个接口对应四根连接线
|
||||
this.routerTable = [];
|
||||
}
|
||||
setDefaultName() {
|
||||
return `SRO${++SimBase.flag}`;
|
||||
} // 生成组件默认名称
|
||||
checkDestinationIp(destinationIp: string, network: string): boolean {
|
||||
// 解析目标 IP 和网络地址
|
||||
const [networkAddress, subnetMask] = network.split('/');
|
||||
// 分解目标 IP 地址和网络地址为数组
|
||||
const destinationIpParts = destinationIp.split('.');
|
||||
const networkAddressParts = networkAddress.split('.');
|
||||
// 计算目标 IP 的网络地址(根据子网掩码)
|
||||
const calculatedNetworkAddressParts = destinationIpParts.map((part, index) => {
|
||||
return parseInt(part) & parseInt(networkAddressParts[index]);
|
||||
});
|
||||
// 构建目标 IP 的网络地址和网络地址的比较字符串
|
||||
const calculatedNetworkAddress = calculatedNetworkAddressParts.join('.');
|
||||
const inputNetworkAddress = networkAddressParts.join('.');
|
||||
// 比较目标 IP 的网络地址和给定的网络地址是否相同,并检查是否在同一网络范围内
|
||||
return calculatedNetworkAddress === inputNetworkAddress && subnetMask === '24';
|
||||
} // 检查目标ip是否属于指定的网段范围内
|
||||
receive(packet: SimPacket) {
|
||||
updatePacketLog(`路由器-${this.objLabel}接受到数据,将进行转发!`);
|
||||
packet.points.push([this.objX, this.objY]);
|
||||
try {
|
||||
this.checkDestinationIp(packet.targetIp, this.ip);
|
||||
}
|
||||
catch (e) {
|
||||
console.log("packet router err:" + JSON.stringify(e));
|
||||
}
|
||||
this.transmit(packet);
|
||||
} // 接收数据包
|
||||
transmit(packet: SimPacket) {
|
||||
let flag = 0;
|
||||
this.interface.forEach((item: symbol) => {
|
||||
let obj = packet.allSimObj.find(obj => obj.objID === item); // 当前遍历到的接口对应的仿真对象
|
||||
let objUpJump = packet.allSimObj.find(objUpJump => objUpJump.objID === packet.upJump); // 当前数据包的上一跳仿真对象
|
||||
if (item != null) {
|
||||
// console.log(String(obj != objUpJump) + " " + String(this.routerTable.some(table => {
|
||||
// return table.net === packet.targetIp // && obj.objID === this.interface[table.port-1]
|
||||
// })) + " " + String(packet.targetIp))
|
||||
if (item != packet.upJump && this.routerTable.some(table => {
|
||||
return table.net === packet.targetIp && obj.objID === this.interface[table.port - 1];
|
||||
})) {
|
||||
const pac = new SimPacket(packet.firstSendHost, objUpJump, packet.sourceMac, packet.sourceIp, packet.targetMac, packet.targetIp, packet.message, 1024, packet.allSimObj, packet.allSimPacket);
|
||||
pac.level = packet.level + 1;
|
||||
pac.upJump = this.objID;
|
||||
pac.points.push([this.objX, this.objY]);
|
||||
packet.allSimPacket.push(pac);
|
||||
obj.receive(pac);
|
||||
flag++;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
updatePacketLog(`路由器-${this.objLabel}找不到对应端口进行转发!`);
|
||||
}
|
||||
} // 转发数据包
|
||||
getTableConfig(): string {
|
||||
let str = "";
|
||||
const routerTables = this.routerTable;
|
||||
for (let router of routerTables) {
|
||||
str += `接口号: ${router['node_ifs']}\n`;
|
||||
str += `网段号: ${router['segment']}\n`;
|
||||
}
|
||||
return str;
|
||||
} // 获取路由表配置信息用于展示
|
||||
}
|
||||
@Observed
|
||||
export class SimSwitch extends SimBase {
|
||||
constructor(x: number, y: number, type: number = 3) {
|
||||
super(x, y, type);
|
||||
this.objLabel = this.setDefaultName();
|
||||
this.mac = "";
|
||||
this.img = { "id": 16777232, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 交换机图片
|
||||
this.imgTm = { "id": 16777227, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 交换机配置成功图片
|
||||
this.interface = [null, null, null, null]; // 路由器有四个接口
|
||||
this.connections = [null, null, null, null]; // 四个接口对应四根连接线
|
||||
this.switchTable = [];
|
||||
}
|
||||
setDefaultName() {
|
||||
return `SSW${++SimBase.flag}`;
|
||||
} // 生成组件默认名称
|
||||
receive(packet: SimPacket) {
|
||||
updatePacketLog(`交换机-${this.objLabel}接受到数据,将进行转发!`);
|
||||
packet.points.push([this.objX, this.objY]);
|
||||
this.transmit(packet);
|
||||
} // 接收数据包
|
||||
transmit(packet: SimPacket) {
|
||||
this.interface.forEach((item: symbol) => {
|
||||
let obj = packet.allSimObj.find(obj => obj.objID === item);
|
||||
let objUpJump = packet.allSimObj.find(objUpJump => objUpJump.objID === packet.upJump);
|
||||
if (item != null) {
|
||||
if (item != packet.upJump && this.switchTable.some(table => table.net === packet.targetMac)) {
|
||||
const pac = new SimPacket(packet.firstSendHost, objUpJump, packet.sourceMac, packet.sourceIp, packet.targetMac, packet.targetIp, packet.message, 1024, packet.allSimObj, packet.allSimPacket);
|
||||
pac.level = packet.level + 1;
|
||||
pac.upJump = this.objID;
|
||||
pac.points.push([this.objX, this.objY]);
|
||||
packet.allSimPacket.push(pac);
|
||||
obj.receive(pac);
|
||||
}
|
||||
}
|
||||
});
|
||||
} // 转发数据包
|
||||
getTableConfig(): string {
|
||||
let str = "";
|
||||
const macTables = this.switchTable;
|
||||
for (const router of macTables) {
|
||||
str += `接口号: ${router['node_ifs']}\n`;
|
||||
str += `网段号: ${router['mac']}\n`;
|
||||
}
|
||||
return str;
|
||||
} // 获取交换机表配置信息用于展示
|
||||
}
|
||||
@Observed
|
||||
export class SimHub extends SimBase {
|
||||
constructor(x: number, y: number, type: number = 4) {
|
||||
super(x, y, type);
|
||||
this.objLabel = this.setDefaultName();
|
||||
this.img = { "id": 16777228, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 集线器图片
|
||||
this.imgTm = { "id": 16777225, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" }; // 集线器配置成功图片
|
||||
this.interface = [null, null, null, null]; // 路由器有四个接口
|
||||
this.connections = [null, null, null, null]; // 四个接口对应四根连接线
|
||||
}
|
||||
setDefaultName(): string {
|
||||
return `SHU${++SimBase.flag}`; // 生成组件默认名称
|
||||
}
|
||||
receive(packet: SimPacket) {
|
||||
updatePacketLog(`集线器-${this.objLabel}接受到数据,将进行转发!`);
|
||||
packet.points.push([this.objX, this.objY]);
|
||||
this.transmit(packet);
|
||||
} // 接收数据包
|
||||
transmit(packet: SimPacket): void {
|
||||
this.interface.forEach((item: symbol, index) => {
|
||||
let obj = packet.allSimObj.find(obj => obj.objID === item);
|
||||
let objUpJump = packet.allSimObj.find(objUpJump => objUpJump.objID === packet.upJump);
|
||||
if (item != null) {
|
||||
if (item != packet.upJump) {
|
||||
const pac = new SimPacket(packet.firstSendHost, objUpJump, packet.sourceMac, packet.sourceIp, packet.targetMac, packet.targetIp, packet.message, 1024, packet.allSimObj, packet.allSimPacket);
|
||||
pac.level = packet.level + 1;
|
||||
pac.upJump = this.objID;
|
||||
pac.points.push([this.objX, this.objY]);
|
||||
packet.allSimPacket.push(pac);
|
||||
obj.receive(pac);
|
||||
}
|
||||
}
|
||||
});
|
||||
} // 转发数据包
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.protoBin
vendored
Normal file
Binary file not shown.
46
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.ts
vendored
Normal file
46
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.ts
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import type { SimPacket } from "./OtherSimObjects";
|
||||
import type { MACData } from "../classes/Datas";
|
||||
// 路由表和mac表项
|
||||
export interface Table {
|
||||
port: number; // 设备哪个端口
|
||||
net: string; // 连接哪个网络或设备(下一跳可到达网段或设备mac地址)
|
||||
}
|
||||
@Observed
|
||||
export class SimBase {
|
||||
static flag = 0; // 当前仿真对象数量
|
||||
objX: number; // x坐标
|
||||
objY: number; // y坐标
|
||||
objType: number | null; // 对象类型,1为主机,2为路由器,3为交换机,4为集线器
|
||||
objID: symbol; // 使用symbol()生成仿真对象唯一标识
|
||||
configCorrect: boolean; // 是否配置正确
|
||||
isChose: boolean; // 是否被选中
|
||||
objLabel: string; // 对象标签
|
||||
ip: string | null; // ip地址
|
||||
mac: string | null; // mac地址
|
||||
img: Resource | null; // 仿真对象图片
|
||||
imgTm: Resource | null; // 仿真对象配置成功图片
|
||||
interface: Array<symbol | null>; // 接口网络配置信息
|
||||
connections: Array<any>; // 连接线对象
|
||||
routerTable: Array<Table> | null; // 路由表
|
||||
switchTable: Array<Table> | null; // 交换表
|
||||
constructor(x: number, y: number, type: number) {
|
||||
this.objX = x;
|
||||
this.objY = y;
|
||||
this.objType = type;
|
||||
this.objID = Symbol();
|
||||
this.configCorrect = false;
|
||||
this.isChose = false;
|
||||
}
|
||||
receive(packet: SimPacket) {
|
||||
} // 接收数据包
|
||||
createPacket(mac: string, ip: string, message: string, allSimObj: SimBase[], allSimPacket: SimPacket[]) {
|
||||
} // 创建数据包
|
||||
createMacPacket(allSimObj: SimBase[], allSimPacket: SimPacket[], appPackSize: number, appPackTag: string, sourcePort: number, targetPort: number, targetMac: string, targetIp: string, sourceAppAddr: string, targetAppAddr: string): MACData[] | null {
|
||||
return;
|
||||
} // 创建链路层数据包
|
||||
transmit(packet: SimPacket) {
|
||||
} // 转发数据包
|
||||
changeIsChose() {
|
||||
this.isChose = !this.isChose;
|
||||
}
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.protoBin
vendored
Normal file
Binary file not shown.
16
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.ts
vendored
Normal file
16
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.ts
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
export class TopMenu {
|
||||
title: string;
|
||||
menuItemArr: TopMenuItem[] | undefined;
|
||||
constructor(title: string, menuItemArr?: TopMenuItem[]) {
|
||||
this.title = title;
|
||||
this.menuItemArr = menuItemArr;
|
||||
}
|
||||
} // 顶部菜单类
|
||||
export class TopMenuItem {
|
||||
title: string;
|
||||
fun: Function | undefined;
|
||||
constructor(title: string, fun?: Function) {
|
||||
this.title = title;
|
||||
this.fun = fun;
|
||||
}
|
||||
} // 顶部菜单选项类
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.protoBin
vendored
Normal file
Binary file not shown.
263
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.ts
vendored
Normal file
263
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.ts
vendored
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
interface BottomMenuBar_Params {
|
||||
simClickObjArr?: SimClickObj[];
|
||||
allSimObj?: SimBase[] // 仿真对象数组
|
||||
;
|
||||
isNewObj?: boolean // 是否新增对象
|
||||
;
|
||||
newObjType?: number // 新增对象类型
|
||||
;
|
||||
choseIndex?: number | null // 选中对象下标
|
||||
;
|
||||
TempConn?: any[] // 是否正在新增连接线
|
||||
;
|
||||
isNewConn?: boolean // 选中连接线下标
|
||||
;
|
||||
scroller?: Scroller;
|
||||
logText?: string;
|
||||
}
|
||||
import type { SimBase } from "../classes/SimBase";
|
||||
interface SimClickObj {
|
||||
name: string;
|
||||
image: Resource;
|
||||
type: number;
|
||||
}
|
||||
export class BottomMenuBar extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.simClickObjArr = [
|
||||
{
|
||||
name: "主机",
|
||||
image: { "id": 16777226, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" },
|
||||
type: 1
|
||||
},
|
||||
{
|
||||
name: "路由器",
|
||||
image: { "id": 16777229, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" },
|
||||
type: 2
|
||||
},
|
||||
{
|
||||
name: "交换器",
|
||||
image: { "id": 16777232, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" },
|
||||
type: 3
|
||||
},
|
||||
{
|
||||
name: "集线器",
|
||||
image: { "id": 16777228, "type": 20000, params: [], "bundleName": "com.example.ensp_fourteen", "moduleName": "entry" },
|
||||
type: 4
|
||||
},
|
||||
] // 底部菜单栏数组
|
||||
;
|
||||
this.__allSimObj = this.initializeConsume("allSimObj", "allSimObj");
|
||||
this.__isNewObj = this.initializeConsume("isNewObj", "isNewObj");
|
||||
this.__newObjType = this.initializeConsume("newObjType", "newObjType");
|
||||
this.__choseIndex = this.initializeConsume("choseIndex", "choseIndex");
|
||||
this.__TempConn = this.initializeConsume("TempConn", "TempConn");
|
||||
this.__isNewConn = this.initializeConsume("isNewConn", "isNewConn");
|
||||
this.scroller = new Scroller();
|
||||
this.__logText = this.createStorageLink("LogText", "", "logText");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: BottomMenuBar_Params) {
|
||||
if (params.simClickObjArr !== undefined) {
|
||||
this.simClickObjArr = params.simClickObjArr;
|
||||
}
|
||||
if (params.scroller !== undefined) {
|
||||
this.scroller = params.scroller;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: BottomMenuBar_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__allSimObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isNewObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__newObjType.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__choseIndex.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__TempConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isNewConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__logText.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__allSimObj.aboutToBeDeleted();
|
||||
this.__isNewObj.aboutToBeDeleted();
|
||||
this.__newObjType.aboutToBeDeleted();
|
||||
this.__choseIndex.aboutToBeDeleted();
|
||||
this.__TempConn.aboutToBeDeleted();
|
||||
this.__isNewConn.aboutToBeDeleted();
|
||||
this.__logText.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private simClickObjArr: SimClickObj[]; // 底部菜单栏数组
|
||||
private __allSimObj: ObservedPropertyAbstractPU<SimBase[]>; // 仿真对象数组
|
||||
get allSimObj() {
|
||||
return this.__allSimObj.get();
|
||||
}
|
||||
set allSimObj(newValue: SimBase[] // 仿真对象数组
|
||||
) {
|
||||
this.__allSimObj.set(newValue);
|
||||
}
|
||||
private __isNewObj: ObservedPropertyAbstractPU<boolean>; // 是否新增对象
|
||||
get isNewObj() {
|
||||
return this.__isNewObj.get();
|
||||
}
|
||||
set isNewObj(newValue: boolean // 是否新增对象
|
||||
) {
|
||||
this.__isNewObj.set(newValue);
|
||||
}
|
||||
private __newObjType: ObservedPropertyAbstractPU<number>; // 新增对象类型
|
||||
get newObjType() {
|
||||
return this.__newObjType.get();
|
||||
}
|
||||
set newObjType(newValue: number // 新增对象类型
|
||||
) {
|
||||
this.__newObjType.set(newValue);
|
||||
}
|
||||
private __choseIndex: ObservedPropertyAbstractPU<number | null>; // 选中对象下标
|
||||
get choseIndex() {
|
||||
return this.__choseIndex.get();
|
||||
}
|
||||
set choseIndex(newValue: number | null // 选中对象下标
|
||||
) {
|
||||
this.__choseIndex.set(newValue);
|
||||
}
|
||||
private __TempConn: ObservedPropertyAbstractPU<any[]>; // 是否正在新增连接线
|
||||
get TempConn() {
|
||||
return this.__TempConn.get();
|
||||
}
|
||||
set TempConn(newValue: any[] // 是否正在新增连接线
|
||||
) {
|
||||
this.__TempConn.set(newValue);
|
||||
}
|
||||
private __isNewConn: ObservedPropertyAbstractPU<boolean>; // 选中连接线下标
|
||||
get isNewConn() {
|
||||
return this.__isNewConn.get();
|
||||
}
|
||||
set isNewConn(newValue: boolean // 选中连接线下标
|
||||
) {
|
||||
this.__isNewConn.set(newValue);
|
||||
}
|
||||
private scroller: Scroller;
|
||||
private __logText: ObservedPropertyAbstractPU<string>;
|
||||
get logText() {
|
||||
return this.__logText.get();
|
||||
}
|
||||
set logText(newValue: string) {
|
||||
this.__logText.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create({ space: 10 });
|
||||
Row.debugLine("components/ButtomMenuBar.ets(44:5)");
|
||||
Row.layoutWeight(1);
|
||||
Row.margin({ left: '5%' });
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/ButtomMenuBar.ets(46:9)");
|
||||
Column.margin({ top: 5 });
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Image.create(item.image);
|
||||
Image.debugLine("components/ButtomMenuBar.ets(47:11)");
|
||||
Image.border({
|
||||
color: item.type == this.newObjType && this.isNewObj ? Color.Red : Color.Transparent,
|
||||
width: 1
|
||||
});
|
||||
Image.width(50);
|
||||
Image.onClick(() => {
|
||||
this.isNewConn = false;
|
||||
this.TempConn = [];
|
||||
if (!this.isNewObj) { // 选择创建对象
|
||||
this.isNewObj = true;
|
||||
this.newObjType = item.type;
|
||||
}
|
||||
else if (this.newObjType != item.type) { // 选择创建其他对象
|
||||
this.newObjType = item.type;
|
||||
}
|
||||
else { // 取消选择
|
||||
this.isNewObj = false;
|
||||
this.newObjType = -1;
|
||||
}
|
||||
this.allSimObj.forEach(item => {
|
||||
item.isChose = false;
|
||||
}); // 创建对象时必须全部设置为非选中状态
|
||||
this.choseIndex = null;
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
Image.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create(item.name);
|
||||
Text.debugLine("components/ButtomMenuBar.ets(70:11)");
|
||||
Text.fontWeight(FontWeight.Bold);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.simClickObjArr, forEachItemGenFunction);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
ForEach.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Scroll.create(this.scroller);
|
||||
Scroll.debugLine("components/ButtomMenuBar.ets(76:7)");
|
||||
Scroll.border({
|
||||
color: Color.Black,
|
||||
width: 1
|
||||
});
|
||||
Scroll.layoutWeight(1);
|
||||
Scroll.height('100%');
|
||||
Scroll.margin(2);
|
||||
if (!isInitialRender) {
|
||||
Scroll.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create(this.logText);
|
||||
Text.debugLine("components/ButtomMenuBar.ets(77:9)");
|
||||
Text.fontSize(15);
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Scroll.pop();
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.protoBin
vendored
Normal file
Binary file not shown.
1513
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.ts
vendored
Normal file
1513
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.protoBin
vendored
Normal file
Binary file not shown.
1313
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.ts
vendored
Normal file
1313
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.protoBin
vendored
Normal file
Binary file not shown.
498
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.ts
vendored
Normal file
498
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.ts
vendored
Normal file
|
|
@ -0,0 +1,498 @@
|
|||
interface targetHost_Params {
|
||||
simPacket?: SimPacket;
|
||||
host?: string;
|
||||
}
|
||||
interface sendHost_Params {
|
||||
simPacket?: SimPacket;
|
||||
}
|
||||
interface TableChart_Params {
|
||||
simObj?: SimBase;
|
||||
}
|
||||
interface NetworkChart_Params {
|
||||
simObj?: SimBase;
|
||||
}
|
||||
import type { SimPacket } from '../classes/OtherSimObjects';
|
||||
import type { SimBase, Table } from '../classes/SimBase';
|
||||
export class NetworkChart extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__simObj = new SynchedPropertyNesedObjectPU(params.simObj, this, "simObj");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: NetworkChart_Params) {
|
||||
this.__simObj.set(params.simObj);
|
||||
}
|
||||
updateStateVars(params: NetworkChart_Params) {
|
||||
this.__simObj.set(params.simObj);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__simObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__simObj.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __simObj: SynchedPropertyNesedObjectPU<SimBase>;
|
||||
get simObj() {
|
||||
return this.__simObj.get();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(9:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
If.create();
|
||||
if (this.simObj.objType == 1 || this.simObj.objType == 2) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(11:9)");
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("IP地址:" + this.simObj.ip);
|
||||
Text.debugLine("components/Table.ets(12:11)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("Mac地址:" + this.simObj.mac);
|
||||
Text.debugLine("components/Table.ets(14:11)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
});
|
||||
}
|
||||
else if (this.simObj.objType == 3) {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(17:9)");
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("Mac地址:" + this.simObj.mac);
|
||||
Text.debugLine("components/Table.ets(18:11)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(2, () => {
|
||||
});
|
||||
}
|
||||
if (!isInitialRender) {
|
||||
If.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
export class TableChart extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__simObj = new SynchedPropertyNesedObjectPU(params.simObj, this, "simObj");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: TableChart_Params) {
|
||||
this.__simObj.set(params.simObj);
|
||||
}
|
||||
updateStateVars(params: TableChart_Params) {
|
||||
this.__simObj.set(params.simObj);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__simObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__simObj.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __simObj: SynchedPropertyNesedObjectPU<SimBase>;
|
||||
get simObj() {
|
||||
return this.__simObj.get();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(32:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
If.create();
|
||||
if (this.simObj.objType == 2) {
|
||||
this.ifElseBranchUpdateFunction(0, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("components/Table.ets(35:11)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("端口" + item.port.toString() + ":");
|
||||
Text.debugLine("components/Table.ets(36:13)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create(item.net);
|
||||
Text.debugLine("components/Table.ets(38:13)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.simObj.routerTable, forEachItemGenFunction);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
ForEach.pop();
|
||||
});
|
||||
}
|
||||
else if (this.simObj.objType == 3) {
|
||||
this.ifElseBranchUpdateFunction(1, () => {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("components/Table.ets(43:11)");
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("端口" + item.port.toString() + ":");
|
||||
Text.debugLine("components/Table.ets(44:13)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create(item.net);
|
||||
Text.debugLine("components/Table.ets(46:13)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Row.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, this.simObj.switchTable, forEachItemGenFunction);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
ForEach.pop();
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.ifElseBranchUpdateFunction(2, () => {
|
||||
});
|
||||
}
|
||||
if (!isInitialRender) {
|
||||
If.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
If.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
export class sendHost extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__simPacket = new SynchedPropertyNesedObjectPU(params.simPacket, this, "simPacket");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: sendHost_Params) {
|
||||
this.__simPacket.set(params.simPacket);
|
||||
}
|
||||
updateStateVars(params: sendHost_Params) {
|
||||
this.__simPacket.set(params.simPacket);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__simPacket.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__simPacket.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __simPacket: SynchedPropertyNesedObjectPU<SimPacket>;
|
||||
get simPacket() {
|
||||
return this.__simPacket.get();
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(61:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("发送主机:" + this.simPacket.sendHost);
|
||||
Text.debugLine("components/Table.ets(62:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("IP地址:" + this.simPacket.targetIp);
|
||||
Text.debugLine("components/Table.ets(63:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("Mac地址;" + this.simPacket.targetMac);
|
||||
Text.debugLine("components/Table.ets(64:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("发送数据包大小:" + this.simPacket.size);
|
||||
Text.debugLine("components/Table.ets(65:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("已发送数据包数量:" + 1);
|
||||
Text.debugLine("components/Table.ets(66:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("需要发送的数据包总数:" + 1);
|
||||
Text.debugLine("components/Table.ets(67:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
export class targetHost extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__simPacket = new SynchedPropertyNesedObjectPU(params.simPacket, this, "simPacket");
|
||||
this.host = undefined;
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: targetHost_Params) {
|
||||
this.__simPacket.set(params.simPacket);
|
||||
if (params.host !== undefined) {
|
||||
this.host = params.host;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: targetHost_Params) {
|
||||
this.__simPacket.set(params.simPacket);
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__simPacket.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__simPacket.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __simPacket: SynchedPropertyNesedObjectPU<SimPacket>;
|
||||
get simPacket() {
|
||||
return this.__simPacket.get();
|
||||
}
|
||||
private host: string;
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("components/Table.ets(80:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("发送主机:" + this.host);
|
||||
Text.debugLine("components/Table.ets(81:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("IP地址:" + this.simPacket.targetIp);
|
||||
Text.debugLine("components/Table.ets(82:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("Mac地址;" + this.simPacket.targetMac);
|
||||
Text.debugLine("components/Table.ets(83:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("接收数据包大小:" + this.simPacket.size);
|
||||
Text.debugLine("components/Table.ets(84:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("已接收数据包数量:" + this.host);
|
||||
Text.debugLine("components/Table.ets(85:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Text.create("需要接收的数据包总数:" + this.host);
|
||||
Text.debugLine("components/Table.ets(86:7)");
|
||||
if (!isInitialRender) {
|
||||
Text.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Text.pop();
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.protoBin
vendored
Normal file
Binary file not shown.
531
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.ts
vendored
Normal file
531
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.ts
vendored
Normal file
|
|
@ -0,0 +1,531 @@
|
|||
interface TopMenuBar_Params {
|
||||
// 修改标签控制器
|
||||
reviseLabelController?: CustomDialogController;
|
||||
// 删除连接线控制器
|
||||
deleteLineController?: CustomDialogController;
|
||||
// 网络配置控制器
|
||||
NetworkController?: CustomDialogController;
|
||||
// 路由表配置配置器
|
||||
RouterController?: CustomDialogController;
|
||||
// 转换表配置控制器
|
||||
SwitchController?: CustomDialogController;
|
||||
// 数据包设置控制器
|
||||
PacketController?: CustomDialogController;
|
||||
// 批量数据包设置控制器
|
||||
BatchPacketController?: CustomDialogController;
|
||||
menuArr?: TopMenu[];
|
||||
allSimObj?: SimBase[] // 仿真对象数组
|
||||
;
|
||||
allSimConn?: SimConnect[] // 仿真连接线数组
|
||||
;
|
||||
TempConn?: any[] // 临时any数组
|
||||
;
|
||||
isNewObj?: boolean // 是否新增对象
|
||||
;
|
||||
newObjType?: number // 新增对象类型
|
||||
;
|
||||
choseIndex?: number | null // 选中对象下标
|
||||
;
|
||||
isShowLabel?: boolean // 是否显示标签
|
||||
;
|
||||
isShowPort?: boolean // 是否显示接口
|
||||
;
|
||||
isShowInterface?: boolean // 是否显示网络配置信息
|
||||
;
|
||||
isShowTable?: boolean // 是否显示路由/交换表信息
|
||||
;
|
||||
allSimPacket?: SimPacket[] // 单次数据包传输的集合
|
||||
;
|
||||
}
|
||||
import promptAction from "@ohos:promptAction";
|
||||
import type { SimBase } from "../classes/SimBase";
|
||||
import type { SimConnect, SimPacket } from "../classes/OtherSimObjects";
|
||||
import { TopMenu, TopMenuItem } from "@bundle:com.example.ensp_fourteen/entry/ets/classes/TopMenu";
|
||||
import { LabelRevise, LineDelete, NetworkConfig, RouterTableConfig, SwitchTableConfig, PacketSet, BatchPacketSet } from "@bundle:com.example.ensp_fourteen/entry/ets/components/Dialog";
|
||||
export class TopMenuBar extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.reviseLabelController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new LabelRevise(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 修改标签控制器
|
||||
reviseLabelController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.deleteLineController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new LineDelete(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 删除连接线控制器
|
||||
deleteLineController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.NetworkController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new NetworkConfig(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 网络配置控制器
|
||||
NetworkController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.RouterController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new RouterTableConfig(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 路由表配置配置器
|
||||
RouterController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.SwitchController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new SwitchTableConfig(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 转换表配置控制器
|
||||
SwitchController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.PacketController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new PacketSet(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 数据包设置控制器
|
||||
PacketController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.BatchPacketController = new CustomDialogController({
|
||||
builder: () => {
|
||||
let paramsLambda = () => {
|
||||
return {
|
||||
simObj: this.allSimObj[this.choseIndex]
|
||||
};
|
||||
};
|
||||
let jsDialog = new BatchPacketSet(this, { simObj: this.allSimObj[this.choseIndex] }, undefined, -1, paramsLambda);
|
||||
jsDialog.setController(this.
|
||||
// 批量数据包设置控制器
|
||||
BatchPacketController);
|
||||
ViewPU.create(jsDialog);
|
||||
}
|
||||
}, this);
|
||||
this.menuArr = [
|
||||
new TopMenu("删除与修改", [new TopMenuItem("删除对象", () => {
|
||||
if (this.choseIndex != null) {
|
||||
this.allSimConn = this.allSimConn.filter((item) => {
|
||||
if (this.allSimObj[this.choseIndex].objID === item.nObjE.objID || this.allSimObj[this.choseIndex].objID === item.nObjS.objID) {
|
||||
item.deleteObjConn(); // 删除线时应该先将线两端的设备的connection设置为null
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
this.allSimObj.splice(this.choseIndex, 1);
|
||||
this.isNewObj = false;
|
||||
this.newObjType = -1;
|
||||
this.choseIndex = null;
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请先选择要删除的对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
}), new TopMenuItem("删除连接线", () => {
|
||||
if (this.choseIndex != null) {
|
||||
this.deleteLineController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择要删除的连接线对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
}), new TopMenuItem("修改标签", () => {
|
||||
if (this.choseIndex != null) {
|
||||
this.reviseLabelController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择仿真对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
})]),
|
||||
new TopMenu("基础配置", [new TopMenuItem("网络配置", () => {
|
||||
if (this.choseIndex != null && (this.allSimObj[this.choseIndex].objType == 1 || this.allSimObj[this.choseIndex].objType == 2 || this.allSimObj[this.choseIndex].objType == 3)) {
|
||||
this.NetworkController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择正确对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
}), new TopMenuItem("路由器配置", () => {
|
||||
if (this.choseIndex != null && this.allSimObj[this.choseIndex].objType == 2) {
|
||||
this.RouterController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择路由器对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
}), new TopMenuItem("交换器配置", () => {
|
||||
if (this.choseIndex != null && this.allSimObj[this.choseIndex].objType == 3) {
|
||||
this.SwitchController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择交换机对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
})]),
|
||||
new TopMenu("显示设置", [new TopMenuItem("显示/不显示标签", () => {
|
||||
this.isShowLabel = !this.isShowLabel;
|
||||
}), new TopMenuItem("显示/不显示接口", () => {
|
||||
this.isShowPort = !this.isShowPort;
|
||||
}), new TopMenuItem("显示/不显示配置信息", () => {
|
||||
this.isShowInterface = !this.isShowInterface;
|
||||
}), new TopMenuItem("显示/不显示交换表信息", () => {
|
||||
this.isShowTable = !this.isShowTable;
|
||||
})]),
|
||||
new TopMenu("发送数据包", [new TopMenuItem("发送数据包", () => {
|
||||
if (this.choseIndex != null && this.allSimObj[this.choseIndex].objType == 1) {
|
||||
this.PacketController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择主机对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
}), new TopMenuItem("批量发送数据包", () => {
|
||||
if (this.choseIndex != null && this.allSimObj[this.choseIndex].objType == 1) {
|
||||
this.BatchPacketController.open();
|
||||
}
|
||||
else {
|
||||
promptAction.showToast({
|
||||
message: "请选择主机对象",
|
||||
duration: 3000,
|
||||
bottom: 50
|
||||
});
|
||||
}
|
||||
})]),
|
||||
new TopMenu("清除屏幕", [new TopMenuItem("清除屏幕", () => {
|
||||
this.allSimObj = [];
|
||||
this.allSimConn = [];
|
||||
this.TempConn = [];
|
||||
this.isNewObj = false;
|
||||
this.choseIndex = null;
|
||||
})])
|
||||
] // 顶部菜单栏数组
|
||||
;
|
||||
this.__allSimObj = this.initializeConsume("allSimObj", "allSimObj");
|
||||
this.__allSimConn = this.initializeConsume("allSimConn", "allSimConn");
|
||||
this.__TempConn = this.initializeConsume("TempConn", "TempConn");
|
||||
this.__isNewObj = this.initializeConsume("isNewObj", "isNewObj");
|
||||
this.__newObjType = this.initializeConsume("newObjType", "newObjType");
|
||||
this.__choseIndex = this.initializeConsume("choseIndex", "choseIndex");
|
||||
this.__isShowLabel = this.initializeConsume("isShowLabel", "isShowLabel");
|
||||
this.__isShowPort = this.initializeConsume("isShowPort", "isShowPort");
|
||||
this.__isShowInterface = this.initializeConsume("isShowInterface", "isShowInterface");
|
||||
this.__isShowTable = this.initializeConsume("isShowTable", "isShowTable");
|
||||
this.__allSimPacket = this.initializeConsume("allSimPacket", "allSimPacket");
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: TopMenuBar_Params) {
|
||||
if (params.reviseLabelController !== undefined) {
|
||||
this.reviseLabelController = params.reviseLabelController;
|
||||
}
|
||||
if (params.deleteLineController !== undefined) {
|
||||
this.deleteLineController = params.deleteLineController;
|
||||
}
|
||||
if (params.NetworkController !== undefined) {
|
||||
this.NetworkController = params.NetworkController;
|
||||
}
|
||||
if (params.RouterController !== undefined) {
|
||||
this.RouterController = params.RouterController;
|
||||
}
|
||||
if (params.SwitchController !== undefined) {
|
||||
this.SwitchController = params.SwitchController;
|
||||
}
|
||||
if (params.PacketController !== undefined) {
|
||||
this.PacketController = params.PacketController;
|
||||
}
|
||||
if (params.BatchPacketController !== undefined) {
|
||||
this.BatchPacketController = params.BatchPacketController;
|
||||
}
|
||||
if (params.menuArr !== undefined) {
|
||||
this.menuArr = params.menuArr;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: TopMenuBar_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__allSimObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__allSimConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__TempConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isNewObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__newObjType.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__choseIndex.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowLabel.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowPort.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowInterface.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowTable.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__allSimPacket.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__allSimObj.aboutToBeDeleted();
|
||||
this.__allSimConn.aboutToBeDeleted();
|
||||
this.__TempConn.aboutToBeDeleted();
|
||||
this.__isNewObj.aboutToBeDeleted();
|
||||
this.__newObjType.aboutToBeDeleted();
|
||||
this.__choseIndex.aboutToBeDeleted();
|
||||
this.__isShowLabel.aboutToBeDeleted();
|
||||
this.__isShowPort.aboutToBeDeleted();
|
||||
this.__isShowInterface.aboutToBeDeleted();
|
||||
this.__isShowTable.aboutToBeDeleted();
|
||||
this.__allSimPacket.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
// 修改标签控制器
|
||||
private reviseLabelController: CustomDialogController;
|
||||
// 删除连接线控制器
|
||||
private deleteLineController: CustomDialogController;
|
||||
// 网络配置控制器
|
||||
private NetworkController: CustomDialogController;
|
||||
// 路由表配置配置器
|
||||
private RouterController: CustomDialogController;
|
||||
// 转换表配置控制器
|
||||
private SwitchController: CustomDialogController;
|
||||
// 数据包设置控制器
|
||||
private PacketController: CustomDialogController;
|
||||
// 批量数据包设置控制器
|
||||
private BatchPacketController: CustomDialogController;
|
||||
MenuItem(menuItemArr: TopMenuItem[], parent = null) {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Menu.create();
|
||||
Menu.debugLine("components/TopMenuBar.ets(40:5)");
|
||||
if (!isInitialRender) {
|
||||
Menu.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
MenuItem.create({ content: item.title });
|
||||
MenuItem.debugLine("components/TopMenuBar.ets(42:9)");
|
||||
MenuItem.onChange(() => {
|
||||
if (item.fun) {
|
||||
item.fun();
|
||||
}
|
||||
});
|
||||
if (!isInitialRender) {
|
||||
MenuItem.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
MenuItem.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, menuItemArr, forEachItemGenFunction);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
ForEach.pop();
|
||||
Menu.pop();
|
||||
} // 顶部菜单栏按钮每小项
|
||||
MenuButton(menuArr: TopMenu[], parent = null) {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
ForEach.create();
|
||||
const forEachItemGenFunction = _item => {
|
||||
const item = _item;
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Button.createWithLabel(item.title);
|
||||
Button.debugLine("components/TopMenuBar.ets(55:7)");
|
||||
Button.type(ButtonType.Normal);
|
||||
Button.fontColor(Color.Black);
|
||||
Button.border({ color: Color.Black, width: 1 });
|
||||
Button.backgroundColor(Color.Transparent);
|
||||
Button.bindMenu({ builder: () => {
|
||||
this.MenuItem.call(this, item.menuItemArr);
|
||||
} });
|
||||
if (!isInitialRender) {
|
||||
Button.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
Button.pop();
|
||||
};
|
||||
this.forEachUpdateFunction(elmtId, menuArr, forEachItemGenFunction);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
ForEach.pop();
|
||||
} // 顶部菜单栏按钮
|
||||
private menuArr: TopMenu[]; // 顶部菜单栏数组
|
||||
private __allSimObj: ObservedPropertyAbstractPU<SimBase[]>; // 仿真对象数组
|
||||
get allSimObj() {
|
||||
return this.__allSimObj.get();
|
||||
}
|
||||
set allSimObj(newValue: SimBase[] // 仿真对象数组
|
||||
) {
|
||||
this.__allSimObj.set(newValue);
|
||||
}
|
||||
private __allSimConn: ObservedPropertyAbstractPU<SimConnect[]>; // 仿真连接线数组
|
||||
get allSimConn() {
|
||||
return this.__allSimConn.get();
|
||||
}
|
||||
set allSimConn(newValue: SimConnect[] // 仿真连接线数组
|
||||
) {
|
||||
this.__allSimConn.set(newValue);
|
||||
}
|
||||
private __TempConn: ObservedPropertyAbstractPU<any[]>; // 临时any数组
|
||||
get TempConn() {
|
||||
return this.__TempConn.get();
|
||||
}
|
||||
set TempConn(newValue: any[] // 临时any数组
|
||||
) {
|
||||
this.__TempConn.set(newValue);
|
||||
}
|
||||
private __isNewObj: ObservedPropertyAbstractPU<boolean>; // 是否新增对象
|
||||
get isNewObj() {
|
||||
return this.__isNewObj.get();
|
||||
}
|
||||
set isNewObj(newValue: boolean // 是否新增对象
|
||||
) {
|
||||
this.__isNewObj.set(newValue);
|
||||
}
|
||||
private __newObjType: ObservedPropertyAbstractPU<number>; // 新增对象类型
|
||||
get newObjType() {
|
||||
return this.__newObjType.get();
|
||||
}
|
||||
set newObjType(newValue: number // 新增对象类型
|
||||
) {
|
||||
this.__newObjType.set(newValue);
|
||||
}
|
||||
private __choseIndex: ObservedPropertyAbstractPU<number | null>; // 选中对象下标
|
||||
get choseIndex() {
|
||||
return this.__choseIndex.get();
|
||||
}
|
||||
set choseIndex(newValue: number | null // 选中对象下标
|
||||
) {
|
||||
this.__choseIndex.set(newValue);
|
||||
}
|
||||
private __isShowLabel: ObservedPropertyAbstractPU<boolean>; // 是否显示标签
|
||||
get isShowLabel() {
|
||||
return this.__isShowLabel.get();
|
||||
}
|
||||
set isShowLabel(newValue: boolean // 是否显示标签
|
||||
) {
|
||||
this.__isShowLabel.set(newValue);
|
||||
}
|
||||
private __isShowPort: ObservedPropertyAbstractPU<boolean>; // 是否显示接口
|
||||
get isShowPort() {
|
||||
return this.__isShowPort.get();
|
||||
}
|
||||
set isShowPort(newValue: boolean // 是否显示接口
|
||||
) {
|
||||
this.__isShowPort.set(newValue);
|
||||
}
|
||||
private __isShowInterface: ObservedPropertyAbstractPU<boolean>; // 是否显示网络配置信息
|
||||
get isShowInterface() {
|
||||
return this.__isShowInterface.get();
|
||||
}
|
||||
set isShowInterface(newValue: boolean // 是否显示网络配置信息
|
||||
) {
|
||||
this.__isShowInterface.set(newValue);
|
||||
}
|
||||
private __isShowTable: ObservedPropertyAbstractPU<boolean>; // 是否显示路由/交换表信息
|
||||
get isShowTable() {
|
||||
return this.__isShowTable.get();
|
||||
}
|
||||
set isShowTable(newValue: boolean // 是否显示路由/交换表信息
|
||||
) {
|
||||
this.__isShowTable.set(newValue);
|
||||
}
|
||||
private __allSimPacket: ObservedPropertyAbstractPU<SimPacket[]>; // 单次数据包传输的集合
|
||||
get allSimPacket() {
|
||||
return this.__allSimPacket.get();
|
||||
}
|
||||
set allSimPacket(newValue: SimPacket[] // 单次数据包传输的集合
|
||||
) {
|
||||
this.__allSimPacket.set(newValue);
|
||||
}
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Row.create();
|
||||
Row.debugLine("components/TopMenuBar.ets(190:5)");
|
||||
Row.height('12%');
|
||||
Row.width('100%');
|
||||
if (!isInitialRender) {
|
||||
Row.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
this.MenuButton.bind(this)(this.menuArr);
|
||||
Row.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.protoBin
vendored
Normal file
Binary file not shown.
36
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts
vendored
Normal file
36
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import type AbilityConstant from "@ohos:app.ability.AbilityConstant";
|
||||
import hilog from "@ohos:hilog";
|
||||
import UIAbility from "@ohos:app.ability.UIAbility";
|
||||
import type Want from "@ohos:app.ability.Want";
|
||||
import type window from "@ohos:window";
|
||||
export default class EntryAbility extends UIAbility {
|
||||
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
|
||||
}
|
||||
onDestroy(): void {
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
|
||||
}
|
||||
onWindowStageCreate(windowStage: window.WindowStage): void {
|
||||
// Main window is created, set main page for this ability
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
|
||||
windowStage.loadContent('pages/Index', (err, data) => {
|
||||
if (err.code) {
|
||||
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
|
||||
return;
|
||||
}
|
||||
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
|
||||
});
|
||||
}
|
||||
onWindowStageDestroy(): void {
|
||||
// Main window is destroyed, release UI related resources
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
|
||||
}
|
||||
onForeground(): void {
|
||||
// Ability has brought to foreground
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
|
||||
}
|
||||
onBackground(): void {
|
||||
// Ability has back to background
|
||||
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
|
||||
}
|
||||
}
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.protoBin
vendored
Normal file
Binary file not shown.
59
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.ts
vendored
Normal file
59
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.ts
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import type { SimBase } from "../classes/SimBase";
|
||||
function ValidateIPAddress(ipAddress: string): boolean {
|
||||
// 定义IP地址的正则表达式模式
|
||||
const patternWithSubnet = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/;
|
||||
const patternWithoutSubnet = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
|
||||
const matchWithSubnet = ipAddress.match(patternWithSubnet);
|
||||
const matchWithoutSubnet = ipAddress.match(patternWithoutSubnet);
|
||||
if (matchWithSubnet) {
|
||||
// 带有子网掩码的IP地址
|
||||
// 检查每个组件的取值范围是否在 0-255 之间
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const group = parseInt(matchWithSubnet[i]);
|
||||
if (group < 0 || group > 255) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 检查子网掩码的取值范围是否在 0-32 之间
|
||||
const subnetMask = parseInt(matchWithSubnet[5]);
|
||||
if (subnetMask < 0 || subnetMask > 32) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (matchWithoutSubnet) {
|
||||
// 不带子网掩码的IP地址
|
||||
// 检查每个组件的取值范围是否在 0-255 之间
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const group = parseInt(matchWithoutSubnet[i]);
|
||||
if (group < 0 || group > 255) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
// IP地址格式不正确
|
||||
return false;
|
||||
}
|
||||
}
|
||||
export function checkNetwork(allSimObj: SimBase[]) {
|
||||
for (const item of allSimObj) {
|
||||
if (item.objType == 4 || item.objType == 3) {
|
||||
continue;
|
||||
}
|
||||
else if (!ValidateIPAddress(item.ip)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} // 检查创建虚拟对象的IP地址是否正确
|
||||
export function getNewDate() {
|
||||
return new Date().toLocaleString() + "\t";
|
||||
} // 获取当前时间
|
||||
export function updatePacketLog(text: string) {
|
||||
let logText = AppStorage.get("LogText");
|
||||
logText = logText + getNewDate() + text + "\n";
|
||||
AppStorage.set("LogText", logText);
|
||||
console.log(text);
|
||||
} // 更新主页面底部日志信息
|
||||
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.protoBin
vendored
Normal file
BIN
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.protoBin
vendored
Normal file
Binary file not shown.
311
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts
vendored
Normal file
311
ensp14ing/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts
vendored
Normal file
|
|
@ -0,0 +1,311 @@
|
|||
interface Index_Params {
|
||||
allSimObj?: any[];
|
||||
allSimConn?: any[];
|
||||
TempConn?: any[];
|
||||
isNewObj?: boolean;
|
||||
newObjType?: number;
|
||||
choseIndex?: number | null;
|
||||
isNewConn?: boolean;
|
||||
isShowLabel?: boolean;
|
||||
isShowPort?: boolean;
|
||||
isShowInterface?: boolean;
|
||||
isShowTable?: boolean;
|
||||
allSimPacket?: SimPacket[];
|
||||
}
|
||||
import { TopMenuBar } from "@bundle:com.example.ensp_fourteen/entry/ets/components/TopMenuBar";
|
||||
import { MiddleContent } from "@bundle:com.example.ensp_fourteen/entry/ets/components/MiddleContent";
|
||||
import { BottomMenuBar } from "@bundle:com.example.ensp_fourteen/entry/ets/components/ButtomMenuBar";
|
||||
import type { SimPacket } from "../classes/OtherSimObjects" // 自定义数据包类型
|
||||
;
|
||||
class Index extends ViewPU {
|
||||
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined) {
|
||||
super(parent, __localStorage, elmtId);
|
||||
if (typeof paramsLambda === "function") {
|
||||
this.paramsGenerator_ = paramsLambda;
|
||||
}
|
||||
this.__allSimObj = new ObservedPropertyObjectPU([] // 仿真对象数组123
|
||||
, this, "allSimObj");
|
||||
this.addProvidedVar("allSimObj", this.__allSimObj);
|
||||
this.__allSimConn = new ObservedPropertyObjectPU([] // 仿真连接线数组
|
||||
, this, "allSimConn");
|
||||
this.addProvidedVar("allSimConn", this.__allSimConn);
|
||||
this.__TempConn = new ObservedPropertyObjectPU([] // 临时连接线对象数组
|
||||
, this, "TempConn");
|
||||
this.addProvidedVar("TempConn", this.__TempConn);
|
||||
this.__isNewObj = new ObservedPropertySimplePU(false // 是否新增对象
|
||||
, this, "isNewObj");
|
||||
this.addProvidedVar("isNewObj", this.__isNewObj);
|
||||
this.__newObjType = new ObservedPropertySimplePU(-1 // 新增对象类型
|
||||
, this, "newObjType");
|
||||
this.addProvidedVar("newObjType", this.__newObjType);
|
||||
this.__choseIndex = new ObservedPropertyObjectPU(null // 选中对象下标
|
||||
, this, "choseIndex");
|
||||
this.addProvidedVar("choseIndex", this.__choseIndex);
|
||||
this.__isNewConn = new ObservedPropertySimplePU(true // 是否正在新增连接线
|
||||
, this, "isNewConn");
|
||||
this.addProvidedVar("isNewConn", this.__isNewConn);
|
||||
this.__isShowLabel = new ObservedPropertySimplePU(true // 是否显示标签
|
||||
, this, "isShowLabel");
|
||||
this.addProvidedVar("isShowLabel", this.__isShowLabel);
|
||||
this.__isShowPort = new ObservedPropertySimplePU(true // 是否显示接口
|
||||
, this, "isShowPort");
|
||||
this.addProvidedVar("isShowPort", this.__isShowPort);
|
||||
this.__isShowInterface = new ObservedPropertySimplePU(true // 是否显示网络配置信息
|
||||
, this, "isShowInterface");
|
||||
this.addProvidedVar("isShowInterface", this.__isShowInterface);
|
||||
this.__isShowTable = new ObservedPropertySimplePU(true // 是否显示路由/交换表信息
|
||||
, this, "isShowTable");
|
||||
this.addProvidedVar("isShowTable", this.__isShowTable);
|
||||
this.__allSimPacket = new ObservedPropertyObjectPU([] // 单次数据包传输的集合
|
||||
// @StorageLink("isNewPacket") isNewPacket: number = 0
|
||||
// @StorageLink("isNewPacketArrived") isNewPacketArrived: number = 0
|
||||
// aboutToAppear() {
|
||||
// console.log(String(AppStorage.set<number>("isNewPacket", 0)))
|
||||
// let isNewPacket: number = AppStorage.get("isNewPacket")
|
||||
// console.log("hihihi!!!")
|
||||
// console.log(isNewPacket.toString())
|
||||
// AppStorage.set<number>("isNewPacketArrived", 0)
|
||||
// let isNewPacketArrived: number = AppStorage.get("isNewPacketArrived")
|
||||
// console.log(isNewPacketArrived.toString())
|
||||
// }
|
||||
, this, "allSimPacket");
|
||||
this.addProvidedVar("allSimPacket", this.__allSimPacket);
|
||||
this.setInitiallyProvidedValue(params);
|
||||
}
|
||||
setInitiallyProvidedValue(params: Index_Params) {
|
||||
if (params.allSimObj !== undefined) {
|
||||
this.allSimObj = params.allSimObj;
|
||||
}
|
||||
if (params.allSimConn !== undefined) {
|
||||
this.allSimConn = params.allSimConn;
|
||||
}
|
||||
if (params.TempConn !== undefined) {
|
||||
this.TempConn = params.TempConn;
|
||||
}
|
||||
if (params.isNewObj !== undefined) {
|
||||
this.isNewObj = params.isNewObj;
|
||||
}
|
||||
if (params.newObjType !== undefined) {
|
||||
this.newObjType = params.newObjType;
|
||||
}
|
||||
if (params.choseIndex !== undefined) {
|
||||
this.choseIndex = params.choseIndex;
|
||||
}
|
||||
if (params.isNewConn !== undefined) {
|
||||
this.isNewConn = params.isNewConn;
|
||||
}
|
||||
if (params.isShowLabel !== undefined) {
|
||||
this.isShowLabel = params.isShowLabel;
|
||||
}
|
||||
if (params.isShowPort !== undefined) {
|
||||
this.isShowPort = params.isShowPort;
|
||||
}
|
||||
if (params.isShowInterface !== undefined) {
|
||||
this.isShowInterface = params.isShowInterface;
|
||||
}
|
||||
if (params.isShowTable !== undefined) {
|
||||
this.isShowTable = params.isShowTable;
|
||||
}
|
||||
if (params.allSimPacket !== undefined) {
|
||||
this.allSimPacket = params.allSimPacket;
|
||||
}
|
||||
}
|
||||
updateStateVars(params: Index_Params) {
|
||||
}
|
||||
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
||||
this.__allSimObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__allSimConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__TempConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isNewObj.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__newObjType.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__choseIndex.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isNewConn.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowLabel.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowPort.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowInterface.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__isShowTable.purgeDependencyOnElmtId(rmElmtId);
|
||||
this.__allSimPacket.purgeDependencyOnElmtId(rmElmtId);
|
||||
}
|
||||
aboutToBeDeleted() {
|
||||
this.__allSimObj.aboutToBeDeleted();
|
||||
this.__allSimConn.aboutToBeDeleted();
|
||||
this.__TempConn.aboutToBeDeleted();
|
||||
this.__isNewObj.aboutToBeDeleted();
|
||||
this.__newObjType.aboutToBeDeleted();
|
||||
this.__choseIndex.aboutToBeDeleted();
|
||||
this.__isNewConn.aboutToBeDeleted();
|
||||
this.__isShowLabel.aboutToBeDeleted();
|
||||
this.__isShowPort.aboutToBeDeleted();
|
||||
this.__isShowInterface.aboutToBeDeleted();
|
||||
this.__isShowTable.aboutToBeDeleted();
|
||||
this.__allSimPacket.aboutToBeDeleted();
|
||||
SubscriberManager.Get().delete(this.id__());
|
||||
this.aboutToBeDeletedInternal();
|
||||
}
|
||||
private __allSimObj: ObservedPropertyObjectPU<any[]>; // 仿真对象数组123
|
||||
get allSimObj() {
|
||||
return this.__allSimObj.get();
|
||||
}
|
||||
set allSimObj(newValue: any[]) {
|
||||
this.__allSimObj.set(newValue);
|
||||
}
|
||||
private __allSimConn: ObservedPropertyObjectPU<any[]>; // 仿真连接线数组
|
||||
get allSimConn() {
|
||||
return this.__allSimConn.get();
|
||||
}
|
||||
set allSimConn(newValue: any[]) {
|
||||
this.__allSimConn.set(newValue);
|
||||
}
|
||||
private __TempConn: ObservedPropertyObjectPU<any[]>; // 临时连接线对象数组
|
||||
get TempConn() {
|
||||
return this.__TempConn.get();
|
||||
}
|
||||
set TempConn(newValue: any[]) {
|
||||
this.__TempConn.set(newValue);
|
||||
}
|
||||
private __isNewObj: ObservedPropertySimplePU<boolean>; // 是否新增对象
|
||||
get isNewObj() {
|
||||
return this.__isNewObj.get();
|
||||
}
|
||||
set isNewObj(newValue: boolean) {
|
||||
this.__isNewObj.set(newValue);
|
||||
}
|
||||
private __newObjType: ObservedPropertySimplePU<number>; // 新增对象类型
|
||||
get newObjType() {
|
||||
return this.__newObjType.get();
|
||||
}
|
||||
set newObjType(newValue: number) {
|
||||
this.__newObjType.set(newValue);
|
||||
}
|
||||
private __choseIndex: ObservedPropertyObjectPU<number | null>; // 选中对象下标
|
||||
get choseIndex() {
|
||||
return this.__choseIndex.get();
|
||||
}
|
||||
set choseIndex(newValue: number | null) {
|
||||
this.__choseIndex.set(newValue);
|
||||
}
|
||||
private __isNewConn: ObservedPropertySimplePU<boolean>; // 是否正在新增连接线
|
||||
get isNewConn() {
|
||||
return this.__isNewConn.get();
|
||||
}
|
||||
set isNewConn(newValue: boolean) {
|
||||
this.__isNewConn.set(newValue);
|
||||
}
|
||||
private __isShowLabel: ObservedPropertySimplePU<boolean>; // 是否显示标签
|
||||
get isShowLabel() {
|
||||
return this.__isShowLabel.get();
|
||||
}
|
||||
set isShowLabel(newValue: boolean) {
|
||||
this.__isShowLabel.set(newValue);
|
||||
}
|
||||
private __isShowPort: ObservedPropertySimplePU<boolean>; // 是否显示接口
|
||||
get isShowPort() {
|
||||
return this.__isShowPort.get();
|
||||
}
|
||||
set isShowPort(newValue: boolean) {
|
||||
this.__isShowPort.set(newValue);
|
||||
}
|
||||
private __isShowInterface: ObservedPropertySimplePU<boolean>; // 是否显示网络配置信息
|
||||
get isShowInterface() {
|
||||
return this.__isShowInterface.get();
|
||||
}
|
||||
set isShowInterface(newValue: boolean) {
|
||||
this.__isShowInterface.set(newValue);
|
||||
}
|
||||
private __isShowTable: ObservedPropertySimplePU<boolean>; // 是否显示路由/交换表信息
|
||||
get isShowTable() {
|
||||
return this.__isShowTable.get();
|
||||
}
|
||||
set isShowTable(newValue: boolean) {
|
||||
this.__isShowTable.set(newValue);
|
||||
}
|
||||
private __allSimPacket: ObservedPropertyObjectPU<SimPacket[]>; // 单次数据包传输的集合
|
||||
get allSimPacket() {
|
||||
return this.__allSimPacket.get();
|
||||
}
|
||||
set allSimPacket(newValue: SimPacket[]) {
|
||||
this.__allSimPacket.set(newValue);
|
||||
}
|
||||
// @StorageLink("isNewPacket") isNewPacket: number = 0
|
||||
// @StorageLink("isNewPacketArrived") isNewPacketArrived: number = 0
|
||||
// aboutToAppear() {
|
||||
// console.log(String(AppStorage.set<number>("isNewPacket", 0)))
|
||||
// let isNewPacket: number = AppStorage.get("isNewPacket")
|
||||
// console.log("hihihi!!!")
|
||||
// console.log(isNewPacket.toString())
|
||||
// AppStorage.set<number>("isNewPacketArrived", 0)
|
||||
// let isNewPacketArrived: number = AppStorage.get("isNewPacketArrived")
|
||||
// console.log(isNewPacketArrived.toString())
|
||||
// }
|
||||
initialRender() {
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
Column.create();
|
||||
Column.debugLine("pages/Index.ets(35:5)");
|
||||
Column.width('100%');
|
||||
Column.height('100%');
|
||||
if (!isInitialRender) {
|
||||
Column.pop();
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
ViewPU.create(new
|
||||
// 顶部功能栏
|
||||
TopMenuBar(this, {}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
ViewPU.create(new
|
||||
// 中间绘制区
|
||||
MiddleContent(this, {}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
{
|
||||
this.observeComponentCreation((elmtId, isInitialRender) => {
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(elmtId);
|
||||
if (isInitialRender) {
|
||||
let paramsLambda = () => {
|
||||
return {};
|
||||
};
|
||||
ViewPU.create(new
|
||||
// 底部选择栏
|
||||
BottomMenuBar(this, {}, undefined, elmtId, paramsLambda));
|
||||
}
|
||||
else {
|
||||
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
||||
}
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
});
|
||||
}
|
||||
Column.pop();
|
||||
}
|
||||
rerender() {
|
||||
this.updateDirtyElements();
|
||||
}
|
||||
}
|
||||
ViewStackProcessor.StartGetAccessRecordingFor(ViewStackProcessor.AllocateNewElmetIdForNextComponent());
|
||||
loadDocument(new Index(undefined, {}));
|
||||
ViewStackProcessor.StopGetAccessRecording();
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts;com.example.ensp_fourteen/entry/ets/entryability/EntryAbility;esm;entry/src/main/ets/entryability/EntryAbility.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts;com.example.ensp_fourteen/entry/ets/pages/Index;esm;entry/src/main/ets/pages/Index.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.ts;com.example.ensp_fourteen/entry/ets/components/TopMenuBar;esm;entry/src/main/ets/components/TopMenuBar.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.ts;com.example.ensp_fourteen/entry/ets/components/MiddleContent;esm;entry/src/main/ets/components/MiddleContent.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.ts;com.example.ensp_fourteen/entry/ets/components/ButtomMenuBar;esm;entry/src/main/ets/components/ButtomMenuBar.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.ts;com.example.ensp_fourteen/entry/ets/classes/TopMenu;esm;entry/src/main/ets/classes/TopMenu.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.ts;com.example.ensp_fourteen/entry/ets/components/Dialog;esm;entry/src/main/ets/components/Dialog.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.ts;com.example.ensp_fourteen/entry/ets/classes/OtherSimObjects;esm;entry/src/main/ets/classes/OtherSimObjects.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.ts;com.example.ensp_fourteen/entry/ets/components/Table;esm;entry/src/main/ets/components/Table.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.ts;com.example.ensp_fourteen/entry/ets/functions/functions;esm;entry/src/main/ets/functions/functions.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.ts;com.example.ensp_fourteen/entry/ets/classes/SimBase;esm;entry/src/main/ets/classes/SimBase.ets;entry
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.ts;com.example.ensp_fourteen/entry/ets/classes/Datas;esm;entry/src/main/ets/classes/Datas.ets;entry
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/entryability/EntryAbility.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/pages/Index.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/TopMenuBar.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/MiddleContent.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/ButtomMenuBar.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/TopMenu.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Dialog.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/OtherSimObjects.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/components/Table.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/functions/functions.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/SimBase.protoBin
|
||||
F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.ts;F:/jiaocai/ensp14/entry/.preview/cache/.default/entry/src/main/ets/classes/Datas.protoBin
|
||||
F:\jiaocai\ensp14\entry\.preview\cache\.default\npmEntries.txt;F:\jiaocai\ensp14\entry\.preview\cache\.default\npmEntries.protoBin
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"deviceType":"tablet","buildMode":"debug","note":"false","logLevel":"3","isPreview":"true","checkEntry":"true","port":"29900","localPropertiesPath":"E:\\jiaocai\\ensp14\\local.properties","Path":"D:\\Program Files\\Huawei\\DevEco Studio\\tools\\node\\","aceProfilePath":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\resources\\base\\profile","hapMode":"false","img2bin":"true","projectProfilePath":"E:\\jiaocai\\ensp14\\build-profile.json5","watchMode":"true","appResource":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\ResourceTable.txt","aceBuildJson":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\loader\\default\\loader.json","aceModuleRoot":"E:\\jiaocai\\ensp14\\entry\\src\\main\\ets","aceSoPath":"E:\\jiaocai\\ensp14\\entry\\.preview\\cache\\nativeDependencies.txt","cachePath":"E:\\jiaocai\\ensp14\\entry\\.preview\\cache\\.default","aceModuleBuild":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\assets\\default\\ets","aceModuleJsonPath":"E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\module.json","stageRouterConfig":{"paths":["E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\module.json","E:\\jiaocai\\ensp14\\entry\\.preview\\default\\intermediates\\res\\default\\resources\\base\\profile\\main_pages.json"],"contents":["{\"module\":{\"pages\":\"$profile:main_pages\",\"name\":\"entry\"}}","{\"src\":[\"pages/Index\"]}"]}}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"buildMode":"debug"}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
string EntryAbility_desc 0x01000004
|
||||
string EntryAbility_label 0x01000005
|
||||
string app_name 0x01000000
|
||||
string module_desc 0x01000006
|
||||
color start_window_background 0x01000008
|
||||
media app_icon 0x01000001
|
||||
media icon 0x01000003
|
||||
media jiaohuanji 0x01000010
|
||||
media jiaohuanji_tm 0x0100000b
|
||||
media jixianqi 0x0100000c
|
||||
media jixianqi_tm 0x01000009
|
||||
media luyouqi 0x0100000d
|
||||
media luyouqi_tm 0x01000011
|
||||
media packet 0x0100000f
|
||||
media startIcon 0x01000002
|
||||
media zhuji 0x0100000a
|
||||
media zhuji_tm 0x0100000e
|
||||
profile main_pages 0x01000007
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,854 @@
|
|||
Ôr@Ÿªassertions¤code´customTransformCache¬dependencies¢id¤meta±moduleSideEffects¬originalCode±originalSourcemap«resolvedIds®sourcemapChainµsyntheticNamedExportsµtransformDependencies®transformFiles¨cacheAstÔrA<72>Ú// 应用层数æ<C2B0>®åŒ…(解å°<C3A5>包)
|
||||
export class AppData {
|
||||
constructor(objId, objLabel, appPackSize, appPackTag, sourceAppAddr, targetAppAddr) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.appPackId = Symbol();
|
||||
this.appPackSize = appPackSize;
|
||||
this.appPackTag = appPackTag;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.timeStamp = Date.parse(new Date().toString());
|
||||
this.appPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",appPackId: " + this.appPackId.toString() + ",appPackSize: " + this.appPackSize.toString() + ",appPackTag: " + this.appPackTag + "\nsourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + ",timeStamp: " + this.timeStamp + "\n";
|
||||
}
|
||||
pack() {
|
||||
return this;
|
||||
} // 应用层å°<C3A5>包
|
||||
unpack(simHost) {
|
||||
simHost.appData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
appPackId: this.appPackId,
|
||||
sourceAppAddr: this.sourceAppAddr,
|
||||
targetAppAddr: this.targetAppAddr,
|
||||
toString: () => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",appPackId:" + this.appPackId.toString() + ",sourceAppAddr:" + this.sourceAppAddr.toString() + ",targetAppAddr:" + this.targetAppAddr.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 应用层解包
|
||||
isValid(sourceAppAddr, targetAppAddr) {
|
||||
return this.sourceAppAddr === sourceAppAddr && this.targetAppAddr === targetAppAddr;
|
||||
} // æ ¹æ<C2B9>®ç”¨æˆ·è¾“入的应用层地å<C2B0>€åˆ¤æ–是å<C2AF>¦æ£ç¡®
|
||||
}
|
||||
// ä¼ è¾“å±‚æ•°æ<C2B0>®åŒ…(解å°<C3A5>包)
|
||||
export class TransData {
|
||||
constructor(objId, objLabel, transSeq, transTag, appPackId, sourcePort, targetPort, sourceAppAddr, targetAppAddr) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.transPackId = Symbol();
|
||||
this.transSeq = transSeq;
|
||||
this.transTag = transTag;
|
||||
this.appPackId = appPackId;
|
||||
this.sourcePort = sourcePort;
|
||||
this.targetPort = targetPort;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.timeStamp = Date.parse(new Date().toString());
|
||||
this.transPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",transPackId: " + this.transPackId.toString() + ",transSeq: " + this.transSeq.toString() + ",transTag: " + this.transTag + ",appPackId: " + this.appPackId.toString() + "\nsourcePort: " + this.sourcePort.toString() + "\ntargetPort: " + this.targetPort.toString() + ",sourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + ",timeStamp: " + this.timeStamp + "\n";
|
||||
}
|
||||
calcNumSplits() {
|
||||
const MTU = 2048;
|
||||
return (this.transPackedString.length + MTU - 1) / MTU;
|
||||
} // 计算拆分数é‡<C3A9>
|
||||
pack() {
|
||||
const numSplits = this.calcNumSplits();
|
||||
let transDataList = [];
|
||||
for (let i = 0; i < numSplits; i++) {
|
||||
transDataList.push(new TransData(this.objId, this.objLabel, i + 1, this.transTag, this.appPackId, this.sourcePort, this.targetPort, this.sourceAppAddr, this.targetAppAddr));
|
||||
}
|
||||
return transDataList;
|
||||
} // ä¼ è¾“å±‚å°<C3A5>包
|
||||
unPack(simHost) {
|
||||
simHost.transData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
transPackId: this.transPackId,
|
||||
sourcePort: this.sourcePort,
|
||||
targetPort: this.targetPort,
|
||||
toString: () => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",transPackId:" + this.transPackId.toString() + ",sourcePort:" + this.sourcePort.toString() + ",targetPort:" + this.targetPort.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // ä¼ è¾“å±‚è§£åŒ…
|
||||
isValid(sourcePort, targetPort) {
|
||||
return this.sourcePort === sourcePort && this.targetPort === targetPort;
|
||||
} // æ ¹æ<C2B9>®ç”¨æˆ·è¾“入的端å<C2AF>£åˆ¤æ–是å<C2AF>¦æ£ç¡®
|
||||
}
|
||||
// 网络层数æ<C2B0>®åŒ…(解å°<C3A5>包)
|
||||
export class IPData {
|
||||
constructor(objId, objLabel, transPackId, sourceIp, targetIp, sourceAppAddr, targetAppAddr) {
|
||||
this.objId = objId;
|
||||
this.objLabel = objLabel;
|
||||
this.ipPackId = Symbol();
|
||||
this.transPackId = transPackId;
|
||||
this.sourceIp = sourceIp;
|
||||
this.targetIp = targetIp;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.ipPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",ipPackId: " + this.ipPackId.toString() + ",transPackId: " + this.transPackId.toString() + "\nsourceIp: " + this.sourceIp.toString() + "\ntargetIp: " + this.targetIp.toString() + ",sourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + "\n";
|
||||
}
|
||||
pack() {
|
||||
let ipData;
|
||||
ipData = new IPData(this.objId, this.objLabel, this.transPackId, this.sourceIp, this.targetIp, this.sourceAppAddr, this.targetAppAddr);
|
||||
return ipData;
|
||||
} // 网络层å°<C3A5>包
|
||||
unpack(simHost) {
|
||||
simHost.ipData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
ipPackId: this.ipPackId,
|
||||
sourceIp: this.sourceIp,
|
||||
targetIp: this.targetIp,
|
||||
toString: () => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",ipPackId:" + this.ipPackId.toString() + ",sourceIp:" + this.sourceIp.toString() + ",targetIp:" + this.targetIp.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 网络层解包
|
||||
isValid(sourceIp, targetIp) {
|
||||
return this.sourceIp === sourceIp && this.targetIp === targetIp;
|
||||
} // æ ¹æ<C2B9>®ç”¨æˆ·è¾“入的ip地å<C2B0>€åˆ¤æ–是å<C2AF>¦æ£ç¡®
|
||||
}
|
||||
// 链路层数æ<C2B0>®åŒ…(解å°<C3A5>包)
|
||||
export class MACData {
|
||||
constructor(objID, objLabel, ipPackID, sourceMac, targetMac, sourceIp, targetIp, sourceAppAddr, targetAppAddr) {
|
||||
this.objId = objID;
|
||||
this.objLabel = objLabel;
|
||||
this.macPackId = Symbol();
|
||||
this.ipPackId = ipPackID;
|
||||
this.sourceMac = sourceMac;
|
||||
this.targetMac = targetMac;
|
||||
this.sourceIp = sourceIp;
|
||||
this.targetIp = targetIp;
|
||||
this.sourceAppAddr = sourceAppAddr;
|
||||
this.targetAppAddr = targetAppAddr;
|
||||
this.macPackedString = "objId: " + this.objId.toString() + ",objLabel: " + this.objLabel + ",macPackId: " + this.macPackId.toString() + ",ipPackId: " + this.ipPackId.toString() + "\nsentMac: " + this.sourceMac.toString() + ",rpctMac: " + this.targetMac.toString() + ",sourceIp: " + this.sourceIp.toString() + ",targetIp: " + this.targetIp.toString() + "\nsourceAppAddr: " + this.sourceAppAddr + ",targetAppAddr: " + this.targetAppAddr + "\n";
|
||||
}
|
||||
pack() {
|
||||
let macData;
|
||||
macData = new MACData(this.objId, this.objLabel, this.ipPackId, this.sourceMac, this.targetMac, this.sourceIp, this.targetIp, this.sourceAppAddr, this.targetAppAddr);
|
||||
return macData;
|
||||
} // 链路层å°<C3A5>包
|
||||
unPack(simHost) {
|
||||
simHost.macData = {
|
||||
objId: this.objId,
|
||||
objLabel: this.objLabel,
|
||||
macPackId: this.macPackId,
|
||||
sourceMac: this.sourceMac,
|
||||
targetMac: this.targetMac,
|
||||
toString: () => {
|
||||
return "objId:" + this.objId.toString() + ",objLabel:" + this.objLabel.toString() + ",macPackId:" + this.macPackId.toString() + ",sourceMac:" + this.sourceMac.toString() + ",targetMac:" + this.targetMac.toString() + "\n";
|
||||
}
|
||||
};
|
||||
} // 链路层解包
|
||||
isValid(sentMac, rcptMac) {
|
||||
return this.sourceMac === sentMac && this.targetMac === rcptMac;
|
||||
} // æ ¹æ<C2B9>®ç”¨æˆ·è¾“入的mac地å<C2B0>€åˆ¤æ–是å<C2AF>¦æ£ç¡®
|
||||
}
|
||||
//# sourceMappingURL=Datas.js.mapÂ<70>Ù6E:\jiaocai\ensp14\entry\src\main\ets\classes\Datas.etsÔrBšªmoduleName±isLocalDependency¯isNodeEntryFile§pkgPath±belongProjectPath§pkgNameªpkgVersion±dependencyPkgInfo¯hostModulesInfo°belongModulePath¥entry÷E:\jiaocai\ensp14\entry±E:\jiaocai\ensp14¥entry¥1.0.0Ô | ||||