本文整理了Java中us.ihmc.simulationConstructionSetTools.whiteBoard.YoWhiteBoard.getNumberOfNewDataSinceLastRead()
方法的一些代码示例,展示了YoWhiteBoard.getNumberOfNewDataSinceLastRead()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoWhiteBoard.getNumberOfNewDataSinceLastRead()
方法的具体详情如下:
包路径:us.ihmc.simulationConstructionSetTools.whiteBoard.YoWhiteBoard
类名称:YoWhiteBoard
方法名:getNumberOfNewDataSinceLastRead
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private void verifyThatWhiteBoardsDoNotHaveNewDataAvailable(YoWhiteBoard leftWhiteBoard, YoWhiteBoard rightWhiteBoard)
{
assertFalse(leftWhiteBoard.isNewDataAvailable());
assertFalse(rightWhiteBoard.isNewDataAvailable());
assertEquals(0, leftWhiteBoard.getNumberOfNewDataSinceLastRead());
assertEquals(0, rightWhiteBoard.getNumberOfNewDataSinceLastRead());
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
while (rightWhiteBoard.getNumberOfNewDataSinceLastRead() < numberOfLeftWrites)
while (leftWhiteBoard.getNumberOfNewDataSinceLastRead() < numberOfRightWrites)
assertEquals(numberOfLeftWrites, rightWhiteBoard.getNumberOfNewDataSinceLastRead());
assertEquals(numberOfRightWrites, leftWhiteBoard.getNumberOfNewDataSinceLastRead());
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
int numberOfNewData = whiteBoard.getNumberOfNewDataSinceLastRead();
whiteBoard.readData();
int numberOfNewData = whiteBoard.getNumberOfNewDataSinceLastRead();
whiteBoard.readData();
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private void read(boolean block)
{
if (block)
{
synchronized (yoWhiteBoard)
{
while (!yoWhiteBoard.isNewDataAvailable())
{
yoWhiteBoardReadControllerWaitingGlobalTimer.startMeasurement();
try
{
yoWhiteBoard.wait();
}
catch (InterruptedException e)
{
}
yoWhiteBoardReadControllerWaitingGlobalTimer.stopMeasurement();
}
}
}
numberOfNewDataSinceLastRead.set(yoWhiteBoard.getNumberOfNewDataSinceLastRead());
yoWhiteBoard.readData();
indexOrderChecker.update(yoWhiteBoard.getReadIndex());
if (indexOrderChecker.getMissedIndices() - previousMissedIndices.getIntegerValue() > 0)
System.out.println("YoWhiteBoardReadController: missed " + indexOrderChecker.getMissedIndices() + " YoWhiteBoard indices!");
previousMissedIndices.set(indexOrderChecker.getMissedIndices());
}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
assertEquals(1, leftWhiteBoard.getNumberOfNewDataSinceLastRead());
assertEquals(1, rightWhiteBoard.getNumberOfNewDataSinceLastRead());
内容来源于网络,如有侵权,请联系作者删除!