Loading...
Searching...
No Matches
LCM.LCM.MessageAggregator Class Reference

Accumulates received LCM messages in a queue. More...

Inheritance diagram for LCM.LCM.MessageAggregator:

## Classes

class | Message
| A received message. More...

## Public Member Functions

void | MessageReceived (LCM lcm, string channel, LCMDataInputStream dins)
| Internal method, called by LCM when a message is received.
Message | GetNextMessage (long timeoutMs)
| Attempt to retrieve the next received LCM message.
Message | GetNextMessage ()
| Retrieves the next message, waiting if necessary.

## Properties

long | MaxBufferSize`[get, set]`
| Retrieves and sets the maximum amount of memory that will be used to store messages. This is an alternative way to limit the messages stored by the aggregator. Messages are discarded oldest-first to ensure that the total size of unretrieved messages stays under this limit.
int | MaxMessages`[get, set]`
| Retrieves and sets the maximum number of unretrieved message that will be queued up by the aggregator. Messages are discarded oldest-first to ensure that the number of unretrieved messages stays under this limit.
int | MessagesAvailable`[get]`
| The number of received messages waiting to be retrieved.

## Detailed Description

Accumulates received LCM messages in a queue.

`LCM` normally delivers messages asynchronously by invoking the `messageReceived` method on a subscriber as soon as a message is received. This class provides an alternate way to receive messages by storing them in an internal queue, and then delivering them to synchronously to the user.

The aggregator has configurable limits. If too many messages are aggregated without having been retrieved, then older messages are discarded.

## Member Function Documentation

## GetNextMessage()

Message LCM.LCM.MessageAggregator.GetNextMessage | ( | long | timeoutMs | ) |

inline

Attempt to retrieve the next received LCM message.

Parameters

  timeout_ms | Max # of milliseconds to wait for a message. If 0, then don't wait. If less than 0, then wait indefinitely.

Returns
  a Message, or null if no message was received.

## MessageReceived()

void LCM.LCM.MessageAggregator.MessageReceived | ( | LCM | lcm,
|  | string | channel,
|  | LCMDataInputStream | dins )

inline

Internal method, called by LCM when a message is received.

Implements LCM.LCM.LCMSubscriber.

## Property Documentation

## MaxBufferSize

long LCM.LCM.MessageAggregator.MaxBufferSize

get set

Retrieves and sets the maximum amount of memory that will be used to store messages. This is an alternative way to limit the messages stored by the aggregator. Messages are discarded oldest-first to ensure that the total size of unretrieved messages stays under this limit.

Parameters

  val | memory limit, in bytes.

The documentation for this class was generated from the following file:

- lcm/lcm/MessageAggregator.cs