Skip to content

[PSG] Option to run PSG using cli arguments#293

Merged
sebaszm merged 3 commits into
masterfrom
PSG-CreateCLIMode
Jun 30, 2026
Merged

[PSG] Option to run PSG using cli arguments#293
sebaszm merged 3 commits into
masterfrom
PSG-CreateCLIMode

Conversation

@nxtum

@nxtum nxtum commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

./PluginSkeletonGenerator.py --help
[NOTE]: The output from this generator is a skeleton. Please correct the generated methods accordingly!
[NOTE]: This generator does not include all the options available for a plugin!
usage: PluginSkeletonGenerator.py [-h] [-n NAME] [-o DIR] [--out-of-process] [--plugin-config] [-p HEADER] [--precondition SUBSYSTEM]
[--termination SUBSYSTEM] [--control SUBSYSTEM] [--select-interface HEADER:INTERFACE[,INTERFACE]]
[--location HEADER:LOCATION]

Generate a Thunder plugin skeleton. Run with no arguments for the interactive questionnaire, or pass CLI arguments to skip the prompts.

optional arguments:
-h, --help show this help message and exit

required in CLI mode:
-n NAME, --plugin-name NAME
Plugin class/repository name to generate. Required if you pass any other generation option. Must be a valid
C++ identifier.

common options:
-o DIR, --output-dir DIR
Existing directory where the plugin folder is created. Default: current directory.
--out-of-process Generate an out-of-process plugin. Requires at least one --path.
--plugin-config Generate support for custom plugin-specific configuration. Default: disabled.
-p HEADER, --path HEADER
Full path to a C++ IDL interface header to parse. Use once per header. Required for --out-of-process; optional
otherwise.

Thunder subsystem options:
--precondition SUBSYSTEM
Required subsystem before activation, such as PLATFORM. Repeat this option for multiple preconditions.
--termination SUBSYSTEM
Subsystem state that terminates the plugin. Repeat this option for multiple terminations.
--control SUBSYSTEM Subsystem controlled by the plugin. Repeat this option for multiple controls.

interface selection and include options:
--select-interface HEADER:INTERFACE[,INTERFACE]
Choose which root interface classes to generate from a parsed header. This matters when one header defines
multiple top-level interfaces, for example IWifiControl and IWifiDiagnostics. HEADER may be the full path or
just the filename. Interface names are the class names without namespaces. Omit this option to generate all
root interfaces found in that header.
--location HEADER:LOCATION
Override the include folder used for generated #include lines for interfaces from HEADER. HEADER may be the
full path or filename. Only needed when the generated include should not start with the default folder,
interfaces.

CLI mode requirements:
--plugin-name is required when any generation argument is provided.
--path is required only when --out-of-process is used.
All other options are optional and default to the same values as pressing Enter
through the interactive prompts.

Examples:
Interactive mode:
PluginSkeletonGenerator.py

Minimal CLI mode:
PluginSkeletonGenerator.py --plugin-name ExamplePlugin

Out-of-process plugin with one interface:
PluginSkeletonGenerator.py --plugin-name WifiPlugin --out-of-process
--path /home/Thunder/ThunderInterfaces/interfaces/IWifiControl.h

Select one interface from a header that contains more than one:
PluginSkeletonGenerator.py --plugin-name WifiPlugin
--path /home/Thunder/ThunderInterfaces/interfaces/IWifiControl.h
--select-interface IWifiControl.h:IWifiControl

Override the generated include location when it is not "interfaces":
PluginSkeletonGenerator.py --plugin-name WifiPlugin
--path /home/vendor/ThunderInterfaces/custom/IWifiControl.h
--location IWifiControl.h:custom

Add multiple subsystem conditions:
PluginSkeletonGenerator.py --plugin-name WifiPlugin
--precondition PLATFORM --precondition NETWORK
--termination TERMINATED
--control INTERNET

@github-actions

Copy link
Copy Markdown

Plugin skeleton preview (latest run):
https://rdkcentral.github.io/ThunderTools/PluginSkeletonGenerator/previews/pr-293/run-28155136883/

No changes detected in generated plugin code. The PR changes are internal to the generator or do not affect output.

@nxtum nxtum requested a review from sebaszm June 29, 2026 09:57
@sebaszm sebaszm merged commit 40c576f into master Jun 30, 2026
107 checks passed
@sebaszm sebaszm deleted the PSG-CreateCLIMode branch June 30, 2026 11:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants