Serial Framework C++ Edition
CwclUsbMonitor Class Reference

The USB Monitor allows your application to enumerate available USB devices and to monitor changes in its configuration. More...

#include <wclSerialDevices.h>

Inheritance diagram for CwclUsbMonitor:
CwclCustomSerialMonitor

Public Member Functions

 CwclUsbMonitor ()
 Creates a new USB Monitor component.
 
int Disable (const tstring &Instance)
 Disables USB device.
 
int Enable (const tstring &Instance)
 Enabled USB device.
 
int EnumDevices (wclUsbDevices &Devices) const
 Enumerates available USB devices.
 
__event void OnInserted (void *Sender, const wclUsbDevice &Device)
 The event fires when a new USB device appeared in the system.
 
__event void OnRemoved (void *Sender, const wclUsbDevice &Device)
 The event fires when a USB device has been removed from the system.
 
- Public Member Functions inherited from CwclCustomSerialMonitor
 CwclCustomSerialMonitor ()
 Creates a new Monitor component.
 
virtual ~CwclCustomSerialMonitor ()
 Frees the component.
 
int Start ()
 Starts monitoring hardware changes.
 
int Stop ()
 Stops monitoring hardware changes.
 
bool GetMonitoring ()
 Gets the hardware monitoring state.
 
 __declspec (property(get=GetMonitoring)) bool Monitoring
 Gets the hardware monitoring state.
 
wclMessageProcessingMethod GetMessageProcessing () const
 Gets a message processing method used by the monitor.
 
void SetMessageProcessing (const wclMessageProcessingMethod Value)
 Sets a message processing method used by the monitor.
 
 __declspec (property(get=GetMessageProcessing, put=SetMessageProcessing)) wclMessageProcessingMethod MessageProcessing
 Gets and sets a message processing method used by the monitor.
 
__event void OnStarted (void *Sender)
 The event called when the monitor was started.
 
__event void OnStopped (void *Sender)
 The event called when the monitor was stopped.
 

Protected Member Functions

virtual void MessageReceived (const CwclMessage *const Message) override
 The method called when a new notification message received.
 
virtual void DoInserted (const wclUsbDevice &Device)
 Fires the OnInserted event.
 
virtual void DoRemoved (const wclUsbDevice &Device)
 Fires the OnRemoved event.
 
- Protected Member Functions inherited from CwclCustomSerialMonitor
virtual void DoStarted ()
 Calls the OnStarted event.
 
virtual void DoStopped ()
 Calls the OnStopped event.
 

Detailed Description

The USB Monitor allows your application to enumerate available USB devices and to monitor changes in its configuration.

See also
CwclCustomSerialMonitor