C# Class LCM.LCM.MessageAggregator

Accumulates received LCM messages in a queue.

{@link LCM} normally delivers messages asynchronously by invoking the {@link LCMSubscriber#messageReceived 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.

Inheritance: LCMSubscriber
ファイルを表示 Open project: mlab-upenn/arch-apex

Public Methods

Method Description
GetNextMessage ( ) : Message

Retrieves the next message, waiting if necessary.

GetNextMessage ( long timeoutMs ) : Message

Attempt to retrieve the next received LCM message.

MessageReceived ( LCM lcm, string channel, LCMDataInputStream dins ) : void

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

Method Details

GetNextMessage() public method

Retrieves the next message, waiting if necessary.
public GetNextMessage ( ) : Message
return Message

GetNextMessage() public method

Attempt to retrieve the next received LCM message.
public GetNextMessage ( long timeoutMs ) : Message
timeoutMs long
return Message

MessageReceived() public method

Internal method, called by LCM when a message is received.
public MessageReceived ( LCM lcm, string channel, LCMDataInputStream dins ) : void
lcm LCM
channel string
dins LCMDataInputStream
return void