@espressif/rainmaker-base-cdf
    Preparing search index...

    Class ESPCDF

    The root store that manages all individual stores.

    Index

    Constructors

    Properties

    instance: ESPCDF | null = null

    Accessors

    automationStore: default
    groupStore: default
    nodeStore: default
    sceneStore: default
    scheduleStore: default
    sdkAdaptorRegistry: AdaptorRegistry
    subscriptionStore: default
    userStore: default

    Methods

    • Gets an SDK adaptor by identifier.

      Parameters

      • adaptorIdentifier: string

        The identifier of the adaptor to retrieve

      Returns ESPSDKAdaptor

      The SDK adaptor instance

    • Adds a custom store to the root store.

      Parameters

      • storeName: string

        The name of the custom store.

      • StoreClass: new (rootStore: ESPCDF) => any

        The class of the custom store.

        Example:

        import { makeAutoObservable, action } from "mobx";
        import { CDF } from "./index";

        class CustomStore {
        rootStore: CDF;
        customValue = "custom value";

        constructor(rootStore: CDF) {
        this.rootStore = rootStore;
        makeAutoObservable(this);
        }

        @action setCustomValue(value: string) {
        this.customValue = value;
        }
        }

        store.addStore("customStore", CustomStore);

      Returns void

    • Returns the identifier of the currently active SDK adaptor, or null if none is set.

      Returns string | null

      The active adaptor identifier, or null