Publish() public method

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
return void
Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public static void initializeSession(string ip, string un, string pwd)
        {
            var initSessionRequest = new init_session_request_t()
            {
                ip_address = ip,
                username   = un,
                password   = pwd
            };

            _lcm.Publish(Channels.init_session_req_channel, initSessionRequest);
        }
Exemplo n.º 3
0
        public void transmit(string msgType, LCMEncodable lcmOut)
        {
            try
            {
                Utils.lcmTransmitterMessage("Transmitting {0} message", msgType);

                appLCM.Publish(msgType, lcmOut);
            }
            catch (Exception e)
            {
                Console.Error.WriteLine("Ex: " + e);
            }
        }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        t++;
        if (t > 60)
        {
            exlcm.example_t msg = new exlcm.example_t();
            //Debug.Log("publish update");
            TimeSpan span = DateTime.Now - new DateTime(1970, 1, 1);
            msg.timestamp   = span.Ticks * 100;
            msg.position    = new double[] { 1, 2, 3 };
            msg.orientation = new double[] { 1, 0, 0, 0 };
            msg.num_ranges  = 15;
            msg.ranges      = new short[msg.num_ranges];
            for (int i = 0; i < msg.num_ranges; i++)
            {
                msg.ranges[i] = (short)i;
            }
            msg.name    = "example string";
            msg.enabled = true;

            myLCM.Publish("EXAMPLE", msg);
            t = 0;
        }
    }