Skip to content

RDKCOM-5482: RDKBDEV-3325 Add CcspPsm Documentation#15

Open
raslam930 wants to merge 2 commits intordkcentral:developfrom
raslam930:feature/RDKBDEV-3325
Open

RDKCOM-5482: RDKBDEV-3325 Add CcspPsm Documentation#15
raslam930 wants to merge 2 commits intordkcentral:developfrom
raslam930:feature/RDKBDEV-3325

Conversation

@raslam930
Copy link
Copy Markdown

[https://jira.rdkcentral.com/jira/browse/RDKBDEV-3325]
Reason for Change:
To add Component Documentation for CcspPsm
Fix:
Added the documentation
Test Procedure:
None
Signed-off-by: Raheen Aslam [raheen_aslam@comcast.com]

@raslam930 raslam930 requested review from a team as code owners December 5, 2025 06:06
@pradeeptakdas pradeeptakdas changed the title RDKBDEV-3325: Add CcspPsm Documentation RDKCOM-5482: RDKBDEV-3325 Add CcspPsm Documentation Dec 8, 2025
@Sukanya673 Sukanya673 added the community-contribution Contribution from community label Mar 12, 2026
@AkhilaReddyK7 AkhilaReddyK7 added the documentation Improvements or additions to documentation label Apr 2, 2026
@GoutamD2905 GoutamD2905 requested a review from Copilot April 13, 2026 07:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds component-level documentation for the CcspPsm (Persistent Storage Manager) component, intended to describe its role, architecture, interfaces, and operational flows within the RDK-B middleware stack.

Changes:

  • Adds a full README.md with CcspPsm overview, design notes, threading/state/call-flow diagrams (Mermaid), and interaction/API tables.
  • Documents internal module breakdown and key configuration/HAL integration details.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
- **RDK-B Components**: CcspCommonLibrary, RBus framework, systemd for service management, syscfg utility for platform configuration
- **HAL Dependencies**: Platform Storage HAL, Syscfg HAL for platform-specific configuration access
- **Systemd Services**: filesystem mount points for /nvram and /tmp must be available
- **Message Bus**: RBus namespace registration for "Device.X_CISCO_COM_PSM." prefix
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented RBus namespace prefix ("Device.X_CISCO_COM_PSM.") does not match the implementation: the RBUS registration in source/Ssp/ssp_rbus.c registers method names like SetPSMRecordValue()/GetPSMRecordValue() without a Device.* prefix. Please update this section to reflect the actual RBUS element names (or how they are namespaced at runtime).

Suggested change
- **Message Bus**: RBus namespace registration for "Device.X_CISCO_COM_PSM." prefix
- **Message Bus**: RBus integration uses the PSM RBUS methods registered by the component (for example `SetPSMRecordValue()` and `GetPSMRecordValue()`). Do not assume a fixed `Device.X_CISCO_COM_PSM.` registration prefix unless that namespace is added by the runtime integration layer.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified -

  • Message Bus: RBus integration uses the PSM RBus methods registered by the component (SetPSMRecordValue(), GetPSMRecordValue(), DeletePSMRecord(), and GetPSMRecordName()). No fixed Device.X_CISCO_COM_PSM. registration prefix is used.

Comment thread README.md
Comment on lines +121 to +124
- **Systemd Services**: filesystem mount points for /nvram and /tmp must be available
- **Message Bus**: RBus namespace registration for "Device.X_CISCO_COM_PSM." prefix
- **Configuration Files**: /etc/ccsp/psm_cfg.xml for default configurations, /nvram/psm/ directory structure for persistent storage
- **Startup Order**: Must initialize after filesystem services, before other CCSP components that depend on configuration data
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration file locations here appear incorrect for this repo: the code constructs config paths from SysFilePath "/psm/config/" and files like psm_def_cfg.xml.gz/psm_cur_cfg.xml.gz (see source/include/psm_properties.h), not /etc/ccsp/psm_cfg.xml or an /nvram/psm/ directory. Please align the documented paths with the actual defaults/macros used by the component.

Suggested change
- **Systemd Services**: filesystem mount points for /nvram and /tmp must be available
- **Message Bus**: RBus namespace registration for "Device.X_CISCO_COM_PSM." prefix
- **Configuration Files**: /etc/ccsp/psm_cfg.xml for default configurations, /nvram/psm/ directory structure for persistent storage
- **Startup Order**: Must initialize after filesystem services, before other CCSP components that depend on configuration data
- **Systemd Services**: filesystem mount points for the PSM configuration path and /tmp must be available
- **Message Bus**: RBus namespace registration for "Device.X_CISCO_COM_PSM." prefix
- **Configuration Files**: default component paths are rooted at `/psm/config/`, with configuration files such as `psm_def_cfg.xml.gz` (default/base configuration) and `psm_cur_cfg.xml.gz` (current persistent configuration)
- **Startup Order**: Must initialize after filesystem services that make `/psm/config/` available, before other CCSP components that depend on configuration data

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified-

  • Systemd Services: filesystem mount points for the PSM configuration path and /tmp must be available
  • Configuration Files: Default component paths are rooted at /psm/config/, with configuration files such as psm_def_cfg.xml.gz (default/base configuration) and psm_cur_cfg.xml.gz (current persistent configuration)
  • Startup Order: Must initialize after filesystem services that make /psm/config/ available, before other CCSP components that depend on configuration data

Comment thread README.md
Comment on lines +267 to +272
| **RDK-B Middleware Components** |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row breaks the markdown table because it doesn’t have the same number of columns as the header. Consider moving "RDK-B Middleware Components" outside the table as a heading, or add empty cells so the row has 3 columns.

Suggested change
| **RDK-B Middleware Components** |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** |
| **RDK-B Middleware Components** | | |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** | | |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread README.md
Comment on lines +267 to +272
| **RDK-B Middleware Components** |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row breaks the markdown table because it doesn’t have the same number of columns as the header. Consider moving "System & HAL Layers" outside the table as a heading, or add empty cells so the row has 3 columns.

Suggested change
| **RDK-B Middleware Components** |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** |
| **RDK-B Middleware Components** | | |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspTr069Pa | TR-069 parameter persistence, ACS configuration storage, device provisioning data | `getParameterValues()`, `setParameterValues()`, `addObject()` |
| OneWifi | WiFi configuration persistence, radio settings, access point parameters | `Device.WiFi.` namespace parameters, WiFi credential storage |
| CcspDmCli | Command-line data model access, diagnostic parameter retrieval, testing interface | RBus method calls for parameter tree navigation |
| **System & HAL Layers** | | |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread README.md
| Target Component/Layer | Interaction Purpose | Key APIs/Endpoints |
|------------------------|--------------------|--------------------|
| **RDK-B Middleware Components** |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The listed APIs/endpoints Device.X_CISCO_COM_PSM.Get() and .Set() don’t appear to exist in this codebase. The RBUS interface registers methods like GetPSMRecordValue()/SetPSMRecordValue() (source/Ssp/ssp_rbus.c). Please update the interaction matrix to reference the actual exposed methods/endpoints.

Suggested change
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `Device.X_CISCO_COM_PSM.Get()`, `Device.X_CISCO_COM_PSM.Set()` |
| CcspPandM | Configuration parameter management, system status reporting, factory reset coordination | `GetPSMRecordValue()`, `SetPSMRecordValue()` |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread README.md
Comment on lines +280 to +286
| Event Name | Event Topic/Path | Trigger Condition | Subscriber Components |
|------------|-----------------|-------------------|----------------------|
| ParameterValueChanged | `Device.X_CISCO_COM_PSM.ParameterChanged` | Parameter value modification via Set operation | CcspPandM, CcspTr069Pa, Telemetry components |
| ConfigurationBackupComplete | `Device.X_CISCO_COM_PSM.BackupStatus` | Successful completion of configuration backup operation | System monitoring, CcspPandM |
| FactoryResetInitiated | `Device.X_CISCO_COM_PSM.FactoryReset` | Factory reset operation triggered | All RDK-B components for cleanup operations |


Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These event topics/names (Device.X_CISCO_COM_PSM.*) don’t appear to be published by this component in the current codebase (no matches for these strings under source/). Please either document the real event topics (if any) or remove this table to avoid misleading consumers.

Suggested change
| Event Name | Event Topic/Path | Trigger Condition | Subscriber Components |
|------------|-----------------|-------------------|----------------------|
| ParameterValueChanged | `Device.X_CISCO_COM_PSM.ParameterChanged` | Parameter value modification via Set operation | CcspPandM, CcspTr069Pa, Telemetry components |
| ConfigurationBackupComplete | `Device.X_CISCO_COM_PSM.BackupStatus` | Successful completion of configuration backup operation | System monitoring, CcspPandM |
| FactoryResetInitiated | `Device.X_CISCO_COM_PSM.FactoryReset` | Factory reset operation triggered | All RDK-B components for cleanup operations |
No component-specific published event topics are currently documented here because the `Device.X_CISCO_COM_PSM.*` event names previously listed in this section are not verified by the current codebase. Consumers should rely on the supported API and IPC interfaces described in this document unless verified event topics are added from implementation-backed sources.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed table

Comment thread README.md
Comment on lines +348 to +357
CcspPsm integrates with several HAL APIs to provide platform-specific storage and configuration management. The primary integration focuses on the Syscfg HAL for persistent parameter storage and platform-specific configuration access.

**Core HAL APIs:**

| HAL API | Purpose | Parameters | Return Values | Implementation File |
|---------|---------|------------|---------------|-------------------|
| `syscfg_get()` | Retrieve platform-specific configuration parameters from persistent storage | `char* name, char* value, size_t size` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `syscfg_set()` | Store platform-specific configuration parameters to persistent storage | `char* name, char* value` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `syscfg_commit()` | Commit pending configuration changes to persistent storage | `void` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `PsmHal_GetHwParams()` | Retrieve hardware-specific default parameters for initial configuration | `PsmHalParam_t** params, int* count` | Parameter count or `-1` on error | `psm_hal_apis.c` |
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Syscfg HAL API signatures and implementation file references here don’t match usage in this repo: syscfg_get is called with 4 arguments (e.g., syscfg_get(NULL, key, buf, size) in source/Ssp/ssp_cfmif.c), and there are no syscfg_* calls in source/Ssp/psm_hal_apis.c. Also, PsmHal_GetHwParams() isn’t found in this repository. Please correct the signatures and point to the correct implementation/ownership of these APIs.

Suggested change
CcspPsm integrates with several HAL APIs to provide platform-specific storage and configuration management. The primary integration focuses on the Syscfg HAL for persistent parameter storage and platform-specific configuration access.
**Core HAL APIs:**
| HAL API | Purpose | Parameters | Return Values | Implementation File |
|---------|---------|------------|---------------|-------------------|
| `syscfg_get()` | Retrieve platform-specific configuration parameters from persistent storage | `char* name, char* value, size_t size` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `syscfg_set()` | Store platform-specific configuration parameters to persistent storage | `char* name, char* value` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `syscfg_commit()` | Commit pending configuration changes to persistent storage | `void` | `0` on success, `-1` on error | `psm_hal_apis.c` |
| `PsmHal_GetHwParams()` | Retrieve hardware-specific default parameters for initial configuration | `PsmHalParam_t** params, int* count` | Parameter count or `-1` on error | `psm_hal_apis.c` |
CcspPsm integrates with platform-provided Syscfg APIs for persistent storage and configuration access. In this repository, these APIs are consumed by CcspPsm code, but their implementation/ownership is external to this repo rather than provided by `psm_hal_apis.c`.
**Core HAL APIs:**
| HAL API | Purpose | Parameters | Return Values | Implementation / Ownership |
|---------|---------|------------|---------------|----------------------------|
| `syscfg_get()` | Retrieve platform-specific configuration parameters from persistent storage | 4-argument form used in this repo, e.g. `syscfg_get(NULL, key, buf, size)` | `0` on success, `-1` on error | External Syscfg API used by CcspPsm; not implemented in this repository |
| `syscfg_set()` | Store platform-specific configuration parameters to persistent storage | Syscfg setter API supplied by the platform (context/namespace argument plus key/value, depending on platform headers) | `0` on success, `-1` on error | External Syscfg API used by CcspPsm; not implemented in this repository |
| `syscfg_commit()` | Commit pending configuration changes to persistent storage | `void` | `0` on success, `-1` on error | External Syscfg API used by CcspPsm; not implemented in this repository |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Comment thread README.md
Comment on lines +373 to +375
| `/etc/ccsp/psm_cfg.xml` | PSM runtime configuration | Cache size, flush intervals, backup settings | `CacheSize=1MB`, `FlushInterval=10s` | Environment variables, command-line args |
| `/nvram/bbhm_cur_cfg.xml` | Current active configuration | All runtime parameters | Loaded from default config | Parameter Set operations, configuration import |
| `/nvram/bbhm_bak_cfg.xml` | Backup configuration | Previous stable configuration | Previous current config | Automatic backup on major changes | No newline at end of file
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration file paths in this table don’t match the component’s defaults: config filenames are defined as psm_*_cfg.xml.gz under the SysFilePath "/psm/config/" (source/include/psm_properties.h), and the only bbhm_cur_cfg.xml reference in this repo is "/tmp/bbhm_cur_cfg.xml" (source/Ssp/ssp_cfmif.c), not /nvram/bbhm_cur_cfg.xml. Please update these entries to reflect the actual files/paths used.

Suggested change
| `/etc/ccsp/psm_cfg.xml` | PSM runtime configuration | Cache size, flush intervals, backup settings | `CacheSize=1MB`, `FlushInterval=10s` | Environment variables, command-line args |
| `/nvram/bbhm_cur_cfg.xml` | Current active configuration | All runtime parameters | Loaded from default config | Parameter Set operations, configuration import |
| `/nvram/bbhm_bak_cfg.xml` | Backup configuration | Previous stable configuration | Previous current config | Automatic backup on major changes |
| `/psm/config/psm_*_cfg.xml.gz` | Default persisted PSM configuration archives | Persistent parameter namespaces, stored configuration values, backup settings | Component defaults loaded from compressed XML config under `/psm/config/` | Build/runtime provisioning, configuration replacement during deployment |
| `/tmp/bbhm_cur_cfg.xml` | Runtime working copy of the current active configuration | All runtime parameters | Loaded from the default persisted PSM configuration | Parameter Set operations, configuration import |
| `/psm/config/psm_bak_cfg.xml.gz` | Backup persisted configuration archive | Previous stable configuration set | Previous persisted current configuration | Automatic backup/restore workflow |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified

Copy link
Copy Markdown
Contributor

@GoutamD2905 GoutamD2905 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raslam930 Please address all Copilot review comments.

@Ashrafbhanu-k
Copy link
Copy Markdown

@raslam930 Please address all Copilot review comments.

Hi @GoutamD2905 , all comments are addressed and raised as new PR at #27, could you please check the new PR and merge?
This PR can be closed i think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contribution from community documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants