Monitor
A monitor calls a user provided function to monitor a condition - when the condition changes hooked callback functions will be called.
Properties
Name | Type | Access | Description |
---|---|---|---|
hooks | Table of MonitorHooks | R | All currently registered hooks |
id | String | R | Identifier of the Monitor |
state | Boolean | R | The current state of the Monitor condition |
Functions and Enumerations
- Constructors
Constructors for the Monitor class.
- Monitor( id, initialState, table, func, arg )
Create a new Monitor
- Monitor( id, initialState, table, func, arg )
- Static Functions
Functions that are called without an instance of the Monitor class.
- find( id )
Find a Monitor by id
- getAll( )
Get all active Monitors
- stopAll( )
Stop all Monitors
- find( id )
- Instance Functions
Functions that are used with a Monitor instance.
- hook( id, type, table, func, args )
Add a hook to a condition on this Monitor
- stop( )
Stop the Monitor
- unhook( hook )
Remove the specified hook
- unhook( id )
Remove the hook with the specified id
- hook( id, type, table, func, args )