本文整理汇总了C++中TargetHandleList::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetHandleList::erase方法的具体用法?C++ TargetHandleList::erase怎么用?C++ TargetHandleList::erase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TargetHandleList
的用法示例。
在下文中一共展示了TargetHandleList::erase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkForIplAttentions
errlHndl_t checkForIplAttentions()
{
errlHndl_t err = NULL;
assert(!Singleton<Service>::instance().running());
TargetHandleList list;
getTargetService().getAllChips(list, TYPE_PROC);
TargetHandleList::iterator tit = list.begin();
while(tit != list.end())
{
err = Singleton<Service>::instance().handleAttentions(*tit);
if(err)
{
errlCommit(err, ATTN_COMP_ID);
}
tit = list.erase(tit);
}
return 0;
}
示例2: GetCheckstopInfo
/** @func GetCheckstopInfo
* To be called from the fabric domain to gather Checkstop information. This
* information is used in a sorting algorithm.
*
* This is a plugin function: GetCheckstopInfo
*
* @param i_chip - The chip.
* @param o_wasInternal - True if this chip has an internal checkstop.
* @param o_externalChips - List of external fabrics driving checkstop.
* @param o_wofValue - Current WOF value (unused for now).
*/
int32_t GetCheckstopInfo( ExtensibleChip * i_chip,
bool & o_wasInternal,
TargetHandleList & o_externalChips,
uint64_t & o_wofValue )
{
// Clear parameters.
o_wasInternal = false;
o_externalChips.erase(o_externalChips.begin(), o_externalChips.end());
o_wofValue = 0;
SCAN_COMM_REGISTER_CLASS * l_globalFir =
i_chip->getRegister("GLOBAL_CS_FIR");
SCAN_COMM_REGISTER_CLASS * l_pbXstpFir =
i_chip->getRegister("PB_CHIPLET_CS_FIR");
SCAN_COMM_REGISTER_CLASS * l_extXstpFir =
i_chip->getRegister("PBEXTFIR");
int32_t o_rc = SUCCESS;
o_rc |= l_globalFir->Read();
o_rc |= l_pbXstpFir->Read();
o_rc |= l_extXstpFir->Read();
if(o_rc)
{
PRDF_ERR( "[GetCheckstopInfo] SCOM fail on 0x%08x rc=%x",
i_chip->GetId(), o_rc);
return o_rc;
}
if ((0 != l_globalFir->GetBitFieldJustified(0,32)) &&
(!l_globalFir->IsBitSet(2) ||
!l_pbXstpFir->IsBitSet(2)))
o_wasInternal = true;
// Get connected chips.
uint32_t l_connectedXstps = l_extXstpFir->GetBitFieldJustified(0,7);
uint32_t l_positions[] =
{
0, // bit 0 - XBUS 0
1, // bit 1 - XBUS 1
2, // bit 2 - XBUS 2
3, // bit 3 - XBUS 3
0, // bit 4 - ABUS 0
1, // bit 5 - ABUS 1
2 // bit 6 - ABUS 2
};
for (int i = 0, j = 0x40; i < 7; i++, j >>= 1)
{
if (0 != (j & l_connectedXstps))
{
TargetHandle_t l_connectedFab =
getConnectedPeerProc(i_chip->GetChipHandle(),
i<4 ? TYPE_XBUS : TYPE_ABUS,
l_positions[i]);
if (NULL != l_connectedFab)
{
o_externalChips.push_back(l_connectedFab);
}
}
}
// Read WOF value.
SCAN_COMM_REGISTER_CLASS * l_wof = i_chip->getRegister("TODWOF");
o_rc |= l_wof->Read();
if(o_rc)
{
PRDF_ERR( "[GetCheckstopInfo] SCOM fail on 0x%08x rc=%x",
i_chip->GetId(), o_rc);
return o_rc;
}
o_wofValue = l_wof->GetBitFieldJustified(0,64);
return SUCCESS;
} PRDF_PLUGIN_DEFINE( Proc, GetCheckstopInfo );