Loading...
Loading...
This skill should be used when user asks to "generate UML", "create sequence diagram", "生成时序图", "生成类图", "generate PlantUML", or discusses generating UML diagrams for new interfaces or API design.
npx skill4agent add openharmonyinsight/openharmony-skills generate-interface-umlAddGlocalBlackListRemoveGlocalBlackList# Find the reference interface implementation
grep -r "SetFocusAppInfo" --include="*.h" --include="*.cpp"RSInterfacesRSRenderInterfaceRSIClientToRenderConnectionRSClientToRenderConnectionRSRenderPipelineAgentRSMainThread@startuml InterfaceName序列图
title InterfaceName 接口调用时序图
autonumber
skinparam maxMessageSize 150
skinparam boxPadding 10
actor "客户端应用" as Client
box "客户端进程 (Client Process)" #LightBlue
participant "RSInterfaces" as RSInterfaces
participant "RSRenderInterface" as RSRenderInterface
participant "RSRenderPipelineClient\n(IPC Proxy)" as IPCProxy
end box
box "跨进程通信 (IPC)" #LightYellow
participant "Binder/Hipc\n通信通道" as Binder
end box
box "服务端进程 (Render Service)" #LightGreen
participant "RSClientToRenderConnection\n(IPC Stub)" as IPCStub
participant "RSRenderPipelineAgent" as Agent
participant "RSMainThread" as MainThread
participant "TargetClass\n(在RSMainThread线程中执行)" as Target
end box
== 客户端调用流程 ==
Client -> RSInterfaces: InterfaceName(params)
activate RSInterfaces
RSInterfaces -> RSRenderInterface: InterfaceName(params)
activate RSRenderInterface
RSRenderInterface -> IPCProxy: InterfaceName(params)
activate IPCProxy
== 跨进程IPC调用 ==
IPCProxy -> Binder: IPC调用\nInterfaceName
activate Binder
Binder -> IPCStub: 接收IPC调用\nInterfaceName
activate IPCStub
== 服务端处理流程 ==
IPCStub -> Agent: InterfaceName(params)
activate Agent
Agent -> Agent: ScheduleMainThreadTask(\nlambda任务)
Agent -> MainThread: PostTask(\n执行InterfaceName)
activate MainThread
MainThread -> Target: TargetMethod(params)
activate Target
note right of Target
描述具体操作
end note
Target --> MainThread: 返回
deactivate Target
MainThread --> Agent: 任务完成
deactivate MainThread
Agent --> IPCStub: 返回结果\n(ERR_OK)
deactivate Agent
IPCStub --> Binder: 返回IPC结果
deactivate IPCStub
Binder --> IPCProxy: 返回IPC结果
deactivate Binder
IPCProxy --> RSRenderInterface: 返回结果
deactivate IPCProxy
RSRenderInterface --> RSInterfaces: 返回结果
deactivate RSRenderInterface
RSInterfaces --> Client: 返回结果
deactivate RSInterfaces
@enduml@startuml InterfaceName类图
title InterfaceName系列接口涉及的类关系图
skinparam classAttributeIconSize 0
skinparam class {
BackgroundColor<<client>> LightBlue
BackgroundColor<<service>> LightGreen
BackgroundColor<<static>> LightYellow
BorderColor Black
}
package "客户端 (Client)" <<client>> {
class RSInterfaces {
+ {static} GetInstance(): RSInterfaces&
+ InterfaceName(params): ReturnType
--
- renderInterface_: RSRenderInterface*
}
class RSRenderInterface {
+ InterfaceName(params): ReturnType
--
- renderPipelineClient_: RSRenderPipelineClient*
}
RSInterfaces --> RSRenderInterface
}
package "IPC通信层" {
interface RSIClientToRenderConnection {
+ InterfaceName(params, ErrorCode&): ErrCode
}
class RSClientToRenderConnection {
+ InterfaceName(params, ErrorCode&): ErrCode
--
- renderPipelineAgent_: sptr<RSRenderPipelineAgent>
}
RSClientToRenderConnection ..|> RSIClientToRenderConnection
}
package "服务端 (Render Service)" <<service>> {
class RSRenderPipelineAgent {
+ InterfaceName(params, ErrorCode&): ErrCode
--
- rsRenderPipeline_: std::shared_ptr<RSRenderPipeline>
}
class RSMainThread {
+ PostTask(RSTask): void
+ ScheduleTask(Task): std::future<Return>
--
- mainThreadId_: std::thread::id
}
}
package "TargetClass (静态类)" <<static>> {
class TargetClass {
+ {static} TargetMethod(params): void
--
- {static} member_: Type
}
}
RSRenderInterface --> RSIClientToRenderConnection: 通过IPC调用
RSClientToRenderConnection --> RSRenderPipelineAgent
RSRenderPipelineAgent ..> RSMainThread: ScheduleMainThreadTask
RSRenderPipelineAgent ..> TargetClass: 调用静态方法
@endumlInterfaceName_sequence.pumlInterfaceName_ClassDiagram.pumlGenerate UML for AddGlocalBlackList, RemoveGlocalBlackList, SetGlocalBlackListconst std::vector<NodeId>&SetFocusAppInfoScreenSpecialLayerInfoAddGlocalBlackList_sequence.pumlRemoveGlocalBlackList_sequence.pumlSetGlocalBlackList_sequence.pumlInterfaceName_ClassDiagram.pumlautonumber== Section Name ==