• CreateMethods and SetupMethods
  • CreateMethods and SetupMethods

    This page describes how the setup and creation of a device is working in a plugin. Since the device manager handles all the plugins and devices there are certain steps during the device setup which have to be considered.

    The CreateMethod describes how the device will be created (by the user, by discovery or automatically). The SetupMethod describes how the device will be set up. A Device can have multiple CreateMethods, but only one SetupMethod.

    CreateMethod "User" - SetupMethod "JustAdd - synchronous"

    This is the simplest setup what a device can have.

    • CreateMethod "User": the user has to fill out the Params of the device by hand
    • SetupMethod "JustAdd": there is nothing special to do during the setup with the device.

    Once the is adding the device the DeviceManager is calling following methods in the device plugin:

    CreateMethod "User" - SetupMethod "JustAdd" - asynchronous

    • Setup
      • 1. | The main setup of the device in the plugin.
      • 2. | If the status can not be determined immediately, we have to tell the DeviceManager that the status will be communicated later.
      • 3. | Once the setup status is determined, the plugin can emit the signal DevicePlugin::deviceSetupFinished to inform the DeviceManager about the result.
      • 4. | If the device setup succeeded and the device is in the system, the DeviceManager will call the postSetupDevice() method.

    CreateMethod "auto" - SetupMethod "justAdd"

    CreateMethod "Discovery" - SetupMethod "JustAdd"

    CreateMethod "Discovery" - SetupMethod "PushButton"

    CreateMethod "Discovery" - SetupMethod "EnterPin"

    CreateMethod "Discovery" - SetupMethod "DisplayPin"