VideoOS.Platform.Client.Hid.HidInstance Class Referenceabstract

NOTE: BETA. Might change in future release. A Human Interface Device (HID) plugin is very similar to the BackgroundPlugin with few members added to service human interface devices (keyboards, joysticks, trackballs, etc.).
For more information, refer into the BackgroundPlugin documentation. More...

Public Member Functions

virtual void Close ()
 Called by the Environment when the HidInstance is being closed. Override this to perform cleanup operations.
 
Task< ConnectResultConnectAsync (string userDefinedName, IEnumerable< HidConfigurationProperty > configurationProperties, CancellationToken cancellationToken)
 Connects to the instance asynchronously. This method is called by the Environment when a new instance is discovered or added manually by the user. Properties used for connecting to the device were passed as arguments to the HidPlugin.GenerateHidInstance and thus are not repeated in this call. If your HidInstance needs these properties, you should provide them in the constructor of your derived type.
 
Task DisconnectAsync (CancellationToken cancellationToken)
 Disconnects from the instance asynchronously. This method is called by the Environment when the user removes the instance, or it has been undiscovered.
 
virtual void Init ()
 Called by the Environment when the HidInstance is created. It is called before the ConnectAsync method. Override this to perform some initialization operations.
 

Protected Member Functions

 HidInstance (Guid id)
 Constructor for the base class of a HidInstance.
 

Properties

Guid Id [get]
 The ID of the instance (i.e. device).
 
virtual string Name [get, protected set]
 Display name of the instance (i.e. device). Use this to distinguish multiple HID instances from one another.
 

Detailed Description

NOTE: BETA. Might change in future release. A Human Interface Device (HID) plugin is very similar to the BackgroundPlugin with few members added to service human interface devices (keyboards, joysticks, trackballs, etc.).
For more information, refer into the BackgroundPlugin documentation.

Constructor & Destructor Documentation

◆ HidInstance()

VideoOS.Platform.Client.Hid.HidInstance.HidInstance ( Guid id)
inlineprotected

Constructor for the base class of a HidInstance.

Parameters
idThe ID of the instance (i.e. device).

Member Function Documentation

◆ Close()

virtual void VideoOS.Platform.Client.Hid.HidInstance.Close ( )
inlinevirtual

Called by the Environment when the HidInstance is being closed. Override this to perform cleanup operations.

◆ ConnectAsync()

Task< ConnectResult > VideoOS.Platform.Client.Hid.HidInstance.ConnectAsync ( string userDefinedName,
IEnumerable< HidConfigurationProperty > configurationProperties,
CancellationToken cancellationToken )
abstract

Connects to the instance asynchronously. This method is called by the Environment when a new instance is discovered or added manually by the user. Properties used for connecting to the device were passed as arguments to the HidPlugin.GenerateHidInstance and thus are not repeated in this call. If your HidInstance needs these properties, you should provide them in the constructor of your derived type.

Parameters
userDefinedNameName of the HidInstance, optionally modified by the user.
configurationPropertiesThe configuration properties used to connect to the instance.
cancellationTokenCancellation token which the Environment can use to cancel the operation.
Returns
True if the connection was successful, false otherwise.

◆ DisconnectAsync()

Task VideoOS.Platform.Client.Hid.HidInstance.DisconnectAsync ( CancellationToken cancellationToken)
abstract

Disconnects from the instance asynchronously. This method is called by the Environment when the user removes the instance, or it has been undiscovered.

Parameters
cancellationTokenCancellation token which the Environment can use to cancel the operation.

◆ Init()

virtual void VideoOS.Platform.Client.Hid.HidInstance.Init ( )
inlinevirtual

Called by the Environment when the HidInstance is created. It is called before the ConnectAsync method. Override this to perform some initialization operations.

Property Documentation

◆ Id

Guid VideoOS.Platform.Client.Hid.HidInstance.Id
get

The ID of the instance (i.e. device).

◆ Name

virtual string VideoOS.Platform.Client.Hid.HidInstance.Name
getprotected set

Display name of the instance (i.e. device). Use this to distinguish multiple HID instances from one another.