Examples of Device


Examples of org.cybergarage.upnp.Device

    Node dev = new Node(Device.ELEM_NAME);
    root.addNode(dev);
    DeviceData dd = new DeviceData();
    dd.setDescriptionURI("/gen-desc.xml");
    dev.setUserData(dd);
    Device devUPnP = new Device(root,dev);

    devUPnP.setDeviceType(extractDeviceType(sr));
    devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
    devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
    devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
    devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
    devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
    devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
    devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
    devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
    devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
    devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));

    devUPnP.setLocation("/gen-desc.xml");   

    addServices("",devUPnP,sr);
    addDevices("",devUPnP,sr);
    devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
   
    return devUPnP;
  }
View Full Code Here

Examples of org.cybergarage.upnp.Device

    Node dev = new Node(Device.ELEM_NAME);
    DeviceData dd = new DeviceData();
    dd.setDescriptionURI(id+"/gen-desc.xml");
    dev.setUserData(dd);
   
    Device devUPnP = new Device(dev);
   
    devUPnP.setDeviceType(extractDeviceType(sr));
    devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
    devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
    devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
    devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
    devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
    devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
    devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
    devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
    devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
    devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));
    devUPnP.setLocation(id+"/gen-desc.xml");   

    addServices(id,devUPnP,sr);
    addDevices(id,devUPnP,sr);

    parent.addDevice(devUPnP); //    twa: essential!!!!!!!
    devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
   
  }
View Full Code Here

Examples of org.cybergarage.upnp.Device

   
  }

  public static Device createCyberLinkDevice(ServiceReference sr){
    Node root = buildRootNode();
    Device devUPnP = buildRootDeviceNode(root,sr);
    return devUPnP;
  }
View Full Code Here

Examples of org.cybergarage.upnp.Device

   */
  public void removeExpiredDevices() {
    DeviceList devList = getDeviceList();
    int devCnt = devList.size();
    for (int n = 0; n < devCnt; n++) {
      Device dev = devList.getDevice(n);
      if (dev.isExpired() == true) {
                Activator.logger.DEBUG("[Importer] Expired device:"+ dev.getFriendlyName());
        removeDevice(dev);
        removeOSGiExpireDevice(dev);
      }
    }
  }
View Full Code Here

Examples of org.cybergarage.upnp.Device

            String[] oldServicesID =
                          (String[]) (device.getDescriptions(null).get(UPnPService.ID));
            String[] oldServiceType =
                          (String[]) (device.getDescriptions(null).get(UPnPService.TYPE));
                     
            Device cyberDevice = findDeviceCtrl(this, udn);
            Vector vec = new Vector();
            for (int i = 0; i < oldServiceType.length; i++) {
              Service ser = cyberDevice.getService(oldServicesID[i]);
              if (!(ser.getServiceType().equals(parseUSN.getServiceType())))
                          {
                vec.add(oldServicesID[i]);
              }
            }
View Full Code Here

Examples of org.dcm4che3.net.Device

    @SuppressWarnings("unchecked")
    public static void main(String[] args) {
        try {
            CommandLine cl = parseComandLine(args);
            Device device = new Device("stgcmtscu");
            Connection conn = new Connection();
            device.addConnection(conn);
            ApplicationEntity ae = new ApplicationEntity("STGCMTSCU");
            device.addApplicationEntity(ae);
            ae.addConnection(conn);
            final StgCmtSCU stgcmtscu = new StgCmtSCU(ae);
            CLIUtils.configureConnect(stgcmtscu.remote, stgcmtscu.rq, cl);
            CLIUtils.configureBind(conn, stgcmtscu.ae, cl);
            CLIUtils.configure(conn, cl);
            stgcmtscu.remote.setTlsProtocols(conn.getTlsProtocols());
            stgcmtscu.remote.setTlsCipherSuites(conn.getTlsCipherSuites());
            stgcmtscu.setTransferSyntaxes(CLIUtils.transferSyntaxesOf(cl));
            stgcmtscu.setStatus(CLIUtils.getIntOption(cl, "status", 0));
            stgcmtscu.setSplitTag(getSplitTag(cl));
            stgcmtscu.setKeepAlive(cl.hasOption("keep-alive"));
            stgcmtscu.setStorageDirectory(getStorageDirectory(cl));
            stgcmtscu.setAttributes(new Attributes());
            CLIUtils.addAttributes(stgcmtscu.attrs, cl.getOptionValues("s"));
            stgcmtscu.setUIDSuffix(cl.getOptionValue("uid-suffix"));
            List<String> argList = cl.getArgList();
            boolean echo = argList.isEmpty();
            if (!echo) {
                LOG.info(rb.getString("scanning"));
                DicomFiles.scan(argList, new DicomFiles.Callback() {
                   
                    @Override
                    public boolean dicomFile(File f, Attributes fmi, long dsPos,
                            Attributes ds) {
                        return stgcmtscu.addInstance(ds);
                    }
                });
            }
            ExecutorService executorService =
                    Executors.newCachedThreadPool();
            ScheduledExecutorService scheduledExecutorService =
                    Executors.newSingleThreadScheduledExecutor();
            device.setExecutor(executorService);
            device.setScheduledExecutor(scheduledExecutorService);
            device.bindConnections();
            try {
                stgcmtscu.open();
                if (echo)
                    stgcmtscu.echo();
                else
                    stgcmtscu.sendRequests();
             } finally {
                stgcmtscu.close();
                if (conn.isListening()) {
                    device.waitForNoOpenConnections();
                    device.unbindConnections();
                }
                executorService.shutdown();
                scheduledExecutorService.shutdown();
            }
        } catch (ParseException e) {
View Full Code Here

Examples of org.eclipse.swt.graphics.Device

  initialize(
    Canvas     _canvas )
  {
    canvas   = _canvas;
   
    Device device = canvas.getDisplay();
   
    colours = new Color[16];
   
    HSLColor hsl = new HSLColor();
   
View Full Code Here

Examples of org.eclipse.swt.graphics.Device

    }

    @Override
    public void paintControl(PaintEvent e) {
        if (mds == null) return;
        Device device = e.gc.getDevice();
        e.gc.setAntialias(SWT.ON);
        e.gc.setAlpha(128);
        e.gc.drawOval(256-zoom, 256-zoom, zoom*2, zoom*2);
        final double[][] pps = mds.points();
        if (pps == null) return;
        for (int i = 0; i < pps[0].length; i++) {
            int x = (int) (pps[0][i] * zoom + 256);
            int y = (int) (pps[1][i] * zoom + 256);
            e.gc.drawLine(x - 2, y - 2, x + 2, y + 2);
            e.gc.drawLine(x - 2, y + 2, x + 2, y - 2);
        }
        e.gc.setForeground(device.getSystemColor(SWT.COLOR_RED));
        drawEdges(e.gc);
        e.gc.setForeground(device.getSystemColor(SWT.COLOR_BLUE));
        drawHistogram(e, mds.config_dist.getHistogram());
        e.gc.setForeground(device.getSystemColor(SWT.COLOR_GREEN));
        drawHistogram(e, mds.Dtarget.getHistogram());
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.Device

    }

    @Override
    public void paintControl(PaintEvent e) {
        if (points == null) return;
        Device device = e.gc.getDevice();
        e.gc.setForeground(device.getSystemColor(SWT.COLOR_BLACK));
        e.gc.setAntialias(SWT.ON);
        e.gc.setAlpha(128);
        e.gc.drawOval(256-zoom, 256-zoom, zoom*2, zoom*2);
        for (int i = 0; i < points.x.length; i++) {
            int x = (int) (points.x[i] * zoom + 256);
            int y = (int) (points.y[i] * zoom + 256);
            e.gc.drawLine(x - 2, y - 2, x + 2, y + 2);
            e.gc.drawLine(x - 2, y + 2, x + 2, y - 2);
        }
        e.gc.setForeground(device.getSystemColor(SWT.COLOR_RED));
        drawEdges(e.gc);
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.Device

    protected void updateShellLocation(int x, int y) {
        shell.setLocation(x, y+15);
    }

    private void makeHoverShell() {
        Device device = canvas.getDisplay();
        Color backgroundColor = device.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
        Color foregroundColor = device.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
       
        shell = new Shell(canvas.getShell(), SWT.NO_FOCUS | SWT.ON_TOP | SWT.TOOL);
        shell.setBackground(backgroundColor);
        int border = ((canvas.getShell().getStyle() & SWT.NO_TRIM) == 0) ? 0 : 1;
        GridLayoutFactory.fillDefaults().margins(border, border).applyTo(shell);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.