#include <alarm.h>
Public Member Functions | |
| Alarm (Alarmable &alarmable, uint32_t msec_total) | |
| Creates a new Alarm, setting the receiver of the notification and the total Alarm time. | |
| virtual void | reset () |
| Resets the count down and enables the Alarm. | |
| virtual void | disable () |
| Disables the alarm. | |
| virtual void | setTime (uint32_t milliseconds) |
| Sets the alarm total time. | |
| virtual uint32_t | getTotalTime () const |
| Returns the total time of the Alarm. | |
| virtual | ~Alarm () |
| Deletes alarm. | |
Protected Member Functions | |
| virtual void | notifyAlarmable () |
| Notifies alarm timeout to the receiver of the event. | |
Protected Attributes | |
| bool | enabled |
| Indicates if this alarm must notify to the Alarmable object when its time expires. | |
| auto_ptr< Mutex > | mutex |
| Mutex used to protect Alarm accesses. | |
| Alarmable & | alarmable |
| Alarmable object to be notified. | |
| int64_t | msec_total |
| Total time of the Alarm (in milliseconds).This time is used when the Alarm is reseted. | |
| int64_t | msec_left |
| Remainig time of the Alarm (in milliseconds). | |
Friends | |
| class | AlarmControllerImpl |
| openikev2::Alarm::Alarm | ( | Alarmable & | alarmable, | |
| uint32_t | msec_total | |||
| ) |
| void openikev2::Alarm::disable | ( | ) | [virtual] |
Disables the alarm.
It will not alarm the Alarmable when the count down finishes.
| void openikev2::Alarm::setTime | ( | uint32_t | milliseconds | ) | [virtual] |
Sets the alarm total time.
| milliseconds | Total time in milliseconds. |
| uint32_t openikev2::Alarm::getTotalTime | ( | ) | const [virtual] |
1.5.1