Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2

Loading...
Searching...
No Matches
Usb.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2010 Raritan Inc. All rights reserved.
4 */
5
6#include <UserEvent.idl>
7
8/**
9 * USB Ports
10 */
11module usb {
12
13 /** USB device information */
14 structure UsbDevice {
15 int portNumber; ///< USB Port number (1-based)
16 int bus; ///< Bus number
17 int device; ///< Device address
18 int vendorId; ///< Vendor ID
19 int productId; ///< Product ID
20 string manufacturer; ///< Manufacturer
21 string product; ///< Product
22 };
23
24 /** USB interface */
25 interface Usb {
26
27 /** USB interface settings */
28 structure Settings {
29 boolean hostPortsEnabled; ///< \false to deactivate the device's USB-A host ports
30 };
31
32 /** Event: Settings have changed */
33 valueobject SettingsChangedEvent extends event.UserEvent {
34 Settings oldSettings; ///< Settings before change
35 Settings newSettings; ///< Settings after change
36 };
37
38 /**
39 * Retrieve the USB interface settings.
40 *
41 * @return USB interface settings
42 */
43 Settings getSettings();
44
45 /**
46 * Change the USB interface settings.
47 *
48 * @param settings New settings
49 *
50 * @return 0 if OK
51 */
52 int setSettings(in Settings settings);
53
54 /**
55 * Retrieve the number of external USB-A ports.
56 *
57 * @return Number of host ports
58 */
59 int getHostPortCount();
60
61 /**
62 * Get a list of USB devices connected to the host ports.
63 *
64 * @param usbDevices Result: List of discovered devices
65 */
66 void getDevices(out vector<UsbDevice> usbDevices);
67
68 };
69
70}
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