JS: Refactor RenderManager's rate limiting code into new class

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: pull the callbacks list into the TimerTask itself, self-lock the list without a separate lockObject

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: avoid calling currentTimeMillis if we are already schedule to run

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: reduce the scope of the timing lock, don't hold it while running the callbacks

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add an iterator that takes an interface class in addition to the prototype

This allows all Entities of a particular type to be returned, but only if they
implement the given interface.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: pull out a common base class for all the Entity iterators

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: use the new iterface iterator helper in StateEntity

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: fix echoing out of inputs

commit:
9629174f8e4251e2bcf070530a96fd0168b4277c (JS: prevent generating potentially huge strings for certain input types)

Took out the trailing newline for end of line, put it back.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Convert RateLimiter to not use a Timer for redraw checks

This also avoids the 'busy wait' check for redraws.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Integrate FrameBox with global rate limiting code

Now FrameBox and all instances share the update rate limiting code with
the renderer and should never update more than 60 times a second.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Cleanup RateLimiter

Several cleanups:
-unify the locking to all use timingLock
-remove the inner class by having RateLimiter implement Runnable
-fixed thread safety bug by creating a factory method to start the thread

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Logical cleanup of RateLimiter

No functional changes, but should make the logic more understandable.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Added 'Capacity' tag for bar gauge display models

This allows for variable width bar gauges.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: fixup the OutputBox to respond to unit changes

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Position queued entities correctly when RelativeEntity is set for the Queue

Signed-off-by: Harry King <harry.king@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Delete commented code from Queue

Signed-off-by: Harry King <harry.king@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Use the Gamma function for the Weibull distribution

Signed-off-by: Harry King <harry.king@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: simplify the rate limiting code

Only record when a callback is actually done, after each callbackk, set the next
scheduled callback to very large value.  Rely on an update call setting a new
scheduled time no more than the rate limited interval past the last time.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>