Lightweight Communications and Marshalling C#.NET implementation
More...
|
| LCM (params string[] urls) |
| Create a new LCM object, connecting to one or more URLs. If no URL is specified, the environment variable LCM_DEFAULT_URL is used. If that environment variable is not defined, then the default URL is used. More...
|
|
void | Publish (string channel, string s) |
| Publish a string on a channel. This method does not use the LCM type definitions and thus is not type safe. This method is primarily provided for testing purposes and may be removed in the future. More...
|
|
void | Publish (string channel, LCMEncodable e) |
| Publish an LCM-defined type on a channel. If more than one URL was specified, the message will be sent on each. More...
|
|
void | Publish (string channel, byte[] data, int offset, int length) |
| Publish raw data on a channel, bypassing the LCM type specification. If more than one URL was specified when the LCM object was created, the message will be sent on each. More...
|
|
void | Subscribe (string regex, LCMSubscriber sub) |
| Subscribe to all channels whose name matches the regular expression. Note that to subscribe to all channels, you must specify ".*", not "*". More...
|
|
void | SubscribeAll (LCMSubscriber sub) |
| A convenience function that subscribes to all LCM channels. More...
|
|
void | Unsubscribe (string regex, LCMSubscriber sub) |
| Remove this particular regex/subscriber pair (UNTESTED AND API MAY CHANGE). If regex is null, all subscriptions for 'sub' are cancelled. If subscriber is null, any previous subscriptions matching the regular expression will be cancelled. If both 'sub' and 'regex' are null, all subscriptions will be cancelled. More...
|
|
void | Close () |
| Call this function to release all resources used by the LCM instance. After calling this function, the LCM instance should consume no resources, and cannot be used to receive or transmit messages. More...
|
|
|
static LCM | Singleton [get] |
| Retrieve a default instance of LCM using either the environment variable LCM_DEFAULT_URL or the default. If an exception occurs, exit(-1) is called. More...
|
|
int | NumSubscriptions [get] |
| The number of subscriptions. More...
|
|
Lightweight Communications and Marshalling C#.NET implementation
◆ LCM()
LCM.LCM.LCM.LCM |
( |
params string[] |
urls | ) |
|
|
inline |
Create a new LCM object, connecting to one or more URLs. If no URL is specified, the environment variable LCM_DEFAULT_URL is used. If that environment variable is not defined, then the default URL is used.
- Parameters
-
◆ Close()
void LCM.LCM.LCM.Close |
( |
| ) |
|
|
inline |
Call this function to release all resources used by the LCM instance. After calling this function, the LCM instance should consume no resources, and cannot be used to receive or transmit messages.
◆ Publish() [1/3]
void LCM.LCM.LCM.Publish |
( |
string |
channel, |
|
|
byte[] |
data, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
inline |
Publish raw data on a channel, bypassing the LCM type specification. If more than one URL was specified when the LCM object was created, the message will be sent on each.
- Parameters
-
channel | channel name |
data | data byte array |
offset | offset of the data to write |
length | length of the data to write |
◆ Publish() [2/3]
Publish an LCM-defined type on a channel. If more than one URL was specified, the message will be sent on each.
- Parameters
-
channel | channel name |
e | encodable object to send |
◆ Publish() [3/3]
void LCM.LCM.LCM.Publish |
( |
string |
channel, |
|
|
string |
s |
|
) |
| |
|
inline |
Publish a string on a channel. This method does not use the LCM type definitions and thus is not type safe. This method is primarily provided for testing purposes and may be removed in the future.
- Parameters
-
channel | channel name |
s | string to publich |
◆ Subscribe()
Subscribe to all channels whose name matches the regular expression. Note that to subscribe to all channels, you must specify ".*", not "*".
- Parameters
-
regex | regular expression determining the channels to subscribe |
sub | subscribing object providing callback |
◆ SubscribeAll()
A convenience function that subscribes to all LCM channels.
- Parameters
-
sub | subscribing object providing callback |
◆ Unsubscribe()
Remove this particular regex/subscriber pair (UNTESTED AND API MAY CHANGE). If regex is null, all subscriptions for 'sub' are cancelled. If subscriber is null, any previous subscriptions matching the regular expression will be cancelled. If both 'sub' and 'regex' are null, all subscriptions will be cancelled.
- Parameters
-
regex | regular expression determining the channels to unsubscribe |
sub | unsubscribing object |
◆ NumSubscriptions
int LCM.LCM.LCM.NumSubscriptions |
|
get |
The number of subscriptions.
◆ Singleton
LCM LCM.LCM.LCM.Singleton |
|
staticget |
Retrieve a default instance of LCM using either the environment variable LCM_DEFAULT_URL or the default. If an exception occurs, exit(-1) is called.
The documentation for this class was generated from the following file: