Facility Control

 View Only
  • 1.  Configure Datalinq connection from Dashboard

    Posted 01-04-2017 02:15
    Hi,

    I am devoid of technical skills and was wondering if there is a way that I can change the config of a Datalinq connection from within Dashboard?

    I will have multiple match feeds coming through and would like to be able to change the current selected match without the operator needing to use the Datalinq server to change matches. Is this something that is possible?

    Cheers,
    Matt


  • 2.  RE: Configure Datalinq connection from Dashboard

    Posted 01-05-2017 22:08
    Hi Matt.
    DashBoard can feed data to DataLinq and trigger various actions in XPression (such as bringing take IDs to air) but cannot change what DataLinq is pointing at or which fields an XPression template are pointing to in DataLinq.

    ...

    There may be some things we can do though.

    How are you currently receiving your match data? Is it a file? Is it a URL?

    DashBoard could possibly replace the file DataLinq is pointing to based on a button press.


    James

    #DashBoard


  • 3.  RE: Configure Datalinq connection from Dashboard

    Posted 01-06-2017 06:49
    Hi James.

    Currently we receive xml files and any way that we could do a file replace would be amazing, I have dashboard working great with controlling a show after watching the tutorials but when it comes to anything code related my brain fades away rapidly.

    Cheers,
    Matt
    #DashBoard


  • 4.  RE: Configure Datalinq connection from Dashboard

    Posted 01-06-2017 15:42
    How are the XML files received?
    #DashBoard


  • 5.  RE: Configure Datalinq connection from Dashboard

    Posted 01-09-2017 01:56
    Sorry for the slow response, I'm away working on a remote at the moment.

    The files are fed to a shared drive we then map to our machines.
    #DashBoard


  • 6.  RE: Configure Datalinq connection from Dashboard

    Posted 01-11-2017 14:31

    Hi Matt.
    Here is an example that will take 'game-two.xml' or 'game-one.xml' and write them to 'game-active.xml'.

    <abs contexttype="opengear" style="">
       <meta>
          <api>function loadFile(filePath)
    {
       var xmlContent = ogscript.parseXML(filePath);
       if (xmlContent != null)
       {
          ogscript.saveToFile('game-active.xml', xmlContent);
       }
    }
    </api>
       </meta>
       <simplegrid height="109" left="13" rows="1" top="14" width="383">
          <button buttontype="push" name="Load Game One">
             <task tasktype="ogscript">loadFile('game-one.xml');</task>
          </button>
          <button buttontype="push" name="Load Game Two">
             <task tasktype="ogscript">loadFile('game-two.xml');</task>
          </button>
       </simplegrid>
    </abs>

    Another option, if your remote file is updated frequently, is to use a timer to update the 'active' game file every few seconds:

    <abs contexttype="opengear">
       <timer pattern="HH:mm:ss" rate="2000">
          <timertask tasktype="ogscript">loadActiveFile();</timertask>
       </timer>
       <meta>
          <api>function setActiveFile(fileName)
    {
       ogscript.putObject('active-file', fileName);
       loadActiveFile();
    }
    
    function loadActiveFile()
    {
       var activeFile = ogscript.getObject('active-file');
       if (activeFile != null)
       {
          loadFile(activeFile);
       }
    }
    
    function loadFile(filePath)
    {
       var xmlContent = ogscript.parseXML(filePath);
       if (xmlContent != null)
       {
          ogscript.saveToFile('game-active.xml', xmlContent);
       }
    }</api>
       </meta>
       <simplegrid height="109" left="13" rows="1" top="14" width="383">
          <button buttontype="push" name="Load Game One">
             <task tasktype="ogscript">setActiveFile('game-one.xml');</task>
          </button>
          <button buttontype="push" name="Load Game Two">
             <task tasktype="ogscript">setActiveFile('game-two.xml');</task>
          </button>
       </simplegrid>
    </abs>

    #DashBoard