Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Template Reference Documentation

System Template

adjust()

Call this method to adjust the value stored in this counter. The 'adjustment' value is *added* to the value currently stored in the counter. Note that by making the adjustment value negative you can decrement the counter.

Syntax

count = rb.counter.adjust(counterName, adjustment, maxLifeTime)

Parameters

The 'adjust' method takes 3 parameters:

Name Type/Value Range/Length Description
counterNamestring  Required. The name of the counter to adjust.
adjustmentnumber  Required. The number to *add* to the current value of this counter.
maxLifeTimenumber  Optional, default = 1800
Maximum time (in seconds) this variable will exist if it is not read or updated by the system. The default is 1800 (30 minutes).

Results

The 'adjust' method returns structure:

Type/Value Range/Length Description
struct count see definition The adjusted counter

Remarks

This method search for the named counter and adds adjustment value to the value currently stored. If the counter does *not* exist then it is optionally created if 'initValue' is specified. The counter thus created will take the value of 'initValue'.

Example

Whitebeam release 1.3.36
(loadtime : 64ms)