gpt4 book ai didi

us.ihmc.robotDataLogger.handshake.YoVariableHandshakeParser.parseFrom()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 04:52:31 25 4
gpt4 key购买 nike

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

YoVariableHandshakeParser.parseFrom介绍

暂无

代码示例

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

static YoVariableHandshakeParser getHandshake(HandshakeFileType type, File handshake) throws IOException
{
 if (!handshake.exists())
 {
   throw new RuntimeException("Cannot find " + handshake);
 }
 DataInputStream handshakeStream = new DataInputStream(new FileInputStream(handshake));
 byte[] handshakeData = new byte[(int) handshake.length()];
 handshakeStream.readFully(handshakeData);
 handshakeStream.close();
 YoVariableHandshakeParser parser = YoVariableHandshakeParser.create(type);
 parser.parseFrom(handshakeData);
 return parser;
}

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

public static int getNumberOfStateVariables(HandshakeFileType type, byte[] data) throws IOException
{
 YoVariableHandshakeParser parser = create(type);
 parser.parseFrom(data);
 return parser.getNumberOfStates();
}

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

public YoVariableExtracter(File logFile) throws IOException
{
 LogPropertiesReader logProperties = new LogPropertiesReader(new File(logFile, YoVariableLoggerListener.propertyFile));
 File handshake = new File(logFile, logProperties.getVariables().getHandshakeAsString());
 if (!handshake.exists())
 {
   throw new RuntimeException("Cannot find " + logProperties.getVariables().getHandshakeAsString());
 }
 DataInputStream handshakeStream = new DataInputStream(new FileInputStream(handshake));
 byte[] handshakeData = new byte[(int) handshake.length()];
 handshakeStream.readFully(handshakeData);
 handshakeStream.close();
 YoVariableHandshakeParser parser = YoVariableHandshakeParser.create(logProperties.getVariables().getHandshakeFileType());
 parser.parseFrom(handshakeData);
 YoVariableRegistry registry = parser.getRootRegistry();
 File logdata = new File(logFile, logProperties.getVariables().getDataAsString());
 if(!logdata.exists())
 {
   throw new RuntimeException("Cannot find " + logProperties.getVariables().getDataAsString());
 }
 @SuppressWarnings("resource")
 final FileChannel logChannel = new FileInputStream(logdata).getChannel();
 List<YoVariable<?>> variables = parser.getYoVariablesList();
 int jointStateOffset = variables.size();
 int numberOfJointStates = JointState.getNumberOfJointStates(parser.getJointStates());
 int bufferSize = (1 + jointStateOffset + numberOfJointStates) * 8;
 new YoVariableDialog(bufferSize, logChannel, variables, registry);
}

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

parser.parseFrom(handshakeData);

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

parser.parseFrom(handshakeData);

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