Facility Control

 View Only
  • 1.  XML file output

    Posted 06-26-2019 12:17

    I think I have been going about this all wrong!

     

    DASHBoard can produce an XML file for communication with other software/devices.

     

    I was trying to write individual scripts for each event (score change, period change  etc). I now believe I should be merely reading  the generated XML file as a data source for my other software. So much simpler.

    Two issues though

    My software balks at the first line in the XML file from DASHBoard:

    <?xml version="1.1" encoding="UTF-8"?>

    I get an ERROR: Version number "1.1" is invalid. Line 1. position 16

    Upon further research it appears as though Microsoft does not support Version 1.1.Is anyone aware of a workaround to avoid this error? either strip this line from the DASHBoard XML file on the fly or change that line to version 1.0.

     

    The second issue/query is

    Can an existing panel ( Chris Kapstein's Hockey Package) be modified so that it does generate an XML file. I believe this is originally determined in the selection of the template which must be "External XML data source file". Can I implement this in an existing .grid file? Or is there some other work around.

    Thanks

     

    Whit

     



  • 2.  RE: XML file output

    Posted 06-26-2019 16:58

    Just out of curiosity, what are you trying to communicate with?


    #DashBoard


  • 3.  RE: XML file output

    Posted 06-26-2019 23:09

    Hi ALeksander

     

    I am trying to emulate a second version of Chris Kapstein's Hockey Controller. This second version is for vMix.

     

    If I can't find a workaround for the XML version 1.1 issue, I will utilize the "Web Interface" function that DASHBoard has and bring in the WebController that vMix has. It's not pretty but vry functional. I am hoping to redesign the "buttons" and perhaps alter their layout.

    When I finish that I want to tackle his original and try to use it with APIs (JSON formatted) and XML data from Sportzcast scorebot.

    Thanks

     

    Whit

     


    #DashBoard


  • 4.  RE: XML file output

    Posted 06-28-2019 20:21

    Hi Whit.

    DashBoard will always write these device definition files in XML 1.1. The issue you'll have with stripping the header is that the application writes to the file whenever a parameter changes (meaning that it could happen quite frequently).  Another option might be to use the JSON file format instead of XML.

    As for changing an existing panel so that it DOES generate the XML file - yes. You can change the data source to be an XML file. Once the file is created, cut the content of the panel's <params/> tag, close the panel, and paste the content into the <params/> area of the XML file, reopen the panel.


    #DashBoard


  • 5.  RE: XML file output

    Posted 06-29-2019 13:20

    Hi James

     

    Yes, the changes occur too quickly to be able to modify the file on the fly.

    JSON format would be the way to go to circumvent the Versions conflict.

    I would (substituting JSON for XML):

    1. Follow your graphic to create the ogjson file for the grid
    2. cut the content of the panel's <params/> tag,
    3. close the panel, 
    4. paste the content into the <params/> area of the ogjson file,
    5. reopen the panel.

    2. a) Did you mean "cut" or "copy"

        b) Where do I locate the <params/> tag ?

    3. I'll have to see what the JSON file structure looks like and the tags

     

    Thank you, I think I grasp the concept but these finer details ...

     

    Thanks

     

    Whit


    #DashBoard


  • 6.  RE: XML file output

    Posted 07-04-2019 16:10

    Hi Whit.

    If your parameters are defined using the "self-contained" data source (where the parameters and the CustomPanel are stored together in a single XML file, your parameters should be defined near the top of the CustomPanel. In the screen grab I posted, you'll see it as the 3rd node in the tree on the left of the source editor.

    I do mean "cut" since you want to move the parameters into the new file.

    To go from self-contained XML to the ogJSON structure is a little more involved. The easiest method is to start with transitioning it to an XML file first and THEN transitioning from the XML to ogJSON. Here are the extra steps:

    1. Once you have the parameters working in the XML file, rename the file from *.xml to *.ogd
    2. Drag the *.ogd file into the "File Navigator" view (typically at the bottom-left of your DashBoard screen)
    3. Double-click on the OGD file to "connect" to it - you'll see it turn from an "oG document" logo to a colored dot
    4. Right-click on the dot and select "Save configuration to file" and change the type to "ogjson"
    5. Change your data source from the XML/OGD to the ogJSON file in the source editor of your CustomPanel

     


    #DashBoard


  • 7.  RE: XML file output

    Posted 07-06-2019 14:31

    Thank you sir. I am off to Ottawa this weekend but will get back to this early next week

     

    Thanks again

     

    Whit


    #DashBoard