Changeset 38 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Jun 23, 2016, 10:15:30 AM (9 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/IODevice.cpp
r15 r38 27 27 namespace core { 28 28 29 IODevice::IODevice(const Object *parent, string name)30 : Object(parent, name, "IODevice") {31 pimpl_ = new IODevice_impl(this);29 IODevice::IODevice(const Object* parent,string name): Object(parent,name,"IODevice") { 30 pimpl_=new IODevice_impl(this); 31 lastUpdate=GetTime(); 32 32 } 33 33 … … 48 48 } 49 49 50 if (data !=NULL) {51 if (getFrameworkManager()->IsLogging() == true)52 pimpl_->WriteLog(data->DataTime());50 if(data!=NULL) { 51 lastUpdate=data->DataTime(); 52 if(getFrameworkManager()->IsLogging()==true) pimpl_->WriteLog(data->DataTime()); 53 53 54 54 data->pimpl_->Circle(); -
trunk/lib/FlairCore/src/IODevice.h
r15 r38 114 114 virtual DataType const &GetOutputDataType() const; 115 115 116 protected: 117 /*! 118 * \brief Process the childs of type IODevice, and log if needed 119 * 120 * This method must be called after computing datas; 121 * generally at the end of the reimplemented UpdateFrom or after acquiring 122 *datas in case of a sensor. \n 123 * It will call UpdateFrom methods of each child of type IODevice, 124 * and log all datas (this IODevice and its childs) 125 * if logging is enabled (see SetDataToLog(), AddDeviceToLog(), 126 * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n 127 * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be 128 *resumed. 129 * 130 * \param data data to process 131 */ 132 void ProcessUpdate(io_data *data); 116 Time lastUpdate; 117 protected: 118 /*! 119 * \brief Process the childs of type IODevice, and log if needed 120 * 121 * This method must be called after computing datas; 122 * generally at the end of the reimplemented UpdateFrom or after acquiring datas in case of a sensor. \n 123 * It will call UpdateFrom methods of each child of type IODevice, 124 * and log all datas (this IODevice and its childs) 125 * if logging is enabled (see SetDataToLog(), AddDeviceToLog(), 126 * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n 127 * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be resumed. 128 * 129 * \param data data to process 130 */ 131 void ProcessUpdate(io_data* data); 133 132 134 133 private: -
trunk/lib/FlairCore/src/Thread_impl.cpp
r20 r38 28 28 #else 29 29 #include <sys/resource.h> 30 #include <unistd.h> 31 #include <sys/syscall.h> 30 32 #endif 31 33 … … 153 155 } 154 156 #else 155 void *Thread_impl::main_nrt(void *arg) { 156 Thread_impl *caller = (Thread_impl *)arg; 157 void* Thread_impl::main_nrt(void * arg) 158 { 159 Thread_impl *caller = (Thread_impl*)arg; 160 /*string th_name=getFrameworkManager()->ObjectName()+ "-" + caller->self->ObjectName(); 161 caller->self->Info("pthread '%s' created with TID %x\n",th_name.c_str(),(pid_t)syscall(SYS_gettid));*/ 157 162 158 163 caller->self->Run();
Note:
See TracChangeset
for help on using the changeset viewer.