
{"id":9582,"date":"2022-06-21T13:52:50","date_gmt":"2022-06-21T13:52:50","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/"},"modified":"2026-02-17T10:00:48","modified_gmt":"2026-02-17T10:00:48","slug":"ccspcommonlibrary","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/","title":{"rendered":"CcspCommonLibrary"},"content":{"rendered":"\n<p>CcspCommonLibrary serves as the foundational middleware library for the CCSP architecture in RDK-B. This comprehensive library provides essential infrastructure services that enable all RDK-B components to communicate, share data, and integrate within the broader RDK-B ecosystem. The library acts as the cornerstone that standardizes component interactions through message bus abstractions, data model APIs, and utility functions.<\/p>\n\n\n\n<p>At its core, CcspCommonLibrary serves three service layers. First, it establishes the communication backbone through CCSP message bus APIs that enable inter-component communication via RBus protocol. Second, it offers a collection of COSA (Component Object Software Architecture) utilities that provide standardized interfaces for system interactions, data structures, and protocol handling. Third, it delivers utility APIs for XML parsing, HTTP processing, cryptographic operations, and network protocol implementations that form the building blocks for higher-level RDK-B services.<\/p>\n\n\n\n<p>The component&#8217;s architecture ensures that all RDK-B middleware components have access to consistent, reliable foundational services while maintaining platform independence and supporting modern RBus communication patterns.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph LR\n    subgraph \"External Systems\"\n        RemoteMgmt[\"Remote Management\"]\n        LocalUI[\"Local Web UI\"]\n    end\n\n    subgraph \"RDK-B Platform\"\n        subgraph \"Remote Management Agents\"\n            ProtocolAgents[\"Protocol Agents&lt;br>( TR-069, WebPA, USP etc.)\"]\n        end\n\n        rdkbComponent[\"Other RDK-B Components&lt;br>(PSM,PNM,WAN Manager etc.)\"]\n        ComLib[\"CCSP Common Library\"]\n\n        subgraph \"Platform Layer\"\n            HAL[Platform HAL]\n            Linux[Linux]\n        end\n    end\n\n    %% External connections\n    RemoteMgmt -->|TR-069\/WebPA\/TR-369| ProtocolAgents\n    LocalUI -->|HTTP\/HTTPS| ProtocolAgents\n\n    %% Upper layer to RDK-B Components\n    ProtocolAgents -->|IPC| ComLib\n\n    %% Common Library to RDK-B Components\n    rdkbComponent &lt;-->|IPC\/API| ComLib\n\n    %% RDK-B Components to HAL\n    rdkbComponent -->|HAL APIs| HAL\n\n    %% System integration\n    HAL -->|Drivers| Linux\n\n    classDef external fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;\n    classDef ComLib fill:#e3f2fd,stroke:#1976d2,stroke-width:3px;\n    classDef rdkbComponent fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px;\n    classDef system fill:#fce4ec,stroke:#c2185b,stroke-width:2px;\n\n    class RemoteMgmt,LocalUI external;\n    class ComLib ComLib;\n    class ProtocolAgents,rdkbComponent rdkbComponent;\n    class HAL,Linux system;<\/pre><\/div>\n\n\n\n<p><strong>Key Features &amp; Responsibilities<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Message Bus Abstraction<\/strong>: Provides unified APIs for RBus communication protocol, enabling seamless inter-component messaging and event notifications across the RDK-B middleware stack<\/li>\n\n\n\n<li><strong>COSA Framework<\/strong>: Delivers comprehensive Component Object Software Architecture utilities including data structures, object management, and standardized interfaces for system interactions<\/li>\n\n\n\n<li><strong>Data Model APIs<\/strong>: Offers robust APIs for parameter management, configuration storage, and data model operations that support standardized data models<\/li>\n\n\n\n<li><strong>Protocol Libraries<\/strong>: Includes extensive protocol implementations for HTTP, XML parsing, TLS\/SSL, STUN, and network communication protocols essential for RDK-B operations<\/li>\n\n\n\n<li><strong>Utility Services<\/strong>: Provides foundational utility functions for memory management, string operations, file I\/O, timer services, and cryptographic operations<\/li>\n\n\n\n<li><strong>Platform Abstraction<\/strong>: Ensures platform independence through abstracted interfaces that hide underlying OS and hardware differences from higher-level components<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"design\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#design\">Design<\/a><\/h2>\n\n\n\n<p>CcspCommonLibrary&#8217;s design philosophy centers on providing a stable, well-defined foundational layer that enables all RDK-B components to operate cohesively within the CCSP architecture. The design follows a layered approach where lower-level system abstractions are built upon to create higher-level services, ensuring both modularity and reusability. The library&#8217;s architecture supports modern RBus communication patterns.<\/p>\n\n\n\n<p>The design addresses the requirements of a distributed middleware system by providing unified interfaces that abstract the underlying communication mechanisms. The CCSP message bus APIs serve as the primary communication backbone, offering both synchronous request-response patterns and asynchronous event notification mechanisms. This dual-mode communication support ensures that components can efficiently handle both immediate operations and long-term monitoring scenarios.<\/p>\n\n\n\n<p>The COSA framework within the library provides object-oriented abstractions that enable consistent data handling and system interactions across all RDK-B components. These abstractions include standardized data structures, memory management patterns, and interface definitions that promote code reuse and maintainability. The framework&#8217;s design supports both stateful and stateless component interactions, allowing for flexible deployment scenarios.<\/p>\n\n\n\n<p>Integration with north-bound interfaces is achieved through well-defined APIs that support multiple data model standards, enabling consistent device management interfaces. The library provides XML parsing capabilities, HTTP protocol support, and JSON handling that facilitate integration with web-based management interfaces and cloud services.<\/p>\n\n\n\n<p>South-bound integration with HAL layers and system services is handled through platform abstraction interfaces that isolate RDK-B components from underlying hardware and OS differences. The library provides standardized system service APIs for file operations, network management, timer services, and process management that ensure consistent behavior across different hardware platforms.<\/p>\n\n\n\n<p>The IPC mechanism design supports modern RBus protocols with built-in error handling, timeout management, and connection recovery mechanisms that ensure reliable communication in production environments.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">flowchart TD\n    subgraph CcspCommonLibrary [\"CcspCommonLibrary\"]\n    direction TB\n        subgraph MessageLayer [\"Message Bus Layer\"]\n            MsgBusAPI[CCSP Message Bus API]\n            RBusAPI[RBus Interface]\n        end\n        \n        subgraph CosaLayer [\"COSA Framework Layer\"]\n            ObjectMgmt[Object Management]\n            DataStructures[Data Structures]\n            SystemAbstraction[System Abstraction]\n        end\n        \n        subgraph ServiceLayer [\"Service Layer\"]\n            DataModelAPI[Data Model API]\n            ComponentMgmt[Component Management]\n            ConfigServices[Configuration Services]\n        end\n        \n        subgraph UtilityLayer [\"Utility Layer\"]\n            XMLParser[XML Parser]\n            HTTPLib[HTTP Library]\n            CryptoAPI[Crypto API]\n            StringUtils[String Utilities]\n        end\n        \n        subgraph ProtocolLayer [\"Protocol Layer\"]\n            TLSLib[TLS\/SSL]\n            STUNLib[STUN Protocol]\n            WebServices[Web Services]\n        end\n    end\n    \n    MsgBusAPI --> RBusAPI\n    ObjectMgmt --> SystemAbstraction\n    DataStructures --> ObjectMgmt\n    DataModelAPI --> MsgBusAPI\n    ComponentMgmt --> DataModelAPI\n    ConfigServices --> ObjectMgmt\n    XMLParser --> StringUtils\n    HTTPLib --> TLSLib\n    CryptoAPI --> SystemAbstraction\n    WebServices --> HTTPLib\n    STUNLib --> CryptoAPI<\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites-and-dependencies\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#prerequisites-and-dependencies\">Prerequisites and Dependencies<\/a><\/h3>\n\n\n\n<p><strong>RDK-B Platform and Integration Requirements (MUST):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RDK-B Components<\/strong>: Foundation library for all CCSP components &#8211; no other RDK-B components can function without this library<\/li>\n\n\n\n<li><strong>HAL Dependencies<\/strong>: Platform-specific HAL interfaces for system abstraction<\/li>\n\n\n\n<li><strong>Systemd Services<\/strong>: RBus broker service when using RBus protocol<\/li>\n\n\n\n<li><strong>Message Bus<\/strong>: RBus broker for RBus-enabled components<\/li>\n\n\n\n<li><strong>Configuration Files<\/strong>:\u00a0<code>\/tmp\/ccsp_msg.cfg<\/code>\u00a0for message bus,\u00a0<code>\/usr\/ccsp\/<\/code>\u00a0directory structure for components<\/li>\n\n\n\n<li><strong>Startup Order<\/strong>: Must initialize before any CCSP component, depends on system services and network interfaces<\/li>\n<\/ul>\n\n\n\n<p><strong>Threading Model<\/strong><\/p>\n\n\n\n<p>CcspCommonLibrary implements a hybrid threading model that supports both single-threaded and multi-threaded usage patterns depending on the specific API being used. The library is designed to be thread-safe for concurrent access while providing efficient single-threaded operation paths for components that don&#8217;t require concurrency.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Threading Architecture<\/strong>: Multi-threaded with thread-safe APIs and optional single-threaded optimization paths<\/li>\n\n\n\n<li><strong>Main Thread<\/strong>: Message bus event loop processing, component registration, and configuration management<\/li>\n\n\n\n<li><strong>Main worker Threads<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Message Bus Handler Thread<\/strong>: Processes incoming RBus messages and dispatches to appropriate handlers<\/li>\n\n\n\n<li><strong>Timer Service Thread<\/strong>: Manages timer callbacks and scheduled operations for utility APIs<\/li>\n\n\n\n<li><strong>Network I\/O Thread<\/strong>: Handles asynchronous network operations for HTTP and protocol libraries<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Synchronization<\/strong>: Mutex-based synchronization for shared data structures, lock-free queues for message passing, read-write locks for configuration data<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"component-state-flow\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#component-state-flow\">Component State Flow<\/a><\/h3>\n\n\n\n<p><strong>Initialization to Active State<\/strong><\/p>\n\n\n\n<p>CcspCommonLibrary follows a well-defined initialization sequence that ensures all subsystems are properly configured before any RDK-B components can utilize its services. The initialization process includes platform detection, message bus setup, and configuration loading.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">%%{init: { \"config\": { \"useMaxWidth\": false } }}%%\nsequenceDiagram\n    autonumber\n    participant System\n    participant LibraryLoader\n    participant PlatformDetector\n    participant MessageBusManager\n    participant COSAFramework\n    participant UtilityServices\n    participant EventHandler\n\n    System->>System: Start [*] \u2192 LibraryInit\n    Note right of System: Initialize logging system&lt;br\/>Allocate core data structures&lt;br\/>Load configuration files\n\n    System->>LibraryLoader: Library Start \u2192 PlatformDetection\n    LibraryLoader->>PlatformDetector: Load Platform Config\n    Note right of PlatformDetector: Detect hardware platform&lt;br\/>Load platform-specific settings&lt;br\/>Initialize platform constants&lt;br\/>Validate configuration\n\n    PlatformDetector->>MessageBusManager: Platform Config Loaded \u2192 MessageBusInit\n    Note right of MessageBusManager: Detect RBus Support&lt;br\/>Initialize message bus connections&lt;br\/>Setup IPC mechanisms&lt;br\/>Establish communication channels\n\n    MessageBusManager->>COSAFramework: Message Bus Connected \u2192 CosaInit\n    Note right of COSAFramework: Connect to Message Bus&lt;br\/>Initialize COSA object framework&lt;br\/>Setup data structures&lt;br\/>Register core services\n\n    COSAFramework->>UtilityServices: COSA Framework Ready \u2192 UtilityInit\n    Note right of UtilityServices: Initialize COSA Framework&lt;br\/>Setup utility APIs&lt;br\/>Initialize protocol libraries&lt;br\/>Prepare foundation services\n\n    UtilityServices->>System: All Services Ready \u2192 Active\n    Note right of System: All Subsystems Ready&lt;br\/>Process IPC messages&lt;br\/>Handle component registrations&lt;br\/>Manage utility service requests\n\n    System->>EventHandler: Component Request \u2192 MessageProcessing\n    EventHandler->>EventHandler: Handle Component Requests\n    EventHandler->>System: Request Completed \u2192 Active\n\n    System->>System: Configuration Change \u2192 ConfigUpdate\n    System->>System: Config Applied \u2192 Active\n\n    System->>System: Library Unload \u2192 Shutdown \u2192 [*]<\/pre><\/div>\n\n\n\n<p><strong>Runtime State Changes and Context Switching<\/strong><\/p>\n\n\n\n<p>The library maintains several runtime states that can change based on system conditions and component interactions. These state changes are designed to maintain service availability even during system stress conditions.<\/p>\n\n\n\n<p><strong>State Change Triggers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Message Bus Reconnection<\/strong>: Automatic reconnection when RBus broker restarts or becomes unavailable<\/li>\n\n\n\n<li><strong>Configuration Reload<\/strong>: Dynamic configuration updates without requiring component restarts<\/li>\n\n\n\n<li><strong>Protocol Migration<\/strong>: Seamless transition between RBus protocols based on system capability detection<\/li>\n<\/ul>\n\n\n\n<p><strong>Context Switching Scenarios:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Performance Mode<\/strong>: Switch to optimized single-threaded mode for resource-constrained environments<\/li>\n\n\n\n<li><strong>Debug Mode<\/strong>: Enhanced logging and monitoring when system debugging is enabled<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"call-flow\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#call-flow\">Call Flow<\/a><\/h3>\n\n\n\n<p><strong>Initialization Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant System as System Init\n    participant CcspLib as CcspCommonLibrary\n    participant MsgBus as Message Bus\n    participant Config as Configuration\n\n    System->>CcspLib: Library Load (dlopen\/static)\n    CcspLib->>CcspLib: Initialize Core Structures\n    CcspLib->>Config: Load ccsp_msg.cfg\n    Config-->>CcspLib: Configuration Data\n    CcspLib->>MsgBus: Connect to RBus\n    MsgBus-->>CcspLib: Connection Established\n    CcspLib->>CcspLib: Initialize COSA Framework\n    CcspLib->>System: Initialization Complete (Ready State)<\/pre><\/div>\n\n\n\n<p><strong>Request Processing Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Component as RDK-B Component\n    participant CcspLib as CcspCommonLibrary\n    participant MsgBus as Message Bus\n    participant Target as Target Component\n\n    Component->>CcspLib: API Call (ccsp_base_api_call)\n    CcspLib->>CcspLib: Validate Parameters\n    CcspLib->>MsgBus: Send Message (RBus)\n    MsgBus->>Target: Route Message\n    Target-->>MsgBus: Response\n    MsgBus-->>CcspLib: Response Received\n    CcspLib->>CcspLib: Process Response\n    CcspLib-->>Component: Return Result<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"internal-modules\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#internal-modules\">Internal Modules<\/a><\/h2>\n\n\n\n<p>CcspCommonLibrary is organized into several specialized modules, each providing distinct functionality to support the overall CCSP architecture. The CCSP module handles core message bus operations and component registration, while the COSA module provides object-oriented abstractions and utilities. Additional modules focus on specific protocol implementations and platform abstraction services.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>CCSP Message Bus<\/strong><\/td><td>Core communication infrastructure providing RBus abstraction APIs for inter-component messaging<\/td><td><code><strong>ccsp_base_api<\/strong>.h<\/code>,&nbsp;<code><strong>ccsp_message_bus<\/strong>.h<\/code>,&nbsp;<code><strong>rbus_message_bus<\/strong>.h<\/code><\/td><\/tr><tr><td><strong>COSA Framework<\/strong><\/td><td>Component Object Software Architecture providing data structures, object management, and system abstractions<\/td><td><code><strong>ansc_platform<\/strong>.h<\/code>,&nbsp;<code><strong>ansc_wrapper_api<\/strong>.h<\/code>,&nbsp;<code><strong>ansc_<\/strong>*.h<\/code><\/td><\/tr><tr><td><strong>Data Model API<\/strong><\/td><td>PSM integration, and configuration services for standardized device management<\/td><td><code><strong>ccsp_dm_api<\/strong>.h<\/code>,&nbsp;<code><strong>ccsp_psm_helper<\/strong>.h<\/code><\/td><\/tr><tr><td><strong>Utility APIs<\/strong><\/td><td>Foundation services including XML parsing, HTTP processing, string utilities, memory management, and crypto services<\/td><td><code>util_api\/http\/<\/code>,&nbsp;<code>util_api\/ansc\/<\/code>,&nbsp;<code>util_api\/tls\/<\/code><\/td><\/tr><tr><td><strong>Protocol Libraries<\/strong><\/td><td>Network protocol implementations for STUN, TLS\/SSL, and other communication protocols<\/td><td><code>util_api\/stun\/<\/code>,&nbsp;<code>util_api\/tls\/<\/code>,&nbsp;<code>util_api\/web\/<\/code><\/td><\/tr><tr><td><strong>Component Management<\/strong><\/td><td>CCSP component lifecycle management, namespace resolution, and alias management services<\/td><td><code>CCSP_NamespaceMgr\/<\/code>,&nbsp;<code>CCSP_AliasMgr\/<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"component-interactions\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#component-interactions\">Component Interactions<\/a><\/h2>\n\n\n\n<p>CcspCommonLibrary serves as the central communication hub for all RDK-B middleware components, providing standardized interfaces for message passing, data model operations, and utility services. The library&#8217;s interaction patterns support CCSP architectures using modern RBus protocols.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"interaction-matrix\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#interaction-matrix\">Interaction Matrix<\/a><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>RDK-B Middleware Components<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>All CCSP Components<\/td><td>Foundation library services, message bus access<\/td><td><code>ccsp_base_api_*()<\/code>,&nbsp;<code>COSA_*()<\/code>&nbsp;functions<\/td><\/tr><tr><td>Message Bus Clients<\/td><td>Inter-component communication, event notifications<\/td><td><code>CcspBaseIf_*()<\/code>, RBus method calls<\/td><\/tr><tr><td>Configuration Clients<\/td><td>Parameter management, persistent storage<\/td><td><code>PSM_Get_Record_Value()<\/code>,&nbsp;<code>PSM_Set_Record_Value()<\/code><\/td><\/tr><tr><td><strong>System &amp; Platform Layers<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>HAL Interfaces<\/td><td>Hardware abstraction, platform services<\/td><td>Platform-specific HAL APIs<\/td><\/tr><tr><td>Linux OS Services<\/td><td>System resources, file I\/O, networking<\/td><td><code><strong>open<\/strong>()<\/code>,&nbsp;<code><strong>socket<\/strong>()<\/code>,&nbsp;<code><strong>timer_create<\/strong>()<\/code><\/td><\/tr><tr><td>RBus Broker<\/td><td>Modern CCSP component communication<\/td><td><code><strong>rbus_open<\/strong>()<\/code>,&nbsp;<code>rbus_method_*()<\/code><\/td><\/tr><tr><td><strong>External Systems<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>Configuration Storage<\/td><td>Persistent parameter storage, device configuration<\/td><td>Configuration file parsers<\/td><\/tr><tr><td>Logging System<\/td><td>System logging, debugging, audit trails<\/td><td><code><strong>syslog<\/strong>()<\/code>,&nbsp;<code>journal<\/code>&nbsp;APIs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Main events Published by CcspCommonLibrary:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Component Registration<\/td><td><code><strong>Component<\/strong>.Registration<\/code><\/td><td>New CCSP component registers with system<\/td><td>All registered CCSP components<\/td><\/tr><tr><td>Message Bus Status<\/td><td><code><strong>MessageBus<\/strong>.Status<\/code><\/td><td>RBus connection state changes<\/td><td>System monitoring components<\/td><\/tr><tr><td>Configuration Change<\/td><td><code><strong>Config<\/strong>.ParameterChanged<\/code><\/td><td>System configuration parameter updated<\/td><td>Dependent components<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ipc-flow-patterns\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#ipc-flow-patterns\">IPC Flow Patterns<\/a><\/h3>\n\n\n\n<p><strong>Primary IPC Flow &#8211; Component Registration:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant NewComp as New CCSP Component\n    participant CommonLib as CcspCommonLibrary\n    participant MsgBus as Message Bus\n    participant ExistingComp as Existing Components\n\n    NewComp->>CommonLib: CcspBaseIf_RegisterCapabilities()\n    Note over CommonLib: Validate component namespace &amp; capabilities\n    CommonLib->>MsgBus: Register component on message bus\n    MsgBus-->>CommonLib: Registration successful\n    CommonLib->>CommonLib: Add to component registry\n    CommonLib->>ExistingComp: Broadcast component registration event\n    ExistingComp-->>CommonLib: Acknowledgment (if required)\n    CommonLib-->>NewComp: Registration complete<\/pre><\/div>\n\n\n\n<p><strong>Data Model Operation Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Client as Client Component\n    participant CommonLib as CcspCommonLibrary\n    participant PSM as Parameter Storage\n    participant Provider as Data Model Provider\n\n    Client->>CommonLib: CcspBaseIf_getParameterValues()\n    Note over CommonLib: Parse parameter names &amp; validate access\n    CommonLib->>MsgBus: Query data model provider\n    MsgBus->>Provider: GetParameterValues request\n    Provider->>PSM: Retrieve stored values (if cached)\n    PSM-->>Provider: Parameter values\n    Provider-->>MsgBus: Response with values\n    MsgBus-->>CommonLib: Parameter data\n    CommonLib->>CommonLib: Format response structure\n    CommonLib-->>Client: parameterValueStruct array<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"implementation-details\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#implementation-details\">Implementation Details<\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"major-hal-apis-integration\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#major-hal-apis-integration\">Major HAL APIs Integration<\/a><\/h3>\n\n\n\n<p>CcspCommonLibrary integrates with platform-specific HAL interfaces to provide hardware abstraction services to RDK-B components. The library uses a standardized HAL abstraction layer that allows components to interact with hardware without direct platform dependencies.<\/p>\n\n\n\n<p><strong>Core HAL APIs:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><code><strong>platform_hal_GetDeviceProperties<\/strong>()<\/code><\/td><td>Retrieve device hardware information and capabilities<\/td><td><code><strong>source<\/strong>\/cosa\/custom\/platform_hal.c<\/code><\/td><\/tr><tr><td><code><strong>platform_hal_GetSystemTime<\/strong>()<\/code><\/td><td>Get current system time from hardware RTC<\/td><td><code><strong>source<\/strong>\/cosa\/custom\/platform_hal.c<\/code><\/td><\/tr><tr><td><code><strong>platform_hal_SetLED<\/strong>()<\/code><\/td><td>Control device LED indicators for status display<\/td><td><code><strong>source<\/strong>\/cosa\/custom\/platform_hal.c<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"key-implementation-logic\"><a href=\"https:\/\/wiki.rdkcentral.com\/spaces\/RDK\/pages\/460988728\/CcspCommonLibrary#key-implementation-logic\">Key Implementation Logic<\/a><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Message Bus Engine<\/strong>: The core message bus implementation supports RBus protocols through a unified API abstraction. Main implementation in\u00a0<code><strong>source<\/strong>\/util_api\/ccsp_msg_bus\/ccsp_base_api.c<\/code>. Protocol-specific handlers in\u00a0<code><strong>source<\/strong>\/util_api\/ccsp_msg_bus\/ccsp_message_bus.c<\/code>.<\/li>\n\n\n\n<li><strong>COSA Object Framework<\/strong>: Provides object-oriented programming abstractions in C for consistent data handling. Base object implementation in\u00a0<code><strong>source<\/strong>\/cosa\/<strong>package<\/strong>\/system\/components\/SysRepositoryDriver\/<\/code>. Object container management in\u00a0<code><strong>source<\/strong>\/cosa\/utilities\/AnscObjectArray\/<\/code>.<\/li>\n\n\n\n<li><strong>Configuration Management<\/strong>: Handles persistent parameter storage and configuration file processing. PSM integration in\u00a0<code><strong>source<\/strong>\/util_api\/ccsp_dm_api\/ccsp_psm_helper.c<\/code>. Configuration parsing in various utility modules under\u00a0<code><strong>source<\/strong>\/util_api\/<\/code>.<\/li>\n\n\n\n<li><strong>Error Handling Strategy<\/strong>: Comprehensive error detection and recovery mechanisms for reliable operation. RBus connection recovery and automatic reconnection. Memory leak prevention through proper resource cleanup. Component crash recovery through message bus monitoring.<\/li>\n\n\n\n<li><strong>Threading and Synchronization<\/strong>: Thread-safe operation with optimized single-threaded paths. Main event loop in message bus API implementation. Worker thread management for asynchronous operations. Mutex-based synchronization for shared data structures.<\/li>\n\n\n\n<li><strong>Logging &amp; Debugging<\/strong>: Multi-level logging system with runtime configuration support. Syslog integration for system-wide logging consistency. Component-specific log categories and verbosity levels. Debug hooks for message bus transaction tracing. Memory usage monitoring and leak detection tools.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CcspCommonLibrary serves as the foundational middleware library for the CCSP architecture in RDK-B. This comprehensive [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"parent":9575,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-9582","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CcspCommonLibrary - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CcspCommonLibrary - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"CcspCommonLibrary serves as the foundational middleware library for the CCSP architecture in RDK-B. This comprehensive [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-17T10:00:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/\",\"name\":\"CcspCommonLibrary - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2022-06-21T13:52:50+00:00\",\"dateModified\":\"2026-02-17T10:00:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"RDK Broadband\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Components\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"CcspCommonLibrary\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CcspCommonLibrary - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/","og_locale":"en_US","og_type":"article","og_title":"CcspCommonLibrary - RDK Documentation Portal | Documentation","og_description":"CcspCommonLibrary serves as the foundational middleware library for the CCSP architecture in RDK-B. This comprehensive [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2026-02-17T10:00:48+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/","name":"CcspCommonLibrary - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2022-06-21T13:52:50+00:00","dateModified":"2026-02-17T10:00:48+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspcommonlibrary\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"RDK Broadband","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/"},{"@type":"ListItem","position":4,"name":"Components","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/"},{"@type":"ListItem","position":5,"name":"CcspCommonLibrary"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=9582"}],"version-history":[{"count":2,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9582\/revisions"}],"predecessor-version":[{"id":12716,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9582\/revisions\/12716"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9575"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=9582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}