SoftErrorLimiter.h
Go to the documentation of this file.
1 // -*- C++ -*-
10 #ifndef SOFT_ERROR_LIMITER_H
11 #define SOFT_ERROR_LIMITER_H
12 
13 #include <rtm/idl/BasicDataType.hh>
14 #include "hrpsys/idl/HRPDataTypes.hh"
15 #include <rtm/Manager.h>
16 #include <rtm/DataFlowComponentBase.h>
17 #include <rtm/CorbaPort.h>
18 #include <rtm/DataInPort.h>
19 #include <rtm/DataOutPort.h>
20 #include <rtm/idl/BasicDataTypeSkel.h>
21 #include "JointLimitTable.h"
22 
23 // Service implementation headers
24 // <rtc-template block="service_impl_h">
26 #include "beep.h"
27 
28 // </rtc-template>
29 
30 // Service Consumer stub headers
31 // <rtc-template block="consumer_stub_h">
32 
33 // </rtc-template>
34 
35 using namespace RTC;
36 
42 {
43  public:
52  virtual ~SoftErrorLimiter();
53 
54  // The initialize action (on CREATED->ALIVE transition)
55  // formaer rtc_init_entry()
56  virtual RTC::ReturnCode_t onInitialize();
57 
58  // The finalize action (on ALIVE->END transition)
59  // formaer rtc_exiting_entry()
60  //virtual RTC::ReturnCode_t onFinalize();
61 
62  // The startup action when ExecutionContext startup
63  // former rtc_starting_entry()
64  // virtual RTC::ReturnCode_t onStartup(RTC::UniqueId ec_id);
65 
66  // The shutdown action when ExecutionContext stop
67  // former rtc_stopping_entry()
68  // virtual RTC::ReturnCode_t onShutdown(RTC::UniqueId ec_id);
69 
70  // The activated action (Active state entry action)
71  // former rtc_active_entry()
72  virtual RTC::ReturnCode_t onActivated(RTC::UniqueId ec_id);
73 
74  // The deactivated action (Active state exit action)
75  // former rtc_active_exit()
76  virtual RTC::ReturnCode_t onDeactivated(RTC::UniqueId ec_id);
77 
78  // The execution action that is invoked periodically
79  // former rtc_active_do()
80  virtual RTC::ReturnCode_t onExecute(RTC::UniqueId ec_id);
81 
82  // The aborting action when main logic error occurred.
83  // former rtc_aborting_entry()
84  // virtual RTC::ReturnCode_t onAborting(RTC::UniqueId ec_id);
85 
86  // The error action in ERROR state
87  // former rtc_error_do()
88  // virtual RTC::ReturnCode_t onError(RTC::UniqueId ec_id);
89 
90  // The reset action that is invoked resetting
91  // This is same but different the former rtc_init_entry()
92  // virtual RTC::ReturnCode_t onReset(RTC::UniqueId ec_id);
93 
94  // The state update action that is invoked after onExecute() action
95  // no corresponding operation exists in OpenRTm-aist-0.2.0
96  // virtual RTC::ReturnCode_t onStateUpdate(RTC::UniqueId ec_id);
97 
98  // The action that is invoked when execution context's rate is changed
99  // no corresponding operation exists in OpenRTm-aist-0.2.0
100  // virtual RTC::ReturnCode_t onRateChanged(RTC::UniqueId ec_id);
101 
102 
103  protected:
104  // Configuration variable declaration
105  // <rtc-template block="config_declare">
106 
107  // </rtc-template>
108 
109  TimedDoubleSeq m_qRef;
110  TimedDoubleSeq m_qCurrent;
111  OpenHRP::TimedLongSeqSeq m_servoState;
112  TimedLongSeq m_beepCommand;
113 
114  // DataInPort declaration
115  // <rtc-template block="inport_declare">
119 
120  // </rtc-template>
121 
122  // DataOutPort declaration
123  // <rtc-template block="outport_declare">
127 
128  // </rtc-template>
129 
130  // CORBA Port declaration
131  // <rtc-template block="corbaport_declare">
133 
134  // </rtc-template>
135 
136  // Service declaration
137  // <rtc-template block="service_declare">
139 
140  // </rtc-template>
141 
142  // Consumer declaration
143  // <rtc-template block="consumer_declare">
144 
145  // </rtc-template>
146 
147  private:
149  std::map<std::string, hrp::JointLimitTable> joint_limit_tables;
150  std::vector<bool> m_joint_mask;
151  unsigned int m_debugLevel;
152  int dummy, position_limit_error_beep_freq, soft_limit_error_beep_freq, debug_print_freq;
153  double dt;
155  // Since this RTC is stable RTC, we support both direct beeping from this RTC and beepring through BeeperRTC.
156  // If m_beepCommand is connected to BeeperRTC, is_beep_port_connected is true.
158 };
159 
160 
161 extern "C"
162 {
164 };
165 
166 #endif // SOFT_ERROR_LIMITER_H
ec_id
void SoftErrorLimiterInit(RTC::Manager *manager)
std::vector< bool > m_joint_mask
OutPort< TimedLongSeq > m_beepCommandOut
TimedLongSeq m_beepCommand
manager
SoftErrorLimiterService_impl m_service0
OutPort< OpenHRP::TimedLongSeqSeq > m_servoStateOut
InPort< OpenHRP::TimedLongSeqSeq > m_servoStateIn
ExecutionContextHandle_t UniqueId
boost::shared_ptr< robot > m_robot
TimedDoubleSeq m_qRef
OpenHRP::TimedLongSeqSeq m_servoState
OutPort< TimedDoubleSeq > m_qOut
std::map< std::string, hrp::JointLimitTable > joint_limit_tables
unsigned int m_debugLevel
InPort< TimedDoubleSeq > m_qCurrentIn
InPort< TimedDoubleSeq > m_qRefIn
TimedDoubleSeq m_qCurrent
RTC::CorbaPort m_SoftErrorLimiterServicePort
sample RT component which has one data input port and one data output port


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:21