public void start() { scheduler.schedule(variableUpdateThread, 1, TimeUnit.MILLISECONDS); }
public void start() { scheduler.schedule(runner, 100, TimeUnit.MILLISECONDS); }
/** * Start publishing data for this RealtimeRos2Node * * A periodic thread is spawned that will publish all data every millisecond. * */ public void spin() { startupLock.lock(); if (spinning) { throw new RuntimeException("This RealtimeRos2Node is already spinning"); } spinning = true; scheduler.schedule(this::realtimeNodeThread, THREAD_PERIOD_MICROSECONDS, TimeUnit.MICROSECONDS); startupLock.unlock(); }
private void startWriterThread() { dataProducer.registerPacketToSkipQueue(RobotConfigurationData.class); scheduler.schedule(new Runnable() { @Override public void run() { try { if (robotConfigurationDataRingBuffer.poll()) { RobotConfigurationData robotConfigData; while ((robotConfigData = robotConfigurationDataRingBuffer.read()) != null) { dataProducer.skipQueueAndSend(robotConfigData); } robotConfigurationDataRingBuffer.flush(); } } catch(Throwable throwable) { throwable.printStackTrace(); } } }, WORKER_SLEEP_TIME_MILLIS, TimeUnit.MILLISECONDS); }
public void start() { try { // Make server here, so it is open before the logger connects server = new MultiClientStreamingDataTCPServer(session.getPort(), handshakeBuilder, logModelProvider, compressedBackingArray.length, SEND_BUFFER_LENGTH); server.start(); } catch (IOException e) { throw new RuntimeException(e); } scheduler.schedule(this, 1, TimeUnit.MILLISECONDS); }
public void start() { try { // Make server here, so it is open before the logger connects server = new MultiClientStreamingDataTCPServer(session.getPort(), handshakeBuilder, logModelProvider, summaryProvider, compressedBackingArray.length, SEND_BUFFER_LENGTH); server.start(); } catch (IOException e) { throw new RuntimeException(e); } scheduler.schedule(this, 1, TimeUnit.MILLISECONDS); }
public ControllerNetworkSubscriber(CommandInputManager controllerCommandInputManager, StatusMessageOutputManager controllerStatusOutputManager, PeriodicThreadScheduler scheduler, PacketCommunicator packetCommunicator) { this.controllerCommandInputManager = controllerCommandInputManager; this.controllerStatusOutputManager = controllerStatusOutputManager; this.scheduler = scheduler; this.packetCommunicator = packetCommunicator; listOfSupportedStatusMessages = controllerStatusOutputManager.getListOfSupportedMessages(); if (packetCommunicator == null) { PrintTools.error(this, "No packet communicator, " + getClass().getSimpleName() + " cannot be created."); return; } listOfSupportedStatusMessages.add(InvalidPacketNotificationPacket.class); createAllSubscribersForSupportedMessages(); createGlobalStatusMessageListener(); createAllStatusMessageBuffers(); if (scheduler != null) scheduler.schedule(this, 1, TimeUnit.MILLISECONDS); }
dataProducerParticipant.announce(); timestampScheduler.schedule(timestampPublisher, 100, TimeUnit.MICROSECONDS);