ProtoTwin API
    Preparing search index...

    Class ConfigurableIO

    Configurable component IO.

    Can be used to allow users to add/remove IO points at design time.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    component: null | Component

    The component to which the IO is attached.

    Accessors

    • set connections(value: null | IOConnection[]): void

      Parameters

      Returns void

    • get names(): readonly string[]

      The names of all signals.

      Returns readonly string[]

    Methods

    • Attempts to add a signal.

      Parameters

      • name: string

        The unique name for the signal.

      • access: Access

        The accessibility for the signal.

      • type: DataType

        The data type for the signal.

      • value: SignalValueType

        The initial value for the signal.

      Returns null | Signal<SignalValueType>

      The signal that was added, or null if the signal couldn't be added.

      Inputs are

      • and outputs are
      • .
    • Whether the signal with the specified name is configurable.

      Parameters

      • name: string

        The signal name.

      Returns boolean

      True if the signal is configurable, false otherwise.

    • Connects the input belonging to this IO to an output of the specified component's IO.

      Parameters

      • inputName: string

        The name for the input.

      • outputName: string

        The name for the output belonging to the specified component's IO.

      • outputComponent: null | Component

        The component for the output.

      Returns boolean

      Whether the connection was successfully added.

    • Finds the connection for the specified input, if one exists.

      Parameters

      • inputName: string

        The name for the input.

      Returns null | IOConnection

      The connection for the input, or null if a connection doesn't exist.

    • Disconnects the input belonging to this IO.

      Parameters

      • inputName: string

        The name for the input.

      Returns boolean

      Whether the input was successfully disconnected.

    • Retrieves the signal with the specified name.

      Parameters

      • name: string

        The signal name.

      Returns null | Signal<SignalValueType>

      The found signal, or null if the signal was not found.

    • Attempts to remove a signal.

      Parameters

      • name: string

        The name for the signal to be removed.

      Returns boolean

      True if the signal was removed, false otherwise.