C# Class LCM.LCM.UDPMulticastProvider

LCM provider for the udpm: URL. All messages are broadcast over a pre-arranged UDP multicast address. Subscription operations are a no-op, since all messages are always broadcast. This mechanism is very simple, low-latency, and efficient due to not having to transmit messages more than once when there are multiple subscribers. Since it uses UDP, it is lossy.
Inheritance: Provider
显示文件 Open project: lcm-proj/lcm

Public Methods

Method Description
Close ( ) : void

Call to close the provider

Publish ( string channel, byte data, int offset, int length ) : void

Publish a message

Subscribe ( string channel ) : void

Subscribe to a channel

UDPMulticastProvider ( LCM lcm, URLParser up ) : System

UDP multicast provider constructor

Unsubscribe ( String channel ) : void

Unsubscribe from a channel

Private Methods

Method Description
HandleFragment ( byte packetData, IPEndPoint from, LCMDataInputStream ins ) : void
HandlePacket ( byte packetData, IPEndPoint from ) : void
HandleShortMessage ( byte packetData, IPEndPoint from, LCMDataInputStream ins ) : void
PublishEx ( string channel, byte data, int offset, int length ) : void
ReaderThreadRun ( ) : void

Method Details

Close() public method

Call to close the provider
public Close ( ) : void
return void

Publish() public method

Publish a message
public Publish ( string channel, byte data, int offset, int length ) : void
channel string channel name
data byte data byte array
offset int offset of the data to write
length int length of the data to write
return void

Subscribe() public method

Subscribe to a channel
public Subscribe ( string channel ) : void
channel string channel name
return void

UDPMulticastProvider() public method

UDP multicast provider constructor
public UDPMulticastProvider ( LCM lcm, URLParser up ) : System
lcm LCM LCM object
up URLParser URL parser object
return System

Unsubscribe() public method

Unsubscribe from a channel
public Unsubscribe ( String channel ) : void
channel String channel name
return void