src
ext
ec
rtpreempt
example
RTSample.h
Go to the documentation of this file.
1
// -*- C++ -*-
7
#ifndef RTSAMPLE_H
8
#define RTSAMPLE_H
9
10
#include <rtm/idl/BasicDataTypeSkel.h>
11
#include <
rtm/Manager.h
>
12
#include <
rtm/DataFlowComponentBase.h
>
13
#include <
rtm/CorbaPort.h
>
14
#include <
rtm/DataInPort.h
>
15
#include <
rtm/DataOutPort.h
>
16
17
#include <coil/TimeMeasure.h>
18
19
// Service implementation headers
20
// <rtc-template block="service_impl_h">
21
22
// </rtc-template>
23
24
// Service Consumer stub headers
25
// <rtc-template block="consumer_stub_h">
26
27
// </rtc-template>
28
29
using namespace
RTC
;
30
31
class
RTSample
:
public
RTC::DataFlowComponentBase
32
{
33
public
:
34
RTSample
(
RTC::Manager
*
manager
);
35
~
RTSample
();
36
37
// The initialize action (on CREATED->ALIVE transition)
38
// formaer rtc_init_entry()
39
virtual
RTC::ReturnCode_t
onInitialize();
40
41
// The finalize action (on ALIVE->END transition)
42
// formaer rtc_exiting_entry()
43
// virtual RTC::ReturnCode_t onFinalize();
44
45
// The startup action when ExecutionContext startup
46
// former rtc_starting_entry()
47
// virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
48
49
// The shutdown action when ExecutionContext stop
50
// former rtc_stopping_entry()
51
// virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
52
53
// The activated action (Active state entry action)
54
// former rtc_active_entry()
55
virtual
RTC::ReturnCode_t
onActivated(
RTC::UniqueId
ec_id
);
56
57
// The deactivated action (Active state exit action)
58
// former rtc_active_exit()
59
virtual
RTC::ReturnCode_t
onDeactivated(
RTC::UniqueId
ec_id);
60
61
// The execution action that is invoked periodically
62
// former rtc_active_do()
63
virtual
RTC::ReturnCode_t
onExecute(
RTC::UniqueId
ec_id);
64
65
// The aborting action when main logic error occurred.
66
// former rtc_aborting_entry()
67
// virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
68
69
// The error action in ERROR state
70
// former rtc_error_do()
71
// virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
72
73
// The reset action that is invoked resetting
74
// This is same but different the former rtc_init_entry()
75
// virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
76
77
// The state update action that is invoked after onExecute() action
78
// no corresponding operation exists in OpenRTm-aist-0.2.0
79
// virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
80
81
// The action that is invoked when execution context's rate is changed
82
// no corresponding operation exists in OpenRTm-aist-0.2.0
83
// virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
84
85
86
protected
:
87
// Configuration variable declaration
88
// <rtc-template block="config_declare">
89
90
// </rtc-template>
91
92
// DataInPort declaration
93
// <rtc-template block="inport_declare">
94
95
// </rtc-template>
96
97
// DataOutPort declaration
98
// <rtc-template block="outport_declare">
99
100
// </rtc-template>
101
102
// CORBA Port declaration
103
// <rtc-template block="corbaport_declare">
104
105
// </rtc-template>
106
107
// Service declaration
108
// <rtc-template block="service_declare">
109
110
// </rtc-template>
111
112
// Consumer declaration
113
// <rtc-template block="consumer_declare">
114
115
// </rtc-template>
116
117
private
:
118
coil::TimeMeasure
m_tm
;
119
120
};
121
122
123
extern
"C"
124
{
125
DLL_EXPORT
void
RTSampleInit
(
RTC::Manager
*
manager
);
126
};
127
128
#endif // RTSAMPLE_H
129
AttachDetachRTCTest.ec_id
ec_id
Definition:
AttachDetachRTCTest.py:75
RTC
RT-Component.
Definition:
ArtExecutionContext.cpp:29
DataFlowComponentBase.h
RTC::DataFlowComponentBase
DataFlowComponentBase class.
Definition:
rtm/DataFlowComponentBase.h:69
doil::ReturnCode_t
ReturnCode_t
Definition:
doil.h:53
RTC::Manager
Manager class.
Definition:
Manager.h:80
AddRemoveMemberSDOPackageTest.manager
manager
Definition:
AddRemoveMemberSDOPackageTest.py:28
DataOutPort.h
Base class of OutPort.
RTSample::m_tm
coil::TimeMeasure m_tm
Definition:
RTSample.h:118
CorbaPort.h
CorbaPort class.
Manager.h
RTComponent manager class.
RTSampleInit
DLL_EXPORT void RTSampleInit(RTC::Manager *manager)
Definition:
RTSample.cpp:159
RTC::UniqueId
ExecutionContextHandle_t UniqueId
Definition:
ComponentActionListener.h:32
DataInPort.h
Base class of InPort.
DLL_EXPORT
#define DLL_EXPORT
Definition:
PluginC.cpp:8
RTSample
Definition:
RTSample.h:31
coil::TimeMeasure
TimeMeasure class.
Definition:
TimeMeasure.h:49
openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:45