ImageData2CameraImage.cpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00010 #include "ImageData2CameraImage.h"
00011 
00012 // Module specification
00013 // <rtc-template block="module_spec">
00014 static const char* imagedata2cameraimage_spec[] =
00015   {
00016     "implementation_id", "ImageData2CameraImage",
00017     "type_name",         "ImageData2CameraImage",
00018     "description",       "imagedata2cameraimage component",
00019     "version",           HRPSYS_PACKAGE_VERSION,
00020     "vendor",            "AIST",
00021     "category",          "example",
00022     "activity_type",     "DataFlowComponent",
00023     "max_instance",      "10",
00024     "language",          "C++",
00025     "lang_type",         "compile",
00026     // Configuration variables
00027 
00028     ""
00029   };
00030 // </rtc-template>
00031 
00032 ImageData2CameraImage::ImageData2CameraImage(RTC::Manager* manager)
00033   : RTC::DataFlowComponentBase(manager),
00034     // <rtc-template block="initializer">
00035     m_dataIn("imageIn", m_data.data.image),
00036     m_dataOut("imageOut", m_data),
00037     // </rtc-template>
00038     dummy(0)
00039 {
00040 }
00041 
00042 ImageData2CameraImage::~ImageData2CameraImage()
00043 {
00044 }
00045 
00046 
00047 
00048 RTC::ReturnCode_t ImageData2CameraImage::onInitialize()
00049 {
00050   std::cout << m_profile.instance_name << ": onInitialize()" << std::endl;
00051   // <rtc-template block="bind_config">
00052   // Bind variables and configuration variable
00053   
00054   // </rtc-template>
00055 
00056   // Registration: InPort/OutPort/Service
00057   // <rtc-template block="registration">
00058   // Set InPort buffers
00059   addInPort("imageIn", m_dataIn);
00060 
00061   // Set OutPort buffer
00062   addOutPort("imageOut", m_dataOut);
00063   
00064   // Set service provider to Ports
00065   
00066   // Set service consumers to Ports
00067   
00068   // Set CORBA Service Ports
00069   
00070   // </rtc-template>
00071   m_data.error_code = 0;
00072 
00073   return RTC::RTC_OK;
00074 }
00075 
00076 
00077 
00078 /*
00079 RTC::ReturnCode_t ImageData2CameraImage::onFinalize()
00080 {
00081   return RTC::RTC_OK;
00082 }
00083 */
00084 
00085 /*
00086 RTC::ReturnCode_t ImageData2CameraImage::onStartup(RTC::UniqueId ec_id)
00087 {
00088   return RTC::RTC_OK;
00089 }
00090 */
00091 
00092 /*
00093 RTC::ReturnCode_t ImageData2CameraImage::onShutdown(RTC::UniqueId ec_id)
00094 {
00095   return RTC::RTC_OK;
00096 }
00097 */
00098 
00099 RTC::ReturnCode_t ImageData2CameraImage::onActivated(RTC::UniqueId ec_id)
00100 {
00101   std::cout << m_profile.instance_name<< ": onActivated(" << ec_id << ")" << std::endl;
00102   return RTC::RTC_OK;
00103 }
00104 
00105 RTC::ReturnCode_t ImageData2CameraImage::onDeactivated(RTC::UniqueId ec_id)
00106 {
00107   std::cout << m_profile.instance_name<< ": onDeactivated(" << ec_id << ")" << std::endl;
00108   return RTC::RTC_OK;
00109 }
00110 
00111 RTC::ReturnCode_t ImageData2CameraImage::onExecute(RTC::UniqueId ec_id)
00112 {
00113   if (m_dataIn.isNew()){
00114     m_dataIn.read();
00115     m_dataOut.write();
00116   }
00117   return RTC::RTC_OK;
00118 }
00119 
00120 /*
00121 RTC::ReturnCode_t ImageData2CameraImage::onAborting(RTC::UniqueId ec_id)
00122 {
00123   return RTC::RTC_OK;
00124 }
00125 */
00126 
00127 /*
00128 RTC::ReturnCode_t ImageData2CameraImage::onError(RTC::UniqueId ec_id)
00129 {
00130   return RTC::RTC_OK;
00131 }
00132 */
00133 
00134 /*
00135 RTC::ReturnCode_t ImageData2CameraImage::onReset(RTC::UniqueId ec_id)
00136 {
00137   return RTC::RTC_OK;
00138 }
00139 */
00140 
00141 /*
00142 RTC::ReturnCode_t ImageData2CameraImage::onStateUpdate(RTC::UniqueId ec_id)
00143 {
00144   return RTC::RTC_OK;
00145 }
00146 */
00147 
00148 /*
00149 RTC::ReturnCode_t ImageData2CameraImage::onRateChanged(RTC::UniqueId ec_id)
00150 {
00151   return RTC::RTC_OK;
00152 }
00153 */
00154 
00155 
00156 
00157 extern "C"
00158 {
00159 
00160   void ImageData2CameraImageInit(RTC::Manager* manager)
00161   {
00162     RTC::Properties profile(imagedata2cameraimage_spec);
00163     manager->registerFactory(profile,
00164                              RTC::Create<ImageData2CameraImage>,
00165                              RTC::Delete<ImageData2CameraImage>);
00166   }
00167 
00168 };
00169 
00170 


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed Sep 6 2017 02:35:55