Facility Control

 View Only
  • 1.  Using local parameters within context of Carbonite

    Posted 03-10-2016 21:50

    I'm working on a custom panel to control our Carbonite switcher. As part of this I'm trying to use local parameters to let the user select which ME/MiniMEs are included in a transition. But I've run into a snag. If I add a toggle button which references a local parameter to a table or abs that is outside the Carbonite context - then everything works great. But if I add it to a table or abs that is within the Carbonite context - then the button disappears and the script says it can't find the parameter.

    Here is a simplified example:

    <abs contexttype="opengear" style="">
       <meta>
          <params>
             <param access="1" constrainttype="INT_CHOICE" name="ME1Incl" oid="ME1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
                <constraint key="0">NO</constraint>
                <constraint key="1">YES</constraint>
             </param>
             <param access="1" constrainttype="INT_CHOICE" name="mm1Incl" oid="mm1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
                <constraint key="0">NO</constraint>
                <constraint key="1">YES</constraint>
             </param>
          </params>
       </meta>
       <table height="100" top="50" width="500">
          <tr>
             <label name="ME1Incl button is here --&gt;"/>
             <param expand="true" height="100" left="50" oid="ME1Incl" style="style:toggleButton" top="50" widget="13" width="100"/>
          </tr>
       </table>
       <table contexttype="opengear" height="200" left="50" objectid="10.30.32.71:5253&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" top="200" width="500">
          <tr>
             <label name="mm1Incl button should be here --&gt;"/>
             <param expand="true" height="100" left="5" oid="mm1Incl" style="style:toggleButton" top="5" widget="13" width="100"/>
          </tr>
          <tr>
             <label name="Auto-Trns button is here --&gt;"/>
             <param anchor="west" element="0" expand="true" fill="none" height="100" oid="0x98D" showlabel="false" weightx="1.0" weighty="1.0" widget="13" width="100"/>
          </tr>
       </table>
    </abs>

    And the screenshot of the results:



  • 2.  RE: Using local parameters within context of Carbonite

    Posted 03-11-2016 15:12

    Hi stanalyst.
    Unfortunately, there is not much of a User Interface in Panel Builder for handling this but there are a few ways to work around it.

    One fairly simple way (if you're using DashBoard 8.0 Beta) would be to add an id to your top-level context and then add the new contextid attribute to your missing param tag:

    <abs contexttype="opengear" id="my-panel-context" style="">
    <meta>
    <params>
    <param access="1" constrainttype="INT_CHOICE" name="ME1Incl" oid="ME1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
    <constraint key="0">NO</constraint>
    <constraint key="1">YES</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="mm1Incl" oid="mm1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
    <constraint key="0">NO</constraint>
    <constraint key="1">YES</constraint>
    </param>
    </params>
    </meta>
    <table height="100" top="50" width="500">
    <tr>
    <label name="ME1Incl button is here --&gt;"/>
    <param expand="true" height="100" left="50" oid="ME1Incl" style="style:toggleButton" top="50" widget="13" width="100"/>
    </tr>
    </table>
    <table contexttype="opengear" height="200" left="50" objectid="10.30.32.71:5253&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" top="200" width="500">
    <tr>
    <label name="mm1Incl button should be here --&gt;"/>
    <param contextid="my-panel-context" expand="true" height="100" left="5" oid="mm1Incl" style="style:toggleButton" top="5" widget="13" width="100"/>
    </tr>
    <tr>
    <label name="Auto-Trns button is here --&gt;"/>
    <param anchor="west" element="0" expand="true" fill="none" height="100" oid="0x98D" showlabel="false" weightx="1.0" weighty="1.0" widget="13" width="100"/>
    </tr>
    </table>
    </abs>

    Another option would be to just make your entire panel point to the Carbonite. The downside of this approach is that UI tools for adding new parameters will disappear (you'l have to manually add them in the XML). The upside is that the overall code is a bit cleaner:

    <abs contexttype="opengear" objectid="10.30.32.71:5253&lt;br&gt;Slot 0&lt;br&gt;Carbonite" objecttype="Carbonite" style="">
    <meta>
    <params>
    <param access="1" constrainttype="INT_CHOICE" name="ME1Incl" oid="ME1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
    <constraint key="0">NO</constraint>
    <constraint key="1">YES</constraint>
    </param>
    <param access="1" constrainttype="INT_CHOICE" name="mm1Incl" oid="mm1Incl" precision="0" type="INT32" value="1" widget="radio-toggle">
    <constraint key="0">NO</constraint>
    <constraint key="1">YES</constraint>
    </param>
    </params>
    </meta>
    <table height="300" left="50" top="200" width="500">
    <tr>
    <label name="ME1Incl button is here --&gt;"/>
    <param expand="true" height="100" left="50" oid="ME1Incl" style="style:toggleButton" top="50" widget="13" width="100"/>
    </tr>
    <tr>
    <label name="mm1Incl button should be here --&gt;"/>
    <param expand="true" height="100" left="5" oid="mm1Incl" style="style:toggleButton" top="5" widget="13" width="100"/>
    </tr>
    <tr>
    <label name="Auto-Trns button is here --&gt;"/>
    <param anchor="west" element="0" expand="true" fill="none" height="100" oid="0x98D" showlabel="false" weightx="1.0" weighty="1.0" widget="13" width="100"/>
    </tr>
    </table>
    </abs>

    #DashBoard