registerPublisher() public method

Register a publisher
public registerPublisher ( String caller_id, String topic, String topic_type, String caller_api ) : rosmaster.ReturnStruct
caller_id String
topic String
topic_type String
caller_api String
return rosmaster.ReturnStruct
Esempio n. 1
0
        /// <summary>
        /// Register a new publisher to a topic
        /// </summary>
        /// <param name="parms"></param>
        /// <param name="result"></param>
        public XmlRpcValue registerPublisher(String caller_id, String topic, String type, String caller_api)
        {
            XmlRpcValue res = new XmlRpcValue();

            Console.WriteLine("PUBLISHING: " + caller_id + " : " + caller_api + " : " + topic);

            ReturnStruct st = handler.registerPublisher(caller_id, topic, type, caller_api);

            res.Set(0, st.statusCode);
            res.Set(1, st.statusMessage);
            res.Set(2, st.value);
            return(res);
        }
Esempio n. 2
0
        /// <summary>
        /// Register a new publisher to a topic
        /// </summary>
        /// <param name="parms"></param>
        /// <param name="result"></param>
        public void registerPublisher([In][Out] IntPtr parms, [In][Out] IntPtr result)
        {
            XmlRpcValue res = XmlRpcValue.Create(ref result), parm = XmlRpcValue.Create(ref parms);

            String caller_id  = parm[0].GetString();
            String topic      = parm[1].GetString();
            String type       = parm[2].GetString();
            String caller_api = parm[3].GetString(); //hostname

            Console.WriteLine("PUBLISHING: " + caller_id + " : " + caller_api);

            handler.registerPublisher(caller_id, topic, type, caller_api);
            res.Set(0, 1);
            res.Set(1, "GOOD JOB!");
            res.Set(2, new XmlRpcValue(""));
        }