Class Index | File Index

Classes


Class motion.Motion

Base class for all motion controllers. This sets up the basic repeating timer code, with a callback specified by base classes. Generally intended as an abstract base class, but could be useful on its own with a specialized callback. The core methods available for all controllers are also defined here.
Defined in: motion.em.

Class Summary
Constructor Attributes Constructor Name and Description
 
motion.Motion(presence, fn, period)
Field Summary
Field Attributes Field Name and Description
 
The presence the motion controller controls.
Method Summary
Method Attributes Method Name and Description
 
 
Restarts the controller, resuming if suspended.
 
Pauses the operation of the controller.
Class Detail
motion.Motion(presence, fn, period)
Parameters:
{presence} presence
The presence to control. This may be changed later by assigning to controller.presence.
{function(presence)->undefined} fn
The callback function to call repeatedly, with the presence as a parameter
{number} period
(optional =defaultPeriod) The period at which the callback is called
Field Detail
{presence} presence
The presence the motion controller controls.
Method Detail
{boolean} isSuspended()
Returns:
{boolean} true if the controller is currently suspended, false otherwise.

reset()
Restarts the controller, resuming if suspended.

suspend()
Pauses the operation of the controller. The controller can be resumed at any time by calling reset.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jun 26 2012 00:16:00 GMT-0700 (PDT)