Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Determine which datapoints you want to use, and use the CMS Datapoint Browser Datapoints widget to determine the datapoint path.
    <device name>/<block name>/<block index>/<datapoint name>

  2. Copy simplesensor.html and rename it to another name (for example, test.html).

  3. Copy scripts/simplesensor.js and rename it (for example, test.js).

  4. Change test.html to have the look and feel you want. You may need a different write function for each button.

  5. Change test.js:  
    1. Change init1()
      1. Change the g_sWebpageTag to a unique web page tag.
      2. Change g_iMax_Age to specify if you are using on-demand polling (max_age).
        • In most cases you will set g_iMax_Age=1 to support both on-demand and non-on-demand periodic polling.
      3. Build up the g_dpList for all the HTML elements in the test.html web page.
        • Specify if the datapoint uses max age when you add the datapoint to g_dpList.
                dpObj = new dpObject(datapoint_path, bUseMaxAge);
    2. Modify or add write functions.
    3. Modify or add validate function for any write data.
    4. Add any jsFunctions to process multiple datapoints for a single HTML element.

...