summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/FaultTolerance/FLARe/DeCoRAM/src/FTRMFF_Ranked.h
blob: a4d1ef56e0f7af53e3af1595b5f864630d54bad5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// -*- C++ -*-

//=============================================================================
/**
 *  @file     FTRMFF_Ranked.h
 *
 *  $Id$
 *
 *  @author  Friedhelm Wolf (fwolf@dre.vanderbilt.edu)
 */
//=============================================================================

#ifndef FTRMFF_RANKED_ALGORITHM_H_
#define FTRMFF_RANKED_ALGORITHM_H_

#include "Schedule.h"
#include <memory>

class FTRMFF_Ranked : public FTRMFF_Algorithm
{
public:
  virtual ~FTRMFF_Ranked ();

  virtual FTRMFF_Output operator () (const FTRMFF_Input & input);
};

class FTRMFF_Ranked_Algorithm : 
  public std::unary_function <TASK_LIST,
                              SCHEDULING_MAP>
{
public:
  FTRMFF_Ranked_Algorithm (const PROCESSOR_LIST & processors,
                           unsigned int consistency_level,
                           const std::string & ranking_type = "simple");

  virtual ~FTRMFF_Ranked_Algorithm ();

  virtual SCHEDULING_MAP operator () (const TASK_LIST & tasks);

  SCHEDULE_PROGRESS_LIST get_unschedulable ();

  const SCHEDULE & schedule () const;

private:
  SCHEDULE schedule_;
  SCHEDULE_PROGRESS_LIST unschedulable_;
  unsigned int consistency_level_;
  std::auto_ptr<Ranking_Algorithm> ranking_algorithm_;
};

#endif /* FTRMFF_RANKED_ALGORITHM_H_ */