flimEngine
AlarmableManager Class Reference

#include <AlarmableManager.h>

Collaboration diagram for AlarmableManager:
Collaboration graph

Public Types

enum  ALARM_ID { ALARM_0, ALARM_1, ALARM_2 }
 Values that represent alarm Identifiers. More...
 

Public Member Functions

 AlarmableManager ()
 
 ~AlarmableManager ()
 
 AlarmableManager (const AlarmableManager &)=delete
 
AlarmableManageroperator= (const AlarmableManager &)=delete
 
errcode Register (float t, Alarmable *in, AlarmableManager::ALARM_ID id)
 Registers the alarm to go off after t milliseconds. More...
 
errcode Deregister (Alarmable *in, AlarmableManager::ALARM_ID id)
 Deregisters the alarmable per one ID. More...
 
errcode ProcessAlarms ()
 Process the alarms. More...
 

Static Public Attributes

static const int ALARM_NUMBER = 3
 The alarm number. More...
 

Private Types

using AlarmEvent = std::pair< Alarmable *, ALARM_ID >
 

Private Attributes

std::multimap< float, AlarmEventtimeline
 

Friends

class Alarmable
 

Member Typedef Documentation

◆ AlarmEvent

using AlarmableManager::AlarmEvent = std::pair<Alarmable*, ALARM_ID>
private

Member Enumeration Documentation

◆ ALARM_ID

Values that represent alarm Identifiers.

Enumerator
ALARM_0 
ALARM_1 
ALARM_2 

Constructor & Destructor Documentation

◆ AlarmableManager() [1/2]

AlarmableManager::AlarmableManager ( )

◆ ~AlarmableManager()

AlarmableManager::~AlarmableManager ( )
inline

◆ AlarmableManager() [2/2]

AlarmableManager::AlarmableManager ( const AlarmableManager )
delete

Member Function Documentation

◆ Deregister()

errcode AlarmableManager::Deregister ( Alarmable in,
AlarmableManager::ALARM_ID  id 
)

Deregisters the alarmable per one ID.

Author
Jack Campbell
Date
3/5/2017
Parameters
[in,out]inIf non-null, the alarmable.
idThe ID of the alarm to deregister
Returns
An errcode.

◆ operator=()

AlarmableManager& AlarmableManager::operator= ( const AlarmableManager )
delete

◆ ProcessAlarms()

errcode AlarmableManager::ProcessAlarms ( )

Process the alarms.

Author
Jack Campbell
Date
3/5/2017
Returns
An errcode.

◆ Register()

errcode AlarmableManager::Register ( float  t,
Alarmable in,
AlarmableManager::ALARM_ID  id 
)

Registers the alarm to go off after t milliseconds.

Author
Jack Campbell
Date
3/5/2017
Parameters
tThe amount of time to register the alarm to
[in,out]inIf non-null, the alarmable.
idThe ID of the alarm to register
Returns
An errcode.

Friends And Related Function Documentation

◆ Alarmable

friend class Alarmable
friend

Member Data Documentation

◆ ALARM_NUMBER

const int AlarmableManager::ALARM_NUMBER = 3
static

The alarm number.

◆ timeline

std::multimap<float, AlarmEvent> AlarmableManager::timeline
private

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