blob: e0434eed7dac534641b50b2097cff6cf2a8bed04 (
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
// -*- C++ -*-
// $Id$
#ifndef CIAO_RECEIVER_EXEC_H_
#define CIAO_RECEIVER_EXEC_H_
#include "SL_Disabled_ReceiverEC.h"
#include /**/ "Receiver_exec_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/LocalObject.h"
#include "ace/Task.h"
#include "ace/Reactor.h"
namespace CIAO_SL_Disabled_Receiver_Impl
{
typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean;
class Receiver_exec_i;
//============================================================
// read_action_Generator
//============================================================
class read_action_Generator
: public ACE_Event_Handler
{
public:
read_action_Generator (Receiver_exec_i &callback);
~read_action_Generator ();
virtual int handle_timeout (const ACE_Time_Value &tv,
const void *arg);
private:
Receiver_exec_i &pulse_callback_;
};
//============================================================
// StateListener_exec_i
//============================================================
class RECEIVER_EXEC_Export StateListener_exec_i
: public virtual ::CCM_DDS::TestTopic::CCM_StateListener,
public virtual ::CORBA::LocalObject
{
public:
StateListener_exec_i (Atomic_Boolean &);
virtual ~StateListener_exec_i (void);
virtual void
on_creation (
const ::TestTopic & datum,
const ::CCM_DDS::ReadInfo & info);
virtual void
on_one_update (
const ::TestTopic & datum,
const ::CCM_DDS::ReadInfo & info);
virtual void
on_many_updates (
const ::TestTopic_Seq & data,
const ::CCM_DDS::ReadInfoSeq & infos);
virtual void
on_deletion (
const ::TestTopic & datum,
const ::CCM_DDS::ReadInfo & info);
private:
Atomic_Boolean &no_operation_;
};
//============================================================
// Receiver_exec_i
//============================================================
class RECEIVER_EXEC_Export Receiver_exec_i
: public virtual Receiver_Exec,
public virtual ::CORBA::LocalObject
{
public:
Receiver_exec_i (void);
virtual ~Receiver_exec_i (void);
// Port operations.
virtual ::CCM_DDS::TestTopic::CCM_StateListener_ptr
get_info_out_data_listener (void);
virtual ::CCM_DDS::CCM_PortStatusListener_ptr
get_info_out_status (void);
// Operations from Components::SessionComponent.
virtual void
set_session_context (
::Components::SessionContext_ptr ctx);
virtual void configuration_complete (void);
virtual void ccm_activate (void);
virtual void ccm_passivate (void);
virtual void ccm_remove (void);
void read_all (void);
private:
::SL_Disabled::CCM_Receiver_Context_var context_;
::CCM_DDS::TestTopic::Reader_var reader_;
read_action_Generator * ticker_;
CORBA::ULong rate_;
Atomic_Boolean no_operation_;
Atomic_Boolean updater_data_;
};
extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_SL_Disabled_Receiver_Impl (void);
}
#endif /* ifndef */
|