Skip to content

Dynamic Device #37

Description

@tthiery

Use Cases

  • Implement fallback device for unknown devices (flag)
  • Implement fallback for known but not implemented devices (flag)
  • Use DynamicDevice.Discover in case GetStaticPortInformation does not have any information for typed device (aka. soft react to firmware updates).

Strategy

  • Create a sub class DynamicDevice which derives from Device
  • Add a discovery function as DynamicDevice.DiscoverAsync. Decision needed whether we auto-call it when discovered by HubAttachedIOMessage or by user before usage by user (since pretty expensive).
  • Add ConcurrentDictionary<byte,Mode> Modes to Device which is auto populated on Discovery (or on auto-playing knowledge into the device) ... so for existing devies these are auto-populated.
  • Add default observables, properties (SI, Raw, Pct) and WriteDirectMode method to Mode
  • Rewrite existing invocations to target Mode.

Should be non-breaking at the API surface.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions