public GUICaptureViewer() throws IOException { main = new JFrame(); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main.setLayout(new GridLayout(1, 1)); main.add(label); setFullScreen(); try { logo = ImageIO.read(getClass().getClassLoader().getResourceAsStream("ihmcRoboticsBlue.png")); ImageIcon icon = new ImageIcon(logo); label.setIcon(icon); } catch (IOException e) { throw new RuntimeException(e); } for (final LogSettings setting : LogSettings.values()) { if (setting.getVideoStream() != null) { new GUICaptureReceiver(LogParticipantSettings.domain, setting.getVideoStream(), new Handler()).start(); } } }
announcement.setControlIP(controlAddress.getAddress().getAddress()); announcement.setControlPort((short) controlAddress.getPort()); if(logSettings.getVideoStream() != null) announcement.setVideoStream(logSettings.getVideoStream().getAddress()); announcement.setVideoPort(LogDataProtocolSettings.UI_ANNOUNCE_PORT); announcement.setLog(logSettings.isLog()); announcement.setName(className); announcement.createRequest(sendBuffer);
public void startLog() throws UnknownHostException, SocketException { if(currentLogger == null) { DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); Calendar calendar = Calendar.getInstance(); String timestamp = dateFormat.format(calendar.getTime()); LogSettings settings = (LogSettings) gui.getSelectedItem(); target = new File(System.getProperty("user.home") + "/robotLogs/", timestamp + "_" + settings.toString() + "_UILog"); target.mkdirs(); LogProperties logProperties = new LogProperties() { private static final long serialVersionUID = 1L; }; InetAddress listen = InetAddress.getByName(NetworkParameters.getHost(NetworkParameterKeys.logger)); InetSocketAddress address = new InetSocketAddress(settings.getVideoStream(), LogDataProtocolSettings.UI_DATA_PORT); currentLogger = new NetworkStreamVideoDataLogger(listen.getAddress(), target, logProperties, address); start.setEnabled(false); stop.setEnabled(true); } }
public static void main(String args[]) { System.out.println(values()); } }
public YoVariableServer(String mainClazz, PeriodicThreadSchedulerFactory schedulerFactory, LogModelProvider logModelProvider, LogSettings logSettings, double dt) { LoggerConfigurationLoader config; try { config = new LoggerConfigurationLoader(); } catch (IOException e1) { throw new RuntimeException("Cannot load configuration to start logger, aborting", e1); } this.dt = dt; this.schedulerFactory = schedulerFactory; try { this.dataProducerParticipant = new DataProducerParticipant(mainClazz, logModelProvider, this, config.getPublicBroadcast()); this.dataProducerParticipant.setLog(logSettings.isLog()); addCameras(config, logSettings); this.timestampScheduler = schedulerFactory.createPeriodicThreadScheduler("timestampPublisher"); this.timestampPublisher = new TimestampPublisher(dataProducerParticipant); } catch (IOException e) { throw new RuntimeException(e); } }
canIHazRequest.setControlPort((short) controlAddress.getPort()); canIHazRequest.setDataIP(dataAddress.getAddress()); if(logSettings.getVideoStream() != null) canIHazRequest.setVideoStream(logSettings.getVideoStream().getAddress()); canIHazRequest.setVideoPort(LogDataProtocolSettings.UI_DATA_PORT); canIHazRequest.setLog(logSettings.isLog()); canIHazRequest.setName(className);
private void addCameras(LoggerConfigurationLoader config, LogSettings logSettings) { TByteArrayList cameras = config.getCameras(); for (int i = 0; i < cameras.size(); i++) { dataProducerParticipant.addCamera(CameraType.CAPTURE_CARD, "Camera-" + cameras.get(i), String.valueOf(cameras.get(i))); } if (logSettings.getVideoStream() != null) { dataProducerParticipant.addCamera(CameraType.NETWORK_STREAM, logSettings.getVideoStream(), logSettings.getVideoStream()); } }
private void setupYoVariableServer() { if (robotModel.get().getLogSettings().isLog()) { yoVariableServer = new YoVariableServer(getClass(), new PeriodicNonRealtimeThreadScheduler("DRCSimulationYoVariableServer"), robotModel.get().getLogModelProvider(), robotModel.get().getLogSettings(), robotModel.get().getEstimatorDT()); } else { yoVariableServer = null; } }
public GUICaptureViewer() { main = new JFrame(); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main.setLayout(new GridLayout(1, 1)); main.add(label); setFullScreen(); try { logo = ImageIO.read(getClass().getClassLoader().getResourceAsStream("ihmcRoboticsBlue.png")); ImageIcon icon = new ImageIcon(logo); label.setIcon(icon); } catch (IOException e) { throw new RuntimeException(e); } for (final LogSettings setting : LogSettings.values()) { if (setting.getVideoStream() != null) { NetworkInterface iface = LogUtils.getMyInterface(NetworkParameters.getHost(NetworkParameterKeys.logger)); new GUICaptureReceiver(iface, setting.getVideoStream(), new Handler()).start(); } } }
getContentPane().setLayout(layout); for (LogSettings logSetting : LogSettings.values()) if (logSetting.getVideoStream() != null)
getContentPane().setLayout(layout); for (LogSettings logSetting : LogSettings.values()) if (logSetting.getVideoStream() != null)