示例#1
0
        private void PublishMessages()
        {
            log.Debug("Publishing {type}", "messages");

            for (ushort i = 1; i <= OmniLink.Controller.Messages.Count; i++)
            {
                clsMessage message = OmniLink.Controller.Messages[i];

                if (message.DefaultProperties == true)
                {
                    PublishAsync(message.ToTopic(Topic.name), null);
                    continue;
                }

                PublishMessageState(message);

                PublishAsync(message.ToTopic(Topic.name), message.Name);
            }
        }
示例#2
0
 private void PublishMessageState(clsMessage message)
 {
     PublishAsync(message.ToTopic(Topic.state), message.ToState());
 }