Loading...
Searching...
No Matches
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:

## 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.
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.
void | Unsubscribe (string channel)
| Unsubscribe() will be called when a channel subscription is cancelled.
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.

## 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.TCPProvider, and LCM.LCM.UDPMulticastProvider.

## 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

  channel | channel name
  data | data byte array
  offset | offset of the data to write
  length | length of the data to write

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

## 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

  channel | channel name

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

## Unsubscribe()

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

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

Parameters

  channel | channel name

Implemented in LCM.LCM.TCPProvider.

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

- lcm/lcm/Provider.cs