本文整理了Java中us.ihmc.robotDataLogger.YoVariablesUpdatedListener
类的一些代码示例,展示了YoVariablesUpdatedListener
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariablesUpdatedListener
类的具体详情如下:
包路径:us.ihmc.robotDataLogger.YoVariablesUpdatedListener
类名称:YoVariablesUpdatedListener
暂无
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public synchronized void disconnected()
{
if (state == ClientState.RUNNING)
{
logControlClient.close();
yoVariablesUpdatedListener.disconnected();
state = ClientState.STOPPED;
}
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
/**
* Callback from the timestamp topic. Gets called immediately when a new timestamp has arrived from the logger.
*
* @param timestamp
*/
public void receivedTimestampAndData(long timestamp)
{
yoVariablesUpdatedListener.receivedTimestampAndData(timestamp);
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
@Override
public void consumeObject(ClearLogRequest object)
{
yoVariablesUpdatedListener.clearLog();
}
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public synchronized void start(long timeout) throws SocketTimeoutException
{
if (state != ClientState.WAITING)
{
throw new RuntimeException("Client already started");
}
System.out.println("Requesting handshake");
LogHandshake handshake = getHandshake();
logControlClient.connect();
handshakeParser.parseFrom(handshake.protoShake);
yoVariablesUpdatedListener.start(handshake, handshakeParser);
if (yoVariablesUpdatedListener.changesVariables())
{
List<YoVariable<?>> variablesList = handshakeParser.getYoVariablesList();
logControlClient.startVariableChangedProducers(variablesList, yoVariablesUpdatedListener.executeVariableChangedListeners());
}
decompressed = ByteBuffer.allocate(handshakeParser.getBufferSize());
threadedLogPacketHandler.start();
streamingDataTCPClient.start();
state = ClientState.RUNNING;
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
if(this.yoVariablesUpdatedListener.updateYoVariables())
yoVariablesUpdatedListener.receivedTimestampAndData(timestamp, decompressed);
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
YoVariableClientImplementation(DataConsumerParticipant participant, final YoVariablesUpdatedListener yoVariablesUpdatedListener)
{
this.dataConsumerParticipant = participant;
this.yoVariablesUpdatedListener = yoVariablesUpdatedListener;
if (yoVariablesUpdatedListener.changesVariables())
{
this.variableChangedProducer = new VariableChangedProducer();
}
else
{
this.variableChangedProducer = null;
}
this.handshakeParser = new IDLYoVariableHandshakeParser(HandshakeFileType.IDL_CDR);
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public YoVariableClient(AnnounceRequest request, final YoVariablesUpdatedListener yoVariablesUpdatedListener, String registryPrefix)
{
this.serverName = request.getName();
this.yoVariablesUpdatedListener = yoVariablesUpdatedListener;
displayOneInNPackets = this.yoVariablesUpdatedListener.getDisplayOneInNPackets();
InetAddress inetAddress;
try
{
inetAddress = InetAddress.getByAddress(request.getDataIP());
}
catch (UnknownHostException e)
{
throw new RuntimeException(e);
}
threadedLogPacketHandler = new ThreadedLogPacketHandler(this, RECEIVE_BUFFER_SIZE);
streamingDataTCPClient = new StreamingDataTCPClient(inetAddress, request.getDataPort(), threadedLogPacketHandler, displayOneInNPackets);
logControlClient = new LogControlClient(request.getControlIP(), request.getControlPort(), this.yoVariablesUpdatedListener);
handshakeParser = new YoVariableHandshakeParser(registryPrefix);
yoVariablesList = handshakeParser.getYoVariablesList();
jointStates = handshakeParser.getJointStates();
this.yoVariablesUpdatedListener.setYoVariableClient(this);
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
yoVariablesUpdatedListener.start(this, logHandshake, handshakeParser);
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
public void connected()
{
yoVariablesUpdatedListener.connected();
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
@Override
public void timeout()
{
threadedLogPacketHandler.shutdown();
timestampListener.interrupt();
yoVariablesUpdatedListener.receiveTimedOut();
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
yoVariablesUpdatedListener.receivedTimestampOnly(receiveBuffer.getLong());
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
/**
* Callback function from the RegistryConsumer.
*
* Gets called when the connection is closed, either by timeout or by user request.
*
*/
public void connectionClosed()
{
System.out.println("Disconnected, closing client.");
dataConsumerParticipant.disconnectSession();
yoVariablesUpdatedListener.disconnected();
}
内容来源于网络,如有侵权,请联系作者删除!