wiki:rp_xml_ele_number

<number>

A number object represents a real value with an optional system of units:

  <number id="temperature">
    <about>
      <label>Ambient temperature</label>
      <description>This is the temperature in the environment around the device.</description>
    </about>
    <uq>false</uq>
    <units>K</units>
    <min>50K</min>
    <max>1000K</max>
    <default>300K</default>
    <preset>
      <value>300K</value>
      <label>300K (room temperature)</label>
    </preset>
    <preset>
      <value>77K</value>
      <label>77K (liquid nitrogen)</label>
    </preset>
  </number>

The <preset> values appear in a drop-down menu controlled by the little triangle button to the right of the number.

The <uq> attribute indicates if the number entry should have an Uncertainty Quantification icon next to it. This value overrides any system-level default, or tool-level setting in <run><tool>.


  <number id="vsweep">
    <about>
      <label>Voltage Sweep +/-</label>
      <description>This determines the voltage sweep used to obtain results from the model.</description>
      <icon>
R0lGODlhGgASAKEBAAAAAP///////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgAB
ACwAAAAAGgASAAACLoyPqcvtD8CRj8VZrYw8h/tRn2eA4Eiaosa1qttC1EmW81qrtbYvdG8DCodE
RQEAOw==
      </icon>
    </about>
    <units>V</units>
    <min>0V</min>
    <max>10V</max>
    <default>4V</default>
    <color>purple</color>
  </number>

The <icon> entry is a base64-encoded GIF file. On Linux systems, use the mimencode program to create this text representation for the GIF image.

You can see working code in the zoo of examples in the number example or on the hub in the directory /apps/rappture/examples/zoo/number.

Last modified 9 years ago Last modified on Jul 30, 2015 6:13:02 PM

Attachments (1)

Download all attachments as: .zip