public void DisconnectTopic(ExcelRtdServer.Topic topic) { lock (_activeTopics) { _activeTopics.Remove(topic.TopicId); } }
public void ConnectTopic(ExcelRtdServer.Topic topic) { lock (_activeTopics) { _activeTopics[topic.TopicId] = topic; topic.UpdateValue($"ConnectData ({DateTime.Now.ToString("HH:mm:ss")}"); } }
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; }
//-------------------------------------------------------------------// /// <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); }
//-------------------------------------------------------------------// /// <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); }
//-------------------------------------------------------------------// /// <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)); }
public void SetTopic(string path, ExcelRtdServer.Topic topic) { GetPath(path).topic = topic; }
public static void SetTopic(string path, ExcelRtdServer.Topic topic) { root.SetTopic(path, topic); }