summaryrefslogtreecommitdiff
path: root/Kokyu/DSRT_Dispatcher_Impl.h
blob: 6e16981bf6ec07f057cd74a6c1562feba336ccbd (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* -*- C++ -*- */
/**
 *  @file   DSRT_Dispatcher_Impl.h
 *
 *  $Id$
 *
 */

#ifndef DSRT_DISPATCHER_IMPL_H
#define DSRT_DISPATCHER_IMPL_H
#include "ace/pre.h"
#include "ace/OS.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ace/Task.h"
#include "ace/Message_Block.h"
#include "ace/Auto_Ptr.h"
#include "ace/Service_Config.h"

#include "ace/Sched_Params.h"

#include "kokyu_export.h"
#include "Kokyu.h"

namespace Kokyu
{
  class DSRT_Scheduler_Impl;

  class DSRT_Dispatcher_Impl
  {
  public:

    virtual ~DSRT_Dispatcher_Impl ();

    int init (const DSRT_ConfigInfo&);
    int schedule (guid_t guid,
                  const QoSDescriptor&);
    int update_schedule (guid_t guid,
                         const QoSDescriptor&);
    int cancel_schedule (guid_t guid,
                         const QoSDescriptor&);

  private:
    DSRT_Scheduler_Impl* create_scheduler (DSRT_Sched_t sched_type);

    int init_i (const DSRT_ConfigInfo&);
    int schedule_i (guid_t guid,
                    const QoSDescriptor&);
    int update_schedule_i (guid_t guid,
                           const QoSDescriptor&);
    int cancel_schedule_i (guid_t guid,
                           const QoSDescriptor&);

  private:
    DSRT_ConfigInfo curr_config_info_;
    DSRT_Sched_t sched_type_;
    DSRT_Scheduler_Impl* scheduler_impl_;
  };

} //end of namespace

#if defined (__ACE_INLINE__)
#include "DSRT_Dispatcher_Impl.i"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"
#endif /* DEFAULT_DISPATCHER_IMPL_H */