data file settings

Obaid Khan
2008-11-04
2013-05-28
  • Obaid Khan
    Obaid Khan
    2008-11-04

    Dear,

    I have just started using livegraph. every thing goes well except that i can't read the .lgdat file using setDatFile. I am simply following the instructions given on the livegraph home page. I just copied the writer API and then in the main program i did what is mentioned in the home page of livegraph. my main program looks like:

    public static void main(String[] unusedArgs) {
        LiveGraphDemo demo = new LiveGraphDemo();
       
        demo.exec();
       
        DataFileSettings dfs = new DataFileSettings( );
        dfs.setDataFile(DEMO_DIR+"\\datafile.lgdat");
        dfs.setUpdateFrequency(5000);
        dfs.save(DEMO_DIR+"\\startup.lgdfs");
       
        LiveGraph app = LiveGraph.application();
        app.execStandalone(new String[] {"-dfs", DEMO_DIR+"\\tartup.lgdfs"});

    }

    but the file can't be set and I get an error:

    Exception in thread "main" java.lang.NullPointerException
        at org.LiveGraph.settings.ObservableSettings.checkObservers(ObservableSettings.java)
        at org.LiveGraph.settings.DataFileSettings.setDataFile(DataFileSettings.java)
        at org.LiveGraph.demoDataSource.LiveGraphDemo.main(LiveGraphDemo.java:221)

    should I add some extra functionality to start the plotter from the program because i can run the livegraph from gui but opening the same file using dfs window.

    please reply...........................

     
    • Greg Paperin
      Greg Paperin
      2008-11-11

      It looks like you are doing everything correctly.
      Unfortunately I think that everyone is traveling at the moment. I´ll expect It´ll be 10-15 days to get an answer. Please hang on))! 

       
  • Please, did you find the solution to this problem? I have, too!!!

     
  • I have this error too.