Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an active interface with another node in this or another gadget

Hierarchy

  • ActiveInterface

Index

Properties

interface

interface: string

The name of the interface that triggered this active interface

origin

origin: string

The origin of the gadget that provided the peer to this active interface.

params

params: object

The params object, if any, that was provided when this interface was started

peer

peer: EndpointAddr

The remote AvInterfaceEntity node's endpoint address

role

Indicates whether this is the transmit or receive end of the interface

self

self: EndpointAddr

The local AvInterfaceEntity node's endpoint address

selfFromPeer

selfFromPeer: AvNodeTransform

The transform from the remote node's space to the local node's space

selfIntersectionPoint

selfIntersectionPoint: AvVector

The intersection point in the local node's space

transmitterFromReceiver

transmitterFromReceiver: AvNodeTransform

The transform from the receiver's space to the transmitter's space

transmitterIntersectionPoint

transmitterIntersectionPoint: AvVector

The intersection point in the transmitter's space

userAgent

userAgent: string

The user agent of the gadget that provided the peer to this active interface.

Methods

lock

  • lock(): Promise<InterfaceLockResult>

onEnded

  • onEnded(endedCallback: () => void): void
  • Allows the local node to provide a callback that will be invoked when the interface ends. For locked interfaces, this will be called if the remote end goes away.

    Parameters

    • endedCallback: () => void
        • (): void
        • Returns void

    Returns void

onEvent

  • onEvent(eventCallback: (event: object) => void): void
  • Allows the local node to provide a callback that will be invoked when the remote end sends an event. The interface name should define the format of these objects.

    Parameters

    • eventCallback: (event: object) => void
        • (event: object): void
        • Parameters

          • event: object

          Returns void

    Returns void

onTransformUpdated

  • onTransformUpdated(transformCallback: (entityFromPeer: AvNodeTransform) => void): void
  • Allows the local node to provide a callback that will be invoked when the transform between the local and remote node has changed. This will only be called for interfaces with the wantsTransforms field set to true.

    Parameters

    • transformCallback: (entityFromPeer: AvNodeTransform) => void
        • (entityFromPeer: AvNodeTransform): void
        • Parameters

          • entityFromPeer: AvNodeTransform

          Returns void

    Returns void

relock

  • relock(newReceiver: EndpointAddr): Promise<InterfaceLockResult>
  • Atomically unlock the interface from one receiver and lock it to another

    Parameters

    • newReceiver: EndpointAddr

    Returns Promise<InterfaceLockResult>

sendEvent

  • sendEvent(event: object): Promise<void>
  • Send an event object to the remote end. The interface name should define the format of these objects.

    Parameters

    • event: object

    Returns Promise<void>

unlock

  • unlock(): Promise<InterfaceLockResult>
  • Unlocks the interface so it can be updated to higher priority collisions or end if the nodes move apart.

    Returns Promise<InterfaceLockResult>

Generated using TypeDoc