LCM.LCM.LCM.Publish C# (CSharp) Method

Publish() public method

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
return void
		public void Publish(string channel, string s)
		{
            if (this.closed)
            {
                throw new SystemException();
            }

			s = s + "\0";
            byte[] b = System.Text.Encoding.GetEncoding("US-ASCII").GetBytes(s);

			Publish(channel, b, 0, b.Length);
		}
		

Same methods

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

Usage Example

示例#1
0
        public void discover(string input)
        {
            _ea.GetEvent <StatusUpdateEvent>().Publish("Discovering...");
            discovery_request_t discoveryRequest = new discovery_request_t();

            _lcm.Publish(Channels.discovery_req_channel, discoveryRequest);
        }
All Usage Examples Of LCM.LCM.LCM::Publish