Photomechanics API
IComponentBasedDeviceApi Interface Reference

Represents high level device API. More...

Inheritance diagram for IComponentBasedDeviceApi:
[legend]

Public Member Functions

Task Initialize ()
 Initialize connection with device. More...
 
TComponent GetComponent< TComponent > ()
 Get component of given type. More...
 

Additional Inherited Members

- Properties inherited from IAsyncDisposableExtended
Boolean IsDisposed [get]
 Determines whether the object is being disposed or already disposed and no longer functional. More...
 
ILogger Logger [get]
 Logger associated with this instance. This way extension methods can use logging without requiring it as parameter. More...
 
- Events inherited from IAsyncDisposableExtended
AsyncTypedEventHandler< IAsyncDisposableExtendedDisposed
 Occurs when object is disposed. It should be invoked at the end of IAsyncDisposable.DisposeAsync implementation in a Fire-and-Forget fashion (non-blocking).
 

Detailed Description

Represents high level device API.

Delegates actual functionality to API components. Concrete API feature set is formed by provided components.

Member Function Documentation

◆ Initialize()

Task IComponentBasedDeviceApi.Initialize ( )

Initialize connection with device.

API will self-dispose at this stage if unable to establish connection for some reason.

Implemented in ComponentBasedDeviceApiBase.

◆ GetComponent< TComponent >()

TComponent IComponentBasedDeviceApi.GetComponent< TComponent > ( )

Get component of given type.

Template Parameters
TComponentType of the component to search.
Returns
Device API component. null if API does not provide component of TComponent type.

Implemented in ComponentBasedDeviceApiBase.

Type Constraints
TComponent :class 
TComponent :IDeviceApiComponent