sample
example
simulationEC
SampleSimulationEC.cpp
Go to the documentation of this file.
1
// -*- C++ -*-
10
#include "
SampleSimulationEC.h
"
11
12
// Module specification
13
// <rtc-template block="module_spec">
14
static
const
char
*
samplesimulationec_spec
[] =
15
{
16
"implementation_id"
,
"SampleSimulationEC"
,
17
"type_name"
,
"SampleSimulationEC"
,
18
"description"
,
"SampleSimulationEC"
,
19
"version"
,
"1.0.0"
,
20
"vendor"
,
"VenderName"
,
21
"category"
,
"Category"
,
22
"activity_type"
,
"PERIODIC"
,
23
"kind"
,
"DataFlowComponent"
,
24
"max_instance"
,
"1"
,
25
"language"
,
"C++"
,
26
"lang_type"
,
"compile"
,
27
"exec_cxt.periodic.rate"
,
"10.0"
,
28
""
29
};
30
// </rtc-template>
31
36
SampleSimulationEC::SampleSimulationEC
(RTC::Manager* manager)
37
// <rtc-template block="initializer">
38
:
RTC
::DataFlowComponentBase(manager)
39
40
// </rtc-template>
41
{
42
}
43
47
SampleSimulationEC::~SampleSimulationEC
()
48
{
49
}
50
51
52
/*
53
RTC::ReturnCode_t SampleSimulationEC::onInitialize()
54
{
55
// Registration: InPort/OutPort/Service
56
// <rtc-template block="registration">
57
// Set InPort buffers
58
59
// Set OutPort buffer
60
61
// Set service provider to Ports
62
63
// Set service consumers to Ports
64
65
// Set CORBA Service Ports
66
67
// </rtc-template>
68
69
return RTC::RTC_OK;
70
}
71
*/
72
73
/*
74
RTC::ReturnCode_t SampleSimulationEC::onFinalize()
75
{
76
return RTC::RTC_OK;
77
}
78
*/
79
80
/*
81
RTC::ReturnCode_t SampleSimulationEC::onStartup(RTC::UniqueId ec_id)
82
{
83
return RTC::RTC_OK;
84
}
85
*/
86
87
/*
88
RTC::ReturnCode_t SampleSimulationEC::onShutdown(RTC::UniqueId ec_id)
89
{
90
return RTC::RTC_OK;
91
}
92
*/
93
94
95
RTC::ReturnCode_t
SampleSimulationEC::onActivated
(RTC::UniqueId ec_id)
96
{
97
i
= 0;
98
return
RTC::RTC_OK;
99
}
100
101
102
/*
103
RTC::ReturnCode_t SampleSimulationEC::onDeactivated(RTC::UniqueId ec_id)
104
{
105
return RTC::RTC_OK;
106
}
107
*/
108
109
110
RTC::ReturnCode_t
SampleSimulationEC::onExecute
(RTC::UniqueId ec_id)
111
{
112
std::cout <<
"onExecute "
<<
i
<< std::endl;
113
i
++;
114
return
RTC::RTC_OK;
115
}
116
117
/*
118
RTC::ReturnCode_t SampleSimulationEC::onAborting(RTC::UniqueId ec_id)
119
{
120
return RTC::RTC_OK;
121
}
122
*/
123
124
/*
125
RTC::ReturnCode_t SampleSimulationEC::onError(RTC::UniqueId ec_id)
126
{
127
return RTC::RTC_OK;
128
}
129
*/
130
131
/*
132
RTC::ReturnCode_t SampleSimulationEC::onReset(RTC::UniqueId ec_id)
133
{
134
return RTC::RTC_OK;
135
}
136
*/
137
138
/*
139
RTC::ReturnCode_t SampleSimulationEC::onStateUpdate(RTC::UniqueId ec_id)
140
{
141
return RTC::RTC_OK;
142
}
143
*/
144
145
/*
146
RTC::ReturnCode_t SampleSimulationEC::onRateChanged(RTC::UniqueId ec_id)
147
{
148
return RTC::RTC_OK;
149
}
150
*/
151
152
153
154
extern
"C"
155
{
156
157
void
SampleSimulationECInit
(RTC::Manager* manager)
158
{
159
coil::Properties
profile
(
samplesimulationec_spec
);
160
manager->registerFactory(
profile
,
161
RTC::Create<SampleSimulationEC>,
162
RTC::Delete<SampleSimulationEC>);
163
}
164
165
};
166
167
SampleSimulationECInit
void SampleSimulationECInit(RTC::Manager *manager)
Definition:
SampleSimulationEC.cpp:157
SampleSimulationEC::onExecute
virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id)
Definition:
SampleSimulationEC.cpp:110
profile
png_infop png_charpp int png_charpp profile
Definition:
png.h:2380
SampleSimulationEC.h
SampleSimulationEC.
SampleSimulationEC::i
int i
Definition:
SampleSimulationEC.h:257
SampleSimulationEC::SampleSimulationEC
SampleSimulationEC(RTC::Manager *manager)
constructor
Definition:
SampleSimulationEC.cpp:36
samplesimulationec_spec
static const char * samplesimulationec_spec[]
Definition:
SampleSimulationEC.cpp:14
SampleSimulationEC::onActivated
virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id)
Definition:
SampleSimulationEC.cpp:95
RTC
Definition:
SimulationExecutionContext.cpp:7
SampleSimulationEC::~SampleSimulationEC
~SampleSimulationEC()
destructor
Definition:
SampleSimulationEC.cpp:47
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04