Universal Robots TypeScript API - v10.12.0
    Preparing search index...

    Class VariableService

    Service for generating and getting reserved variable names

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    communicationChannel: CommunicationChannel

    Methods

    • Create a new variable declaration

      Parameters

      • name: string

        Actual name of the variable. Might be changed by the service to avoid name clashes

      • variableType:
            | "string"
            | "boolean"
            | "pose"
            | "frame"
            | "waypoint"
            | "float"
            | "integer"
            | "matrix"
            | "array"
            | "grid"
            | "timer"
            | "profile"

        ValueType of the variable

      Returns Promise<VariableDeclaration>

      Promise resolving to the created variable declaration

    • returns a reply promise to the specified message

      Type Parameters

      • T

      Parameters

      • type: string

        The type of message being sent

      • Optionaldata: any

        The message data

      Returns Promise<T>

    • returns an observable that will emit any messages replied to the specified message

      Type Parameters

      • T

      Parameters

      • type: string

        The type of message being sent

      • Optionaldata: any

        The message data

      Returns Observable<T>

    • returns a reply promise for the requested message

      Type Parameters

      • T

      Parameters

      • type: string

        The type of message being sent

      • Optionaldata: any

        The message data

      Returns Promise<T>

    • returns an observable that will emit any messages replied to the requested message

      Type Parameters

      • T

      Parameters

      • type: string

        The type of message being sent

      • Optionaldata: any

        The message data

      Returns Observable<T>

    • Upgrade from URVariable to VariableDeclaration | VariableReference. If a variable with the property reference=true is provided, the corresponding VariableReference is returned. If a variable with reference=false is provided, a VariableDeclaration is returned.

      Parameters

      Returns Promise<VariableDeclaration | VariableReference | undefined>

      Promise resolving to the VariableDeclaration | VariableReference | undefined if not found