本文整理了Java中us.ihmc.simulationConstructionSetTools.whiteBoard.YoWhiteBoard.isConnected()
方法的一些代码示例,展示了YoWhiteBoard.isConnected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoWhiteBoard.isConnected()
方法的具体详情如下:
包路径:us.ihmc.simulationConstructionSetTools.whiteBoard.YoWhiteBoard
类名称:YoWhiteBoard
方法名:isConnected
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test
private void waitForWhiteBoardsToConnect(YoWhiteBoard leftWhiteBoard, YoWhiteBoard rightWhiteBoard)
{
while (!leftWhiteBoard.isConnected())
{
if (VERBOSE)
System.out.println("Waiting for left white board to connect.");
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
while (!rightWhiteBoard.isConnected())
{
if (VERBOSE)
System.out.println("Waiting for right white board to connect.");
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public synchronized void readData()
{
if (!isConnected())
throw new RuntimeException("Not yet connected");
for (int i = 0; i < doubleVariablesToRead.length; i++)
{
doubleVariablesToRead[i].set(doubleVariablesToReadBuffer[i]);
}
for (int i = 0; i < intVariablesToRead.length; i++)
{
intVariablesToRead[i].set(intVariablesToReadBuffer[i]);
}
for (int i = 0; i < booleanVariablesToRead.length; i++)
{
booleanVariablesToRead[i].set(booleanVariablesToReadBuffer[i]);
}
for (int i = 0; i < enumVariablesToRead.length; i++)
{
enumVariablesToRead[i].setValueFromDouble(enumVariablesToReadBuffer[i]);
}
numberOfNewDataSinceLastRead.set(0);
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public void writeData() throws IOException
{
if (!isConnected())
throw new RuntimeException("Not yet connected");
for (int i = 0; i < doubleVariablesToWrite.length; i++)
{
doubleVariablesToWriteBuffer[i] = doubleVariablesToWrite[i].getDoubleValue();
}
for (int i = 0; i < intVariablesToWrite.length; i++)
{
intVariablesToWriteBuffer[i] = intVariablesToWrite[i].getIntegerValue();
}
for (int i = 0; i < booleanVariablesToWrite.length; i++)
{
booleanVariablesToWriteBuffer[i] = booleanVariablesToWrite[i].getBooleanValue();
}
for (int i = 0; i < enumVariablesToWrite.length; i++)
{
Enum<?> enumValue = enumVariablesToWrite[i].getEnumValue();
int ordinal = -1;
if (enumValue != null)
{
ordinal = enumValue.ordinal();
}
enumVariablesToWriteBuffer[i] = ordinal;
}
whiteBoardSpecificWriteData(doubleVariablesToWriteBuffer, intVariablesToWriteBuffer, booleanVariablesToWriteBuffer, enumVariablesToWriteBuffer,
writeIndex.getIntegerValue());
writeIndex.increment();
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
System.out.println("TCPYoWhiteBoardEvaluation Waiting for whiteBoard to be connected");
while (!whiteBoard.isConnected())
内容来源于网络,如有侵权,请联系作者删除!