Loading...
Searching...
No Matches
Usb.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2010 Raritan Inc. All rights reserved.
*/
#include <UserEvent.idl>
/**
* USB Ports
*/
module usb {
/** USB device information */
structure UsbDevice {
int portNumber; ///< USB Port number (1-based)
int bus; ///< Bus number
int device; ///< Device address
int vendorId; ///< Vendor ID
int productId; ///< Product ID
string manufacturer; ///< Manufacturer
string product; ///< Product
};
/** USB interface */
interface Usb {
/** USB interface settings */
structure Settings {
boolean hostPortsEnabled; ///< \false to deactivate the device's USB-A host ports
};
/** Event: Settings have changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/**
* Retrieve the USB interface settings.
*
* @return USB interface settings
*/
Settings getSettings();
/**
* Change the USB interface settings.
*
* @param settings New settings
*
* @return 0 if OK
*/
int setSettings(in Settings settings);
/**
* Retrieve the number of external USB-A ports.
*
* @return Number of host ports
*/
int getHostPortCount();
/**
* Get a list of USB devices connected to the host ports.
*
* @param usbDevices Result: List of discovered devices
*/
void getDevices(out vector<UsbDevice> usbDevices);
};
}
usb::Usb
USB interface.
Definition Usb.idl:25
usb::Usb::getHostPortCount
int getHostPortCount()
Retrieve the number of external USB-A ports.
usb::Usb::setSettings
int setSettings(in Settings settings)
Change the USB interface settings.
usb::Usb::getSettings
Settings getSettings()
Retrieve the USB interface settings.
usb::Usb::getDevices
void getDevices(out vector< UsbDevice > usbDevices)
Get a list of USB devices connected to the host ports.
usb
USB Ports.
Definition Usb.idl:11
usb::UsbDevice
USB device information.
Definition Usb.idl:14
usb::UsbDevice::vendorId
int vendorId
Vendor ID.
Definition Usb.idl:18
usb::UsbDevice::bus
int bus
Bus number.
Definition Usb.idl:16
usb::UsbDevice::portNumber
int portNumber
USB Port number (1-based)
Definition Usb.idl:15
usb::UsbDevice::product
string product
Product.
Definition Usb.idl:21
usb::UsbDevice::device
int device
Device address.
Definition Usb.idl:17
usb::UsbDevice::productId
int productId
Product ID.
Definition Usb.idl:19
usb::UsbDevice::manufacturer
string manufacturer
Manufacturer.
Definition Usb.idl:20
usb::Usb::SettingsChangedEvent
Event: Settings have changed.
Definition Usb.idl:33
usb::Usb::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition Usb.idl:34
usb::Usb::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition Usb.idl:35
usb::Usb::Settings
USB interface settings.
Definition Usb.idl:28
usb::Usb::Settings::hostPortsEnabled
boolean hostPortsEnabled
\false to deactivate the device's USB-A host ports
Definition Usb.idl:29