Example #1
0
        public static string BCacheDump(string cacheId, string fileName)
        {
            BabelMessageDataCache d = ProtocolCommands.GetCache(cacheId);

            if (d != null)
            {
                string header = ""; //TODO: generate header.
                return(d.DumpToFile(fileName, true, header));
            }
            return("Error: unable to get cache.");
        }
Example #2
0
 public static string BPlot(string exchangeName, int messageId = ProtocolConstants.IDENT_USER, bool hasTimeData = true)
 {
     if (!String.IsNullOrWhiteSpace(exchangeName))
     {
         string id = PlotControl.OpenPlotShell();
         Shell  s  = Shell.GetShell(id);
         if (s != null)
         {
             PlotControl p = s.MainControl as PlotControl;
             if (p != null)
             {
                 BabelMessageDataCache d = new BabelMessageDataCache(exchangeName, messageId, true, hasTimeData);
                 p.SetCache(d);
                 return(id);
             }
             s.Close();
             return("Error: unable to open plot control.");
         }
         return("Error: unable to open plot shell.");
     }
     return("Error: bad exchange name.");
 }