C# 클래스 LCM.LCM.LCM

Lightweight Communications and Marshalling C#.NET implementation
파일 보기 프로젝트 열기: mlab-upenn/arch-apex 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

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.

LCM ( ) : System

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.

Publish ( string channel, LCMEncodable e ) : void

Publish an LCM-defined type on a channel. If more than one URL was specified, the message will be sent on each.

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

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.

Publish ( string channel, string s ) : void

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.

Subscribe ( string regex, LCMSubscriber sub ) : void

Subscribe to all channels whose name matches the regular expression. Note that to subscribe to all channels, you must specify ".*", not "*".

SubscribeAll ( LCMSubscriber sub ) : void

A convenience function that subscribes to all LCM channels.

Unsubscribe ( string regex, LCMSubscriber sub ) : void

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.

비공개 메소드들

메소드 설명
ReceiveMessage ( string channel, byte data, int offset, int length ) : void

Not for use by end users. Provider back ends call this method when they receive a message. The subscribers that match the channel name are synchronously notified.

메소드 상세

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.
public Close ( ) : void
리턴 void

LCM() 공개 메소드

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.
public LCM ( ) : System
리턴 System

Publish() 공개 메소드

Publish an LCM-defined type on a channel. If more than one URL was specified, the message will be sent on each.
public Publish ( string channel, LCMEncodable e ) : void
channel string channel name
e LCMEncodable encodable object to send
리턴 void

Publish() 공개 메소드

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.
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
리턴 void

Publish() 공개 메소드

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.
public Publish ( string channel, string s ) : void
channel string channel name
s string string to publich
리턴 void

Subscribe() 공개 메소드

Subscribe to all channels whose name matches the regular expression. Note that to subscribe to all channels, you must specify ".*", not "*".
public Subscribe ( string regex, LCMSubscriber sub ) : void
regex string regular expression determining the channels to subscribe
sub LCMSubscriber subscribing object providing callback
리턴 void

SubscribeAll() 공개 메소드

A convenience function that subscribes to all LCM channels.
public SubscribeAll ( LCMSubscriber sub ) : void
sub LCMSubscriber subscribing object providing callback
리턴 void

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.
public Unsubscribe ( string regex, LCMSubscriber sub ) : void
regex string regular expression determining the channels to unsubscribe
sub LCMSubscriber unsubscribing object
리턴 void