# rdkcentral/thunderpluginactivator architecture

> Architecture diagram of the GitHub repository rdkcentral/thunderpluginactivator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rdkcentral/thunderpluginactivator
- Repository: https://github.com/rdkcentral/thunderpluginactivator

## Overview

Plugin Activator is a command-line utility for starting a named Thunder plugin, with retries for connection or request failures. The workflow parses options, creates a COM-RPC starter, contacts Thunder’s PluginInitializer service, and waits for an asynchronous activation result. The starter interface leaves room for another transport, but the README and sampled implementation describe only COM-RPC. Logging is the main supporting layer. The graph reflects sampled calls and documented systemd use; it does not assume details of Thunder’s internal service implementation.

Main entry points: [`source/COMRPCStarter.cpp`](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/COMRPCStarter.cpp) (COM-RPC activation), [`source/main.cpp`](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/main.cpp) (CLI entry and options), [`source/Log.cpp`](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/Log.cpp) (Logging), [`source/IPluginStarter.h`](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/IPluginStarter.h) (Starter interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command line"]
  node_cli["CLI entry and options<br/>[main.cpp]"]
end

subgraph group_activation["Plugin activation"]
  node_starter_api["Starter interface<br/>[IPluginStarter.h]"]
  node_comrpc["COM-RPC activation<br/>[COMRPCStarter.cpp]"]
  node_callback["Async result callback<br/>[COMRPCStarter.cpp]"]
end

subgraph group_support["Supporting services"]
  node_logging["Logging<br/>[Log.cpp]"]
end

node_operator(("systemd or operator"))
node_thunder{{"Thunder runtime"}}
node_initializer{{"PluginInitializer service"}}

node_operator -->|"runs"| node_cli
node_cli -->|"initializes"| node_logging
node_cli -->|"creates and calls"| node_comrpc
node_comrpc -->|"implements"| node_starter_api
node_comrpc -->|"opens controller"| node_thunder
node_comrpc -->|"queries and activates"| node_initializer
node_comrpc -->|"registers callback"| node_callback
node_callback -->|"signals result"| node_comrpc
node_comrpc -->|"logs status"| node_logging

click node_cli "https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/main.cpp"
click node_starter_api "https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/IPluginStarter.h"
click node_comrpc "https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/COMRPCStarter.cpp"
click node_callback "https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/COMRPCStarter.cpp"
click node_logging "https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/Log.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli toneBlue
class node_starter_api,node_comrpc,node_callback toneAmber
class node_logging toneMint
class node_operator,node_thunder,node_initializer toneIndigo
```

## Components

### Command line

- [CLI entry and options](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/main.cpp): `source/main.cpp`

### Plugin activation

- [Starter interface](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/IPluginStarter.h): `source/IPluginStarter.h`
- [COM-RPC activation](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/COMRPCStarter.cpp): `source/COMRPCStarter.cpp`
- [Async result callback](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/COMRPCStarter.cpp): `source/COMRPCStarter.cpp`

### Supporting services

- [Logging](https://github.com/rdkcentral/thunderpluginactivator/blob/main/source/Log.cpp): `source/Log.cpp`

### Other components

- **systemd or operator**
- **Thunder runtime**
- **PluginInitializer service**

## Connections

- systemd or operator → CLI entry and options: runs (evidence: `README.md`)
- CLI entry and options → Logging: initializes (evidence: `source/main.cpp`)
- CLI entry and options → COM-RPC activation: creates and calls (evidence: `source/main.cpp`)
- COM-RPC activation → Starter interface: implements
- COM-RPC activation → Thunder runtime: opens controller (evidence: `source/COMRPCStarter.cpp`)
- COM-RPC activation → PluginInitializer service: queries and activates (evidence: `source/COMRPCStarter.cpp`)
- COM-RPC activation → Async result callback: registers callback (evidence: `source/COMRPCStarter.cpp`)
- Async result callback → COM-RPC activation: signals result (evidence: `source/COMRPCStarter.cpp`)
- COM-RPC activation → Logging: logs status (evidence: `source/COMRPCStarter.cpp`)
