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