本文整理汇总了C++中fapi::Target::isChip方法的典型用法代码示例。如果您正苦于以下问题:C++ Target::isChip方法的具体用法?C++ Target::isChip怎么用?C++ Target::isChip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fapi::Target
的用法示例。
在下文中一共展示了Target::isChip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fapiGetChildChiplets
//******************************************************************************
// fapiGetChildChiplets function
//******************************************************************************
fapi::ReturnCode fapiGetChildChiplets(
const fapi::Target & i_chip,
const fapi::TargetType i_chipletType,
std::vector<fapi::Target> & o_chiplets,
const fapi::TargetState i_state)
{
FAPI_DBG(ENTER_MRK "fapiGetChildChiplets. Chiplet Type:0x%08x State:0x%08x",
i_chipletType, i_state);
fapi::ReturnCode l_rc;
o_chiplets.clear();
// Extract the HostBoot Target pointer for the input chip
TARGETING::Target * l_pChip =
reinterpret_cast<TARGETING::Target*>(i_chip.get());
// Check that the input target is a chip
if (!i_chip.isChip())
{
FAPI_ERR("fapiGetChildChiplets. Input target type 0x%08x is not a chip",
i_chip.getType());
/*@
* @errortype
* @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS
* @reasoncode fapi::RC_INVALID_REQUEST
* @userdata1 Type of input target
* @userdata2 Input Target HUID
* @devdesc fapiGetChildChiplets request for non-chip
*/
const bool hbSwError = true;
errlHndl_t l_pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_FAPI_GET_CHILD_CHIPLETS,
fapi::RC_INVALID_REQUEST,
i_chip.getType(),
TARGETING::get_huid(l_pChip),
hbSwError);
// Attach the error log to the fapi::ReturnCode
l_rc.setPlatError(reinterpret_cast<void *> (l_pError));
}
else
{
TARGETING::TYPE l_type = TARGETING::TYPE_NA;
if (i_chipletType == fapi::TARGET_TYPE_EX_CHIPLET)
{
l_type = TARGETING::TYPE_EX;
}
else if (i_chipletType == fapi::TARGET_TYPE_MBA_CHIPLET)
{
l_type = TARGETING::TYPE_MBA;
}
else if (i_chipletType == fapi::TARGET_TYPE_MCS_CHIPLET)
{
l_type = TARGETING::TYPE_MCS;
}
else if (i_chipletType == fapi::TARGET_TYPE_XBUS_ENDPOINT)
{
l_type = TARGETING::TYPE_XBUS;
}
else if (i_chipletType == fapi::TARGET_TYPE_ABUS_ENDPOINT)
{
l_type = TARGETING::TYPE_ABUS;
}
else if (i_chipletType == fapi::TARGET_TYPE_L4)
{
l_type = TARGETING::TYPE_L4;
}
else
{
FAPI_ERR("fapiGetChildChiplets. Chiplet type 0x%08x not supported",
i_chipletType);
/*@
* @errortype
* @moduleid fapi::MOD_FAPI_GET_CHILD_CHIPLETS
* @reasoncode fapi::RC_UNSUPPORTED_REQUEST
* @userdata1 Type of requested chiplet
* @userdata2 Input Chip Target HUID
* @devdesc fapiGetChildChiplets request for unsupported
* or invalid chiplet type
*/
const bool hbSwError = true;
errlHndl_t l_pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_FAPI_GET_CHILD_CHIPLETS,
fapi::RC_UNSUPPORTED_REQUEST,
i_chipletType,
TARGETING::get_huid(l_pChip),
hbSwError);
// Attach the error log to the fapi::ReturnCode
l_rc.setPlatError(reinterpret_cast<void *> (l_pError));
}
if (!l_rc)
{
if (l_pChip == NULL)
//.........这里部分代码省略.........