This interface is implemented by the Monitor object in the USB Monitoring Control library. You get this interface by calling the IUsbMonitor.CreateMonitor method and use it to start monitoring the USB device.
interface IMonitoring {
// Properties
readonly ${Connected}: boolean;
readonly ${ConnectedDevice}: ${IDevice};
readonly ${UsbMonitor}: ${IUsbMonitor};
// Methods
${Connect}(Device?: ${IDevice}, HeadersOnly?: boolean): void;
${Disconnect}(): void;
}
public interface IMonitoring
{
// Properties
bool ${Connected} { get; }
${IDevice} ${ConnectedDevice} { get; }
${IUsbMonitor} ${UsbMonitor} { get; }
// Methods
void ${Connect}(${IDevice} Device, bool HeadersOnly);
void ${Disconnect}();
}
struct IMonitoring : IDispatch
{
// Properties
VARIANT_BOOL ${Connected}; // get
${IDevicePtr#IDevice} ${ConnectedDevice}; // get
${IUsbMonitorPtr#IUsbMonitor} ${UsbMonitor}; // get
// Methods
HRESULT ${Connect}(_variant_t Device, _variant_t HeadersOnly);
HRESULT ${Disconnect}();
HRESULT ${AddNativeListener}(${INativeListener *#INativeListener} Listener);
HRESULT ${RemoveNativeListener}(${INativeListener *#INativeListener} Listener);
};
readonly Connected: boolean;
bool Connected { get; }
VARIANT_BOOL Connected; // get
Returns true
if it is currently connected to the USB device.
readonly ConnectedDevice: ${IDevice};
${IDevice} ConnectedDevice { get; }
${IDevicePtr#IDevice} ConnectedDevice; // get
Returns the device this monitor object is currently connected to, or null
if it is not connected.
readonly UsbMonitor: ${IUsbMonitor};
${IUsbMonitor} UsbMonitor { get; }
${IUsbMonitorPtr#IUsbMonitor} UsbMonitor; // get
Returns the reference to the main UsbMonitor object.
Connect(Device?: ${IDevice}, HeadersOnly?: boolean): void;
void Connect(${IDevice} Device, bool HeadersOnly);
HRESULT Connect(_variant_t Device, _variant_t HeadersOnly);
Device
HeadersOnly
true
to only process packet headers, false
to process full packets. Default is false
if parameter is omitted.Connect to the USB device.
Disconnect(): void;
void Disconnect();
HRESULT Disconnect();
Disconnect from the USB device.
// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT AddNativeListener(${INativeListener *#INativeListener} Listener);
Listener
Add new native listener.
// This method is not available in scripting environment
// This method is not available in managed environment
HRESULT RemoveNativeListener(${INativeListener *#INativeListener} Listener);
Listener
Remove native listener.