Module ReceiverUnit

Receives messages on given channels.

Element class: ReceiverUnit

Extends: Element

Functions

getRange () Returns the receiver range.
hasChannel (channel) Checks if the given channel exists in the receiver channels list.
setChannels (channelList) Deprecated: Set the channels list.
setChannelList (channels) Set the channels list.
getChannels () Deprecated: Returns the channels list.
getChannelList () Returns the channels list.
getSignalOut (plug) Return the value of a signal in the specified OUT plug of the element.
EVENT_receive (channel, message) Deprecated: Event: Emitted when a message is received on any channel defined on the element.
EVENT_onReceived (channel, message) Event: Emitted when a message is received on any channel defined on the element.


Functions

getRange ()
Returns the receiver range.

Returns:

    float The range in m (meters).
hasChannel (channel)
Checks if the given channel exists in the receiver channels list.

Parameters:

  • channel string The channel to check for.

Returns:

    0/1 1 if the channels list contains the given channel.
setChannels (channelList)
Deprecated: Set the channels list.

This method is deprecated: setChannelList should be used instead

Parameters:

  • channelList string The channels list separated by commas.

See also:

setChannelList (channels)
Set the channels list.

Parameters:

  • channels list The channels list as a Lua table. At most 8 channels may be set, but a comma-separated string in the table will be split on the commas into multiple channels.

Returns:

    0/1 1 if the channels list has been successfully set.
getChannels ()
Deprecated: Returns the channels list.

This method is deprecated: getChannelList should be used instead

Returns:

    string The channels list separated by commas.

See also:

getChannelList ()
Returns the channels list.

Returns:

    list The channels list as a Lua table.
getSignalOut (plug)
Return the value of a signal in the specified OUT plug of the element.

Valid plug names are:

  • "out" for the out signal.

Parameters:

  • plug string A valid plug name to query.

Returns:

    0/1 The plug signal state
EVENT_receive (channel, message)
Deprecated: Event: Emitted when a message is received on any channel defined on the element.

Note: This is documentation on an event handler, not a callable method.

This event is deprecated: EVENT_onReceived should be used instead.

Parameters:

  • channel string The channel; can be used as a filter.
  • message string The message received.

See also:

EVENT_onReceived (channel, message)
Event: Emitted when a message is received on any channel defined on the element.

Note: This is documentation on an event handler, not a callable method.

Parameters:

  • channel string The channel; can be used as a filter.
  • message string The message received.
generated by LDoc 1.5.0 Last updated 2024-09-27 15:22:47