Function startRoles

  • Tracks a set of roles

    Type Parameters

    • TRoles extends Record<string, {
          preferredDeviceId?: string;
          preferredServiceIndex?: number;
          serviceClass: number;
      }>

    Parameters

    • bus: JDBus

      bus hosting the devices

    • bindings: TRoles

      map of role names to device service pairs

    • onUpdate: ((roles) => void)

      callback to run whenver role assignments change

        • (roles): void
        • Parameters

          Returns void

    • Optional options: {
          incomplete?: boolean;
      }

      Additional options

      • Optional incomplete?: boolean

        Calls update even if not all role around bound

    Returns (() => void)

    A unsubscribe callback to cleanup handlers

      • (): void
      • Subscribes to an event and returns the unsubscription handler

        Returns void

        Category

        JDOM

Generated using TypeDoc