The Invent interface gives access to the Invent integration. The connector is the heart of the integration and allows to access all features of the Invent integration. The other functions are convenience functions to access common features of the integration.

Hierarchy

  • Invent

Properties

Methods

Properties

Events: {
    RegisterForVariableUpdates(updateCallback, registerSuccessCallback) => void;
    RegisterValueReplacer(replaceFunction, registerSuccessCallback) => void;
}

The events available for the Invent connection.

Type declaration

  • RegisterForVariableUpdates:function
    • Register for variable update events. The callback will be called when a variable is updated.

      Parameters

      • updateCallback: ((variableName, value) => void)

        The update callback gets triggered when a variable is updated. The callback will receive the variable name and the new value.

          • (variableName, value): void
          • Parameters

            • variableName: string
            • value: string | number | boolean

            Returns void

      • registerSuccessCallback: ((succes) => void)

        The register success callback gets triggered when the registration was successful. The callback will receive a boolean indicating if the registration was successful.

          • (succes): void
          • Parameters

            • succes: boolean

            Returns void

      Returns void

  • RegisterValueReplacer:function
    • Register a value replacer. This will be called when a variable is used and allows a script to replace the value of the variable.

      Parameters

      • replaceFunction: ((variableName, value) => string)

        The replace function will be called when a variable is used. The function will receive the variable name and the current value. The function should return the new value for the variable or null if the variable should not be replaced.

          • (variableName, value): string
          • Parameters

            • variableName: string
            • value: string

            Returns string

      • registerSuccessCallback: ((succes) => void)

        The register success callback gets triggered when the registration was successful. The callback will receive a boolean indicating if the registration was successful.

          • (succes): void
          • Parameters

            • succes: boolean

            Returns void

      Returns void

Variables: {
    Get(variableName, callback) => void;
    Set(variableName, value, callback?) => void;
}

Access to variables in Invent.

Type declaration

  • Get:function
    • Get the variable value

      Parameters

      • variableName: string

        The variable name to retrieve the value from.

      • callback: ((value) => void)

        The callback is triggered when the value is available. The callback will receive the value as parameter. Or null if the variable does not exist.

          • (value): void
          • Parameters

            • value: string

            Returns void

      Returns void

  • Set:function
    • Sets a variable value

      Parameters

      • variableName: string

        The variable name to set the value for.

      • value: string

        The new value for the variable.

      • Optional callback: (() => void)

        The callback is triggered when the value is set.

          • (): void
          • Returns void

      Returns void

Methods

  • Retrieve the invent connector. This gives access to all features of the Invent integration. This will search for the connector and return it when it is available. If the connector is not available, the callback will be called with null. This can be the case if the Invent script is not available or there have been errors in the initialization of the connector.

    Parameters

    • callback: ((connector) => void)

      The callback is triggered when the connector is available. The callback will receive the connector as parameter or null if no connector can be found within a given time.

    Returns void

Generated using TypeDoc