MotorControlProSVC_impl.cpp
Go to the documentation of this file.
00001 // -*-C++-*-
00015 #include "MotorControlProSVC_impl.h"
00016 //--- add --------------------------
00017 #include <rtm/CORBA_SeqUtil.h>
00018 #include <iostream>
00019 //----------------------------------
00020 
00021 /*
00022  * Example implementational code for IDL interface Motor
00023  */
00024 MotorSVC_impl::MotorSVC_impl()
00025 :rtclog("MotorSVC_impl")
00026 {
00027         m_GainFlag = m_StartFlag = m_FinishFlag = m_ClearFlag = m_StopFlag= false;  //service port Flag (if data were inputed)
00028         m_PGainL = m_PGainR = m_DGainL = m_DGainR = 0.0;   // service port data values  
00029 }
00030 
00031 
00032 MotorSVC_impl::~MotorSVC_impl()
00033 {
00034   // Please add extra destructor code here.
00035 }
00036 
00037 
00038 /*
00039  * Methods corresponding to IDL attributes and operations
00040  */
00041 void MotorSVC_impl::setPDGain(CORBA::Double PGainL, CORBA::Double PGainR, CORBA::Double DGainL, CORBA::Double DGainR)
00042 {
00043         RTC_INFO(("[GainControlSVC_impl::ChangeGain] called"));
00044         //std::cout << "[GainControlSVC_impl::ChangeGain] called "  << std::endl;
00045  
00046         //set ServicePort's Data for using in Controll Side 
00047         m_PGainL = PGainL;
00048         m_PGainR = PGainR;
00049         m_DGainL = DGainL;
00050         m_DGainR = DGainR;
00051         //TODO:check the datas whether balid or invalid. if OK -> set FLAG
00052         m_GainFlag = true; // set FLAG after inserting data from servicePort
00053 
00054         return;
00055 }
00056 
00057 void MotorSVC_impl::Start()
00058 {
00059         RTC_INFO(("[MotorSVC_impl::Start] called "));
00060         //std::cout << "[MotorSVC_impl::Start] called "  << std::endl;
00061 
00062         // set FLAG 
00063         m_StartFlag = true;
00064 
00065         return;
00066 }
00067 
00068 void MotorSVC_impl::Finish()
00069 {
00070         RTC_INFO(("[MotorSVC_impl::Finish] called "));
00071         //std::cout << "[MotorSVC_impl::Finish] called "  << std::endl;
00072 
00073         // set FLAG 
00074         m_FinishFlag = true;
00075 
00076         return;
00077 }
00078 
00079 void MotorSVC_impl::Clear()
00080 {
00081         RTC_INFO(("[MotorSVC_impl::Clear] called "));
00082         //std::cout << "[MotorSVC_impl::Clear] called "  << std::endl;
00083 
00084         // set FLAG 
00085         m_ClearFlag = true;
00086 
00087         return;
00088 }
00089 
00090 void MotorSVC_impl::Stop()
00091 {
00092         RTC_INFO(("[MotorSVC_impl::Stop] called "));
00093         //std::cout << "[MotorSVC_impl::Stop] called "  << std::endl;
00094 
00095         // set FLAG 
00096         m_StopFlag = true;
00097 
00098         return;
00099 }
00100 
00101 
00102 
00103 // End of example implementational code
00104 
00105 
00106 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49