当前位置: 首页>>代码示例>>C++>>正文


C++ PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle方法代码示例

本文整理汇总了C++中PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle方法的具体用法?C++ PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle怎么用?C++ PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDSLH_CPE_CONTROLLER_OBJECT的用法示例。


在下文中一共展示了PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CcspComponentLoadDmXmlList

ANSC_STATUS
ssp_engage_wifi
    (
        PCCSP_COMPONENT_CFG         pStartCfg
    )
{
    ANSC_STATUS                     returnStatus    = ANSC_STATUS_SUCCESS;
    char                            CrName[256]     = {0};
    PCCSP_DM_XML_CFG_LIST           pXmlCfgList     = NULL;

    g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Yellow;


    if ( pWifiCcdIf )
    {
        pWifiFcContext->hCcspCcdIf = (ANSC_HANDLE)pWifiCcdIf;
        pWifiFcContext->hMessageBus = bus_handle;
    }

    g_DslhDataModelAgent->SetFcContext((ANSC_HANDLE)g_DslhDataModelAgent, (ANSC_HANDLE)pWifiFcContext);

    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)MsgHelper_CreateCcdMbiIf((void*)bus_handle,g_Subsystem));
    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)pWifiCcdIf);
    pDslhCpeController->SetDbusHandle((ANSC_HANDLE)pDslhCpeController, bus_handle);
    pDslhCpeController->Engage((ANSC_HANDLE)pDslhCpeController);

    if ( g_Subsystem[0] != 0 )
    {
        _ansc_sprintf(CrName, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR);
    }
    else
    {
        _ansc_sprintf(CrName, "%s", CCSP_DBUS_INTERFACE_CR);
    }

    returnStatus = CcspComponentLoadDmXmlList(pStartCfg->DmXmlCfgFileName, &pXmlCfgList);

    if ( returnStatus != ANSC_STATUS_SUCCESS )
    {
        return  returnStatus;
    }

    returnStatus =
        pDslhCpeController->RegisterCcspDataModel
            (
                (ANSC_HANDLE)pDslhCpeController,
                CrName,                             /* CCSP CR ID */
                pXmlCfgList->FileList[0],           /* Data Model XML file. Can be empty if only base data model supported. */
                pStartCfg->ComponentName,           /* Component Name    */
                pStartCfg->Version,                 /* Component Version */
                pStartCfg->DbusPath,                /* Component Path    */
                g_Subsystem                         /* Component Prefix  */
            );

    if ( returnStatus == ANSC_STATUS_SUCCESS || returnStatus == CCSP_SUCCESS )
    {
        /* System is fully initialized */
        g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Green;
    }

    AnscFreeMemory(pXmlCfgList);

    return ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspWifiAgent,代码行数:64,代码来源:ssp_action.c

示例2: DslhCreateCpeController

ANSC_STATUS
ssp_engage_tad
    (
    )
{
	ANSC_STATUS					    returnStatus                                         = ANSC_STATUS_SUCCESS;
        char                                                CrName[256];

    g_pComponent_Common_Dm->Health = CCSP_COMMON_COMPONENT_HEALTH_Yellow;

    if ( pTadCcdIf )
    {
        pTadFcContext->hCcspCcdIf = (ANSC_HANDLE)pTadCcdIf;
        pTadFcContext->hMessageBus = bus_handle;
    }

    g_DslhDataModelAgent->SetFcContext((ANSC_HANDLE)g_DslhDataModelAgent, (ANSC_HANDLE)pTadFcContext);

    /*RDKB-7459, CID-33428, null check before use */
    if(!pDslhCpeController)
    {
        pDslhCpeController = DslhCreateCpeController(NULL, NULL, NULL);
        if ( !pDslhCpeController )
        {
            CcspTraceWarning(("Null Value, CANNOT Create pDslhCpeController... Exit!\n"));
            return ANSC_STATUS_RESOURCES;
        }
    }

    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)MsgHelper_CreateCcdMbiIf((void*)bus_handle, g_Subsystem));
    pDslhCpeController->AddInterface((ANSC_HANDLE)pDslhCpeController, (ANSC_HANDLE)pTadCcdIf);
    pDslhCpeController->SetDbusHandle((ANSC_HANDLE)pDslhCpeController, bus_handle);
    pDslhCpeController->Engage((ANSC_HANDLE)pDslhCpeController);

    if ( g_Subsystem[0] != 0 )
    {
        _ansc_sprintf(CrName, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR);
    }
    else
    {
        _ansc_sprintf(CrName, "%s", CCSP_DBUS_INTERFACE_CR);
    }

    if ( TRUE )
    {

        /*RDKB-7459, CID-33428, Load Lib if handle is null */
        if( hDiagPlugin == NULL)
        {
            hDiagPlugin = (ANSC_HANDLE)AnscLoadLibrary(COSA_DIAG_PLUGIN_LIBRARY_NAME);
        }

        if( hDiagPlugin == NULL)
        {
            CcspTraceWarning(("Unable to load library -- %s\n", COSA_DIAG_PLUGIN_LIBRARY_NAME));
#ifdef _ANSC_LINUX
            CcspTraceWarning(("cause:%s\n",  dlerror() ));
#endif
            g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
        }
        else
        {
            g_CosaDiagPluginInfo.InitProc = (COSADiagInitProc)
                AnscGetProcAddress
                    (
                        hDiagPlugin,
                        COSA_DIAG_PLUGIN_INIT_PROC
                    );

            if ( g_CosaDiagPluginInfo.InitProc == NULL )
            {
                AnscTraceWarning(("Unable to Get ProcAddress of  '%s'\n", COSA_DIAG_PLUGIN_INIT_PROC));

                g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
            }
            else
            {
                g_CosaDiagPluginInfo.UnloadProc = (COSADiagUnloadProc)
                    AnscGetProcAddress
                        (
                            hDiagPlugin,
                            COSA_DIAG_PLUGIN_UNLOAD_PROC
                        );

                if ( g_CosaDiagPluginInfo.UnloadProc == NULL )
                {
                    AnscTraceWarning(("Unable to Get ProcAddress of  '%s'\n", COSA_DIAG_PLUGIN_UNLOAD_PROC));

                    g_CosaDiagPluginInfo.uLoadStatus = COSA_STATUS_ERROR_LOAD_LIBRARY;
                }
                else
                {
                    g_CosaDiagPluginInfo.GetResultsProc = (CosaDiagGetResultsProc)
                        AnscGetProcAddress
                            (
                                hDiagPlugin,
                                COSA_DIAG_PLUGIN_GETRESULTS_PROC
                            );

                    if ( g_CosaDiagPluginInfo.GetResultsProc == NULL )
//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:101,代码来源:ssp_action.c


注:本文中的PDSLH_CPE_CONTROLLER_OBJECT::SetDbusHandle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。