本文整理汇总了C++中NodeBitmask::get方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeBitmask::get方法的具体用法?C++ NodeBitmask::get怎么用?C++ NodeBitmask::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeBitmask
的用法示例。
在下文中一共展示了NodeBitmask::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNodeId
static Uint32 getNodeId(NodeBitmask & mask, unsigned arr[], unsigned i)
{
Uint32 nodeId = 0;
if (arr != 0)
{
nodeId = arr[i];
}
else
{
nodeId = mask.find_first();
}
require(mask.get(nodeId));
mask.clear(nodeId);
return nodeId;
}
示例2:
NodeBitmask
SignalSender::broadcastSignal(NodeBitmask mask,
SimpleSignal& sig,
Uint16 recBlock, Uint16 gsn,
Uint32 len)
{
sig.set(*this, TestOrd::TraceAPI, recBlock, gsn, len);
NodeBitmask result;
for(Uint32 i = 0; i < MAX_NODES; i++)
{
if(mask.get(i) && sendSignal(i, &sig) == SEND_OK)
result.set(i);
}
return result;
}
示例3: execOPEN_COMREQ
void Cmvmi::execOPEN_COMREQ(Signal* signal)
{
// Connect to the specifed NDB node, only QMGR allowed communication
// so far with the node
const BlockReference userRef = signal->theData[0];
Uint32 tStartingNode = signal->theData[1];
Uint32 tData2 = signal->theData[2];
jamEntry();
const Uint32 len = signal->getLength();
if(len == 2)
{
#ifdef ERROR_INSERT
if (! ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
&& c_error_9000_nodes_mask.get(tStartingNode)))
#endif
{
if (globalData.theStartLevel != NodeState::SL_STARTED &&
(getNodeInfo(tStartingNode).m_type != NodeInfo::DB &&
getNodeInfo(tStartingNode).m_type != NodeInfo::MGM))
{
jam();
goto done;
}
globalTransporterRegistry.do_connect(tStartingNode);
globalTransporterRegistry.setIOState(tStartingNode, HaltIO);
//-----------------------------------------------------
// Report that the connection to the node is opened
//-----------------------------------------------------
signal->theData[0] = NDB_LE_CommunicationOpened;
signal->theData[1] = tStartingNode;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
//-----------------------------------------------------
}
} else {
for(unsigned int i = 1; i < MAX_NODES; i++ )
{
jam();
if (i != getOwnNodeId() && getNodeInfo(i).m_type == tData2)
{
jam();
#ifdef ERROR_INSERT
if ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
&& c_error_9000_nodes_mask.get(i))
continue;
#endif
globalTransporterRegistry.do_connect(i);
globalTransporterRegistry.setIOState(i, HaltIO);
signal->theData[0] = NDB_LE_CommunicationOpened;
signal->theData[1] = i;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
}
}
}
done:
if (userRef != 0) {
jam();
signal->theData[0] = tStartingNode;
signal->theData[1] = tData2;
sendSignal(userRef, GSN_OPEN_COMCONF, signal, len - 1,JBA);
}
}