gpt4 book ai didi

us.ihmc.yoVariables.variable.YoVariable.getYoVariableType()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 12:20:40 30 4
gpt4 key购买 nike

本文整理了Java中us.ihmc.yoVariables.variable.YoVariable.getYoVariableType()方法的一些代码示例,展示了YoVariable.getYoVariableType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariable.getYoVariableType()方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoVariable
类名称:YoVariable
方法名:getYoVariableType

YoVariable.getYoVariableType介绍

[英]Retrieves this variable's YoVariableType.
[中]检索此变量的YoVariableType。

代码示例

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void verifyTypesAreEqual(YoVariable<?> variableOne, YoVariable<?> variableTwo)
  {
   if (variableOne.getYoVariableType() != variableTwo.getYoVariableType())
     throw new RuntimeException("variableOne.getYoVariableType() != variableTwo.getYoVariableType()");
  }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void writeVariableNamesToBeVerified(ArrayList<YoVariable<?>> variables) throws IOException
{
 dataOutputStream.writeInt(variables.size());
 dataOutputStream.flush();
 for (YoVariable<?> yoVariable : variables)
 {
   dataOutputStream.writeUTF(yoVariable.getFullNameWithNameSpace());
   dataOutputStream.writeInt(yoVariable.getYoVariableType().ordinal());
   dataOutputStream.flush();
      try
   {
    Thread.sleep(1); // Give the other side some time to process it.
   } 
   catch (InterruptedException e)
   {
   }
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

private void readAndVerifyVariableNames(ArrayList<YoVariable<?>> variables) throws IOException
{
 int numberOfVariablesFromStream = dataInputStream.readInt();
 int numberOfVariables = variables.size();
 if (numberOfVariablesFromStream != numberOfVariables)
   throw new RuntimeException("numberOfVariablesFromStream = " + numberOfVariablesFromStream + ", but numberOfVariables = " + numberOfVariables);
 for (int i = 0; i < numberOfVariables; i++)
 {
   String fullName = dataInputStream.readUTF();
   int yoVariableTypeOrdinal = dataInputStream.readInt();
   YoVariableType yoVariableType = YoVariableType.values()[yoVariableTypeOrdinal];
      YoVariable<?> yoVariable = variables.get(i);
   if (yoVariable.getYoVariableType() != yoVariableType)
   {
    throw new RuntimeException("yoVariable.getYoVariableType() = " + yoVariable.getYoVariableType() + " != yoVariableType = " + yoVariableType);
   }
   verifyNamesAreConsistent(yoVariable.getFullNameWithNameSpace(), fullName);
 }
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

YoVariableType yoVariableType = variableToWrite.getYoVariableType();

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

YoVariableType yoVariableType = variableToRead.getYoVariableType();

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

private void verifyYoVariablesAreEqual(YoVariable<?> variableOne, YoVariable<?> variableTwo)
{
 assertTrue(variableOne.getYoVariableType() == variableTwo.getYoVariableType());
 assertTrue(variableOne.getFullNameWithNameSpace().equals(variableTwo.getFullNameWithNameSpace()));
 assertEquals(variableOne.getValueAsDouble(), variableTwo.getValueAsDouble(), 1e-7);
}

代码示例来源:origin: us.ihmc/simulation-construction-set-tools-test

NameSpace nameSpace = variable.getNameSpace();
YoVariableType yoVariableType = variable.getYoVariableType();
YoVariableRegistry registry = rootRegistry.getOrCreateAndAddRegistry(nameSpace);

代码示例来源:origin: us.ihmc/ihmc-robot-data-logger

switch (variable.getYoVariableType())
 break;
default:
 throw new RuntimeException("Unknown variable type: " + variable.getYoVariableType());

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com