Package org.usb4java

Examples of org.usb4java.ConfigDescriptor


     */
    @Test(expected = IllegalStateException.class)
    public void testGetActiveConfigDescriptorWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getActiveConfigDescriptor(new Device(), new ConfigDescriptor());
    }
View Full Code Here


    @Test(expected = IllegalStateException.class)
    public void testGetConfigDescriptorWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptor(new Device(), (byte) 0,
            new ConfigDescriptor());
    }
View Full Code Here

    @Test(expected = IllegalStateException.class)
    public void testGetConfigDescriptorByValueWithUninitializedDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptorByValue(new Device(), (byte) 0,
            new ConfigDescriptor());
    }
View Full Code Here

     */
    @Test(expected = IllegalStateException.class)
    public void testFreeConfigDescriptorWithUninitializedDescriptor()
    {
        assumeUsbTestsEnabled();
        LibUsb.freeConfigDescriptor(new ConfigDescriptor());
    }
View Full Code Here

                {
                    continue;
                }
                this.vendorId = descriptor.idVendor();
                this.productId = descriptor.idProduct();
                final ConfigDescriptor config = new ConfigDescriptor();
                if (LibUsb.getActiveConfigDescriptor(device, config) < 0)
                {
                    return null;
                }
                try
                {
                    this.configValue = config.bConfigurationValue();
                    for (int j = 0; j < config.bNumInterfaces(); j++)
                    {
                        final Interface iface = config.iface()[j];
                        for (int k = 0; k < iface.numAltsetting(); k++)
                        {
                            final InterfaceDescriptor ifaceDescriptor = iface
                                .altsetting()[k];
                            if (ifaceDescriptor.bNumEndpoints() > 1)
View Full Code Here

     */
    @Test(expected = IllegalArgumentException.class)
    public void testGetActiveConfigDescriptorWithoutDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getActiveConfigDescriptor(null, new ConfigDescriptor());
    }
View Full Code Here

    @Test
    public void testGetActiveConfigDescriptor()
    {
        assumeUsbTestsEnabled();
        assumeNotNull(this.device);
        final ConfigDescriptor desc = new ConfigDescriptor();
        LibUsb.getActiveConfigDescriptor(this.device, desc);
        try
        {
            this.validateConfigDescriptor(desc);
        }
View Full Code Here

     */
    @Test(expected = IllegalArgumentException.class)
    public void testGetConfigDescriptorWithoutDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptor(null, (byte) 0, new ConfigDescriptor());
    }
View Full Code Here

    @Test
    public void testGetConfigDescriptor()
    {
        assumeUsbTestsEnabled();
        assumeNotNull(this.device);
        final ConfigDescriptor desc = new ConfigDescriptor();
        LibUsb.getConfigDescriptor(this.device, (byte) 0, desc);
        try
        {
            this.validateConfigDescriptor(desc);
        }
View Full Code Here

    @Test(expected = IllegalArgumentException.class)
    public void testGetConfigDescriptorByValueWithoutDevice()
    {
        assumeUsbTestsEnabled();
        LibUsb.getConfigDescriptorByValue(null, (byte) 0,
            new ConfigDescriptor());
    }
View Full Code Here

TOP

Related Classes of org.usb4java.ConfigDescriptor

Copyright © 2018 www.massapicom. 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.