Exemple #1
0
 public void DisconnectTopic(ExcelRtdServer.Topic topic)
 {
     lock (_activeTopics)
     {
         _activeTopics.Remove(topic.TopicId);
     }
 }
Exemple #2
0
 public void ConnectTopic(ExcelRtdServer.Topic topic)
 {
     lock (_activeTopics)
     {
         _activeTopics[topic.TopicId] = topic;
         topic.UpdateValue($"ConnectData ({DateTime.Now.ToString("HH:mm:ss")}");
     }
 }
Exemple #3
0
 public TopicInfo(ExcelRtdServer.Topic topic, string alias, string tab, string sym, string col, string hist)
 {
     Topic   = topic;
     Alias   = alias;
     Table   = tab;
     Symbol  = sym;
     Column  = col;
     History = hist;
 }
Exemple #4
0
        //-------------------------------------------------------------------//
        /// <summary>
        ///     Removes given topic from internal mpapings
        /// </summary>
        /// <param name="topic">topic id to be removed</param>
        public void RemoveTopic(ExcelRtdServer.Topic topic)
        {
            if (!_revMap.ContainsKey(topic))
            {
                return;
            }
            var t = _revMap[topic]; //get table,sym,col

            var list = _topicMap[t.Item1][t.Item2][t.Item3];

            foreach (var ti in list.Where(ti => ti.Topic == topic))
            {
                list.Remove(ti);
                break;
            }
            _revMap.Remove(topic);
        }
Exemple #5
0
 //-------------------------------------------------------------------//
 /// <summary>
 ///     Provides mapping between given topic id from Excel RTD and table,symbol,column
 ///     from kdb+
 /// </summary>
 /// <param name="topic">RTD formula topic id</param>
 /// <returns>Triplet: table,symbol,column  or null in case topic is not mapped</returns>
 public Tuple <string, string, string> GetMapKeys(ExcelRtdServer.Topic topic)
 {
     return(_revMap.ContainsKey(topic) ? _revMap[topic] : null);
 }
Exemple #6
0
 //-------------------------------------------------------------------//
 /// <summary>
 ///     Verifies whether given topic exists in internal mappings
 /// </summary>
 /// <param name="topic">topic id</param>
 /// <returns>ture in case topic is present, false otherwise</returns>
 public bool ContainsTopic(ExcelRtdServer.Topic topic)
 {
     return(_revMap.ContainsKey(topic));
 }
Exemple #7
0
 public void SetTopic(string path, ExcelRtdServer.Topic topic)
 {
     GetPath(path).topic = topic;
 }
Exemple #8
0
 public static void SetTopic(string path, ExcelRtdServer.Topic topic)
 {
     root.SetTopic(path, topic);
 }