PerceptionEvent(sourceName, sourceType)

Events used for communicattion between perception Components

new PerceptionEvent(sourceName, sourceType)

Creates a new event to be sent over the perception bus

Parameters:
Name Type Description
sourceName string

The name of the source of the event.

sourceType string

The type of the source.

Extends

Members

allowedEventTypes

A Set describing the types of events that are allowed

Overrides:

eventBus

The EventBusBase that will be used to send the event

Overrides:

sourceName

The String describing the name of the event source

Overrides:

sourceType

A String describing the type of the source

Overrides:

Methods

async emit(type, …data) → {Promise.<boolean>}

Emits the event on the specified event bus

Parameters:
Name Type Attributes Description
type string

The type of the event

data object <repeatable>

The optional data associated with the event

Returns:
Promise.<boolean> -

Returns a Promise resolving to true if the event had listeners, false otherwise

Overrides:

toString() → {string}

Convert an event to a human-readable string

Returns:
string -

A string describing this event

Overrides: