LCM .NET API
Public Member Functions | List of all members
LCM.LCM.Provider Interface Reference

A provider implements a communications modality for LCM. (I.e., a URL handler.) The provider should call LC.receiveMessage() upon receipt of a message. LCM.ReceiveMessage() is thread-safe and can be called from any thread. More...

Inheritance diagram for LCM.LCM.Provider:
LCM.LCM.TCPProvider LCM.LCM.UDPMulticastProvider

Public Member Functions

void Publish (string channel, byte[] data, int offset, int len)
 Publish() will be called when an application sends a message, and could be called on an arbitrary thread. More...
 
void Subscribe (string channel)
 Subscribe() will be called when a channel subscription has been made. Providers that do not use a broadcast communications mechanism could use this notification to establish communications with additional hosts. More...
 
void Unsubscribe (string channel)
 Unsubscribe() will be called when a channel subscription is cancelled. More...
 
void Close ()
 Close() will be called when the application no longer requires the provider and wishes to free the resources used by the provider. For example, file handles and network sockets should be closed. After this method is called, the results of any calls to publish or subscribe are undefined. More...
 

Detailed Description

A provider implements a communications modality for LCM. (I.e., a URL handler.) The provider should call LC.receiveMessage() upon receipt of a message. LCM.ReceiveMessage() is thread-safe and can be called from any thread.

Member Function Documentation

◆ Close()

void LCM.LCM.Provider.Close ( )

Close() will be called when the application no longer requires the provider and wishes to free the resources used by the provider. For example, file handles and network sockets should be closed. After this method is called, the results of any calls to publish or subscribe are undefined.

Implemented in LCM.LCM.UDPMulticastProvider, and LCM.LCM.TCPProvider.

◆ Publish()

void LCM.LCM.Provider.Publish ( string  channel,
byte[]  data,
int  offset,
int  len 
)

Publish() will be called when an application sends a message, and could be called on an arbitrary thread.

Parameters
channelchannel name
datadata byte array
offsetoffset of the data to write
lengthlength of the data to write

Implemented in LCM.LCM.UDPMulticastProvider, and LCM.LCM.TCPProvider.

◆ Subscribe()

void LCM.LCM.Provider.Subscribe ( string  channel)

Subscribe() will be called when a channel subscription has been made. Providers that do not use a broadcast communications mechanism could use this notification to establish communications with additional hosts.

Parameters
channelchannel name

Implemented in LCM.LCM.UDPMulticastProvider, and LCM.LCM.TCPProvider.

◆ Unsubscribe()

void LCM.LCM.Provider.Unsubscribe ( string  channel)

Unsubscribe() will be called when a channel subscription is cancelled.

Parameters
channelchannel name

Implemented in LCM.LCM.TCPProvider.


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