WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
DirectOutput.PinballSupport.AlarmHandler Class Reference

The AlarmHandler classed is used to execute scheduled events (e.g. regular updates on a effect) in the framework.
Two types of alarms/scheduled events exist:
More...

Public Member Functions

DateTime GetNextAlarmTime ()
 Gets the time when the next alarm (interval or single) is scheduled. More...
 
bool ExecuteAlarms (DateTime AlarmTime)
 Executes all Alarmes which have expired until the specified AlarmTime.. More...
 
void RegisterIntervalAlarm (int IntervalMs, Action IntervalAlarmHandler)
 Registers the method specified in IntervalAlarmHandler for interval alarms.
Interval alarms are fired repeatedly at the specifed interval. Please note that the interval is likely not absoletely precise. More...
 
void UnregisterIntervalAlarm (Action IntervalAlarmHandler)
 Unregisters the specified IntervalAlarmHandler. More...
 
void RegisterIntervalAlarm (int IntervalMs, Action< object > IntervalAlarmHandler, object Parameter)
 Registers the method specified in IntervalAlarmHandler for interval alarms.
Interval alarms are fired repeatedly at the specifed interval. Please note that the interval is likely not absoletely precise. More...
 
void UnregisterIntervalAlarm (Action< object > IntervalAlarmHandler)
 Unregisters the specified IntervalAlarmHandler. More...
 
void RegisterAlarm (int DurationMs, Action AlarmHandler, bool DontUnregister=false)
 Registers the specied AlarmHandler for a alarm after the specified duration. More...
 
void RegisterAlarm (DateTime AlarmTime, Action AlarmHandler, bool DontUnregister=false)
 Registers the specified AlarmHandler for a alarm at the certain time. More...
 
void UnregisterAlarm (Action AlarmHandler)
 Unregisters all alarm for the specified alarm handler. More...
 
void RegisterAlarm (int DurationMs, Action< object > AlarmHandler, object Parameter, bool DontUnregister=false)
 Registers the specied AlarmHandler for a alarm after the specified duration. More...
 
void RegisterAlarm (DateTime AlarmTime, Action< object > AlarmHandler, object Parameter, bool DontUnregister=false)
 Registers the specified AlarmHandler for a alarm at the certain time. More...
 
void UnregisterAlarm (Action< object > AlarmHandler)
 Unregisters all alarms for the specified alarm handler. More...
 
void Init (Pinball Pinball)
 Inits the object.
More...
 
void Finish ()
 Finishes the object. Clears all alarm lists. More...
 
 AlarmHandler ()
 Initializes a new instance of the AlarmHandler class. More...
 

Detailed Description

The AlarmHandler classed is used to execute scheduled events (e.g. regular updates on a effect) in the framework.
Two types of alarms/scheduled events exist:

  • Alarm which only executes once
  • IntervalAlarm which executes at specified intervals until the alarm is unregistered.

Definition at line 14 of file AlarmHandler.cs.

Constructor & Destructor Documentation

DirectOutput.PinballSupport.AlarmHandler.AlarmHandler ( )

Initializes a new instance of the AlarmHandler class.

Definition at line 423 of file AlarmHandler.cs.

Member Function Documentation

bool DirectOutput.PinballSupport.AlarmHandler.ExecuteAlarms ( DateTime  AlarmTime)

Executes all Alarmes which have expired until the specified AlarmTime..

Parameters
AlarmTimeThe alarm time.
Returns
true if alarms have been executed, false if no alarms have been executed.

Definition at line 39 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.Finish ( )

Finishes the object. Clears all alarm lists.

Definition at line 411 of file AlarmHandler.cs.

DateTime DirectOutput.PinballSupport.AlarmHandler.GetNextAlarmTime ( )

Gets the time when the next alarm (interval or single) is scheduled.

Returns
DateTime for the next alarm. If no alarms are scheduled the MaxValue for DateTime is returned.

Definition at line 22 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.Init ( Pinball  Pinball)

Inits the object.

Definition at line 403 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterAlarm ( int  DurationMs,
Action  AlarmHandler,
bool  DontUnregister = false 
)

Registers the specied AlarmHandler for a alarm after the specified duration.

Parameters
DurationMsThe duration until the alarm fires in milliseconds.
AlarmHandlerThe alarm handler.
DontUnregisterIf set to true previously registered alarms for the same handler are no unregistered before registering the handler.

Definition at line 322 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterAlarm ( DateTime  AlarmTime,
Action  AlarmHandler,
bool  DontUnregister = false 
)

Registers the specified AlarmHandler for a alarm at the certain time.

Parameters
AlarmTimeThe alarm time.
AlarmHandlerThe alarm handler.
DontUnregisterIf set to true, previously registered alarms for the same AlarmHandler will not be unregistered. If set to false, previously registred alarms for the same AlarmHandler will be unregistered.

Definition at line 333 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterAlarm ( int  DurationMs,
Action< object >  AlarmHandler,
object  Parameter,
bool  DontUnregister = false 
)

Registers the specied AlarmHandler for a alarm after the specified duration.

Parameters
DurationMsThe duration until the alarm fires in milliseconds.
AlarmHandlerThe alarm handler.
ParameterThe parameter value for the alarm.
DontUnregisterIf set to true previously registered alarms for the same handler are no unregistered before registering the handler.

Definition at line 363 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterAlarm ( DateTime  AlarmTime,
Action< object >  AlarmHandler,
object  Parameter,
bool  DontUnregister = false 
)

Registers the specified AlarmHandler for a alarm at the certain time.

Parameters
AlarmTimeThe alarm time.
AlarmHandlerThe alarm handler.
ParameterThe parameter value for the alarm.
DontUnregisterIf set to true previously registered alarms for the same handler are no unregistered before registering the handler.

Definition at line 375 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterIntervalAlarm ( int  IntervalMs,
Action  IntervalAlarmHandler 
)

Registers the method specified in IntervalAlarmHandler for interval alarms.
Interval alarms are fired repeatedly at the specifed interval. Please note that the interval is likely not absoletely precise.

Parameters
IntervalMsThe alarm interval in milliseconds.
IntervalAlarmHandlerThe handler for the alarm (delegate of parameterless method).

Definition at line 168 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.RegisterIntervalAlarm ( int  IntervalMs,
Action< object >  IntervalAlarmHandler,
object  Parameter 
)

Registers the method specified in IntervalAlarmHandler for interval alarms.
Interval alarms are fired repeatedly at the specifed interval. Please note that the interval is likely not absoletely precise.

Parameters
IntervalMsThe alarm interval in milliseconds.
IntervalAlarmHandlerThe handler for the alarm (delegate of method with one parameter of type object).
ParameterThe parameter for the interval alarm.

Definition at line 198 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.UnregisterAlarm ( Action  AlarmHandler)

Unregisters all alarm for the specified alarm handler.

Parameters
AlarmHandlerThe alarm handler.

Definition at line 347 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.UnregisterAlarm ( Action< object >  AlarmHandler)

Unregisters all alarms for the specified alarm handler.

Parameters
AlarmHandlerThe alarm handler.

Definition at line 389 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.UnregisterIntervalAlarm ( Action  IntervalAlarmHandler)

Unregisters the specified IntervalAlarmHandler.

Parameters
IntervalAlarmHandlerThe interval alarm handler.

Definition at line 182 of file AlarmHandler.cs.

void DirectOutput.PinballSupport.AlarmHandler.UnregisterIntervalAlarm ( Action< object >  IntervalAlarmHandler)

Unregisters the specified IntervalAlarmHandler.

Parameters
IntervalAlarmHandlerThe interval alarm handler.

Definition at line 212 of file AlarmHandler.cs.


The documentation for this class was generated from the following file: