本文整理汇总了C++中PDSLH_CPE_CONTROLLER_OBJECT::GetDslhMpaIf方法的典型用法代码示例。如果您正苦于以下问题:C++ PDSLH_CPE_CONTROLLER_OBJECT::GetDslhMpaIf方法的具体用法?C++ PDSLH_CPE_CONTROLLER_OBJECT::GetDslhMpaIf怎么用?C++ PDSLH_CPE_CONTROLLER_OBJECT::GetDslhMpaIf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDSLH_CPE_CONTROLLER_OBJECT
的用法示例。
在下文中一共展示了PDSLH_CPE_CONTROLLER_OBJECT::GetDslhMpaIf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AnscTraceWarning
int
CcspCcMbi_AddTblRow
(
int sessionId,
char * objectName,
int * instanceNumber,
void * user_data
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PDSLH_MPA_INTERFACE pDslhMpaIf = (PDSLH_MPA_INTERFACE )g_pDslhCpeController->GetDslhMpaIf((ANSC_HANDLE)g_pDslhCpeController);
int iStatus = 0;
/*with component binding, we have multiple CpeController handle, each for a component*/
if (user_data)
{
PDSLH_CPE_CONTROLLER_OBJECT pCpeco = user_data;
pDslhMpaIf = (PDSLH_MPA_INTERFACE )pCpeco->GetDslhMpaIf((ANSC_HANDLE)pCpeco);
}
if ( (g_currentSessionID != 0) && (sessionId != g_currentSessionID) )
{
AnscTraceWarning(("!!! AddTblRow discarded, session id is NOT match !!!\n"));
return ANSC_STATUS_DISCARD;
}
if ( !objectName || !instanceNumber )
{
AnscTraceError(("Input parameter invalid for ssp_SsdMbi_AddTblRow\n"));
returnStatus = CCSP_ERR_INVALID_ARGUMENTS;
goto EXIT;
}
if ( !pDslhMpaIf )
{
AnscTraceError(("pDslhMpaIf is NULL for ssp_SsdMbi_AddTblRow\n"));
returnStatus = ANSC_STATUS_INTERNAL_ERROR;
goto EXIT;
}
returnStatus =
pDslhMpaIf->AddObject
(
pDslhMpaIf->hOwnerContext,
DSLH_MPA_ENTITY_ACS,
objectName,
instanceNumber,
&iStatus
);
EXIT:
return (returnStatus == ANSC_STATUS_SUCCESS) ? CCSP_SUCCESS : returnStatus;
}
示例2: AnscTraceError
int
CcspCcMbi_GetParameterNames
(
char * parameterName,
dbus_bool nextLevel,
int *size ,
parameterInfoStruct_t ***val,
void * user_data
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PDSLH_MPA_INTERFACE pDslhMpaIf = (PDSLH_MPA_INTERFACE )g_pDslhCpeController->GetDslhMpaIf((ANSC_HANDLE)g_pDslhCpeController);
PDSLH_MPR_INTERFACE pDslhMprIf = (PDSLH_MPR_INTERFACE )g_pDslhCpeController->GetDslhMprIf((ANSC_HANDLE)g_pDslhCpeController);
PDSLH_CWMP_PARAM_INFO pParamInfoArray = (PDSLH_CWMP_PARAM_INFO )NULL;
ULONG ulArraySize = (ULONG )0;
parameterInfoStruct_t** ppReturnVal = NULL;
ULONG i = 0;
/*with component binding, we have multiple CpeController handle, each for a component*/
if (user_data)
{
PDSLH_CPE_CONTROLLER_OBJECT pCpeco = user_data;
pDslhMpaIf = (PDSLH_MPA_INTERFACE )pCpeco->GetDslhMpaIf((ANSC_HANDLE)pCpeco);
pDslhMprIf = (PDSLH_MPR_INTERFACE )pCpeco->GetDslhMprIf((ANSC_HANDLE)pCpeco);
}
if ( !parameterName )
{
AnscTraceError(("Input parameter invalid for ssp_SsdMbi_GetParameterNames\n"));
returnStatus = CCSP_ERR_INVALID_PARAMETER_NAME;
goto EXIT;
}
if ( !pDslhMpaIf )
{
AnscTraceError(("pDslhMpaIf is NULL for ssp_SsdMbi_GetParameterNames\n"));
returnStatus = ANSC_STATUS_INTERNAL_ERROR;
goto EXIT;
}
/* increase the request counter by one */
pDslhMprIf->IncReqCounter(pDslhMprIf->hOwnerContext);
returnStatus =
pDslhMpaIf->GetParameterNames
(
pDslhMpaIf->hOwnerContext,
DSLH_MPA_ENTITY_ACS,
parameterName,
nextLevel,
&pParamInfoArray,
&ulArraySize
);
if ( returnStatus != ANSC_STATUS_SUCCESS )
{
/*
* Something serious has screwed up (e.g. we have run out of system memory), abort!
*/
goto EXIT1;
}
ppReturnVal = AnscAllocateMemory(ulArraySize * sizeof(parameterInfoStruct_t *));
if ( !ppReturnVal )
{
AnscTraceError(("ssp_SsdMbi_GetParameterNames -- No Resource\n"));
returnStatus = ANSC_STATUS_RESOURCES;
goto EXIT1;
}
AnscZeroMemory(ppReturnVal, ulArraySize * sizeof(parameterInfoStruct_t *));
for ( i = 0; i < ulArraySize; i++ )
{
ppReturnVal[i] = AnscAllocateMemory(sizeof(parameterInfoStruct_t));
if ( !ppReturnVal[i] )
{
AnscTraceError(("ssp_SsdMbi_GetParameterNames -- No Resource\n"));
returnStatus = ANSC_STATUS_RESOURCES;
goto EXIT1;
}
AnscZeroMemory(ppReturnVal[i], sizeof(parameterInfoStruct_t));
ppReturnVal[i]->parameterName = AnscCloneString(pParamInfoArray[i].Name);
ppReturnVal[i]->writable = pParamInfoArray[i].bWritable;
}
EXIT1:
//.........这里部分代码省略.........
示例3: if
int
CcspCcMbi_SetParameterValues
(
int sessionId,
unsigned int writeID,
parameterValStruct_t *val,
int size,
dbus_bool commit,
char ** invalidParameterName,
void * user_data
)
{
ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS;
PDSLH_MPA_INTERFACE pDslhMpaIf = (PDSLH_MPA_INTERFACE )g_pDslhCpeController->GetDslhMpaIf((ANSC_HANDLE)g_pDslhCpeController);
PDSLH_MPR_INTERFACE pDslhMprIf = (PDSLH_MPR_INTERFACE )g_pDslhCpeController->GetDslhMprIf((ANSC_HANDLE)g_pDslhCpeController);
PDSLH_CWMP_PARAM_VALUE pParamArray = NULL;
PDSLH_CWMP_PARAM_VALUE pParamValue = NULL;
PSLAP_VARIABLE pSlapVariable = (PSLAP_VARIABLE)NULL;
PDSLH_CWMP_SOAP_FAULT pCwmpSoapFault = (PDSLH_CWMP_SOAP_FAULT )NULL;
int iStatus = 0;
int i = 0;
/*with component binding, we have multiple CpeController handle, each for a component*/
if (user_data)
{
PDSLH_CPE_CONTROLLER_OBJECT pCpeco = user_data;
pDslhMpaIf = (PDSLH_MPA_INTERFACE )pCpeco->GetDslhMpaIf((ANSC_HANDLE)pCpeco);
pDslhMprIf = (PDSLH_MPR_INTERFACE )pCpeco->GetDslhMprIf((ANSC_HANDLE)pCpeco);
}
if ( (g_currentSessionID != 0) && (sessionId != g_currentSessionID) )
{
AnscTraceWarning(("!!! SetParameterValues discarded, session id is NOT match !!!\n"));
return ANSC_STATUS_DISCARD;
}
if ( !val || size == 0 )
{
AnscTraceError(("Input parameter invalid for ssp_SsdMbi_GetParameterValues\n"));
returnStatus = CCSP_ERR_INVALID_ARGUMENTS;
goto EXIT;
}
if ( !pDslhMpaIf )
{
AnscTraceError(("pDslhMpaIf is NULL for ssp_SsdMbiSetParameterValues\n"));
returnStatus = ANSC_STATUS_INTERNAL_ERROR;
goto EXIT;
}
/* increase the request counter by one */
pDslhMprIf->IncReqCounter(pDslhMprIf->hOwnerContext);
pParamArray = (PDSLH_CWMP_PARAM_VALUE)
AnscAllocateMemory(sizeof(DSLH_CWMP_PARAM_VALUE) * size);
if( pParamArray == NULL)
{
returnStatus = ANSC_STATUS_RESOURCES;
goto EXIT;
}
for ( i = 0; i < size; i++ )
{
pParamValue = &pParamArray[i];
pParamValue->Name = AnscCloneString(val[i].parameterName);
pSlapVariable = (PSLAP_VARIABLE)AnscAllocateMemory(sizeof(SLAP_VARIABLE));
if ( !pSlapVariable )
{
returnStatus = ANSC_STATUS_RESOURCES;
goto EXIT1;
}
SlapInitVariable(pSlapVariable);
pParamValue->Value = pSlapVariable;
pSlapVariable->Name = NULL;
pSlapVariable->ContentType = 0;
pSlapVariable->UsageType = 0;
if ( val[i].type == ccsp_string )
{
pSlapVariable->Syntax = SLAP_VAR_SYNTAX_string;
pSlapVariable->Variant.varString = AnscCloneString(val[i].parameterValue);
}
else if ( val[i].type == ccsp_int )
{
//.........这里部分代码省略.........