示例#1
0
文件: Publisher.cs 项目: tier4/UniCom
        public void Publish(T data)
        {
            if (!_topic_initialized)
            {
                return;
            }
            if (string.IsNullOrEmpty(_topic))
            {
                Debug.LogWarning("Topic name is not valid.");
                return;
            }
            ComData <T> com_data = new ComData <T>(_topic, data);

            MessageBroker.Default.Publish <ComData <T> >(com_data);
        }
示例#2
0
        public void Publish(T data)
        {
            ComData <T> com_data = new ComData <T>(_topic, data);

            MessageBroker.Default.Publish <ComData <T> >(com_data);
        }