Changeset 157 in flair-src for trunk/lib/FlairCore/src
- Timestamp:
- Mar 4, 2017, 3:29:18 PM (8 years ago)
- Location:
- trunk/lib/FlairCore/src
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Euler.cpp
r15 r157 113 113 rot2 = yaw - angle; 114 114 } 115 if (rot2 < rot1) 116 rot1 = -rot2; 115 116 if (rot2 < rot1) rot1 = -rot2; 117 117 118 rot1 = -rot1; // pour avoir rot1=yaw-angle 118 119 -
trunk/lib/FlairCore/src/IODevice.cpp
r121 r157 64 64 DataType const &IODevice::GetOutputDataType() const { return dummyType; } 65 65 66 void IODevice::SetIsReady(bool status) { 67 pimpl_->SetIsReady(status); 68 } 69 70 bool IODevice::IsReady(void) const { 71 return pimpl_->IsReady(); 72 } 73 66 74 } // end namespace core 67 75 } // end namespace flair -
trunk/lib/FlairCore/src/IODevice.h
r121 r157 110 110 */ 111 111 void OutputToShMem(bool enabled); 112 113 /*! 114 * \brief is device ready 115 * 116 * Use it check if a device is ready or not. 117 * See also setIsReady. 118 * 119 * \return true if device is ready 120 */ 121 bool IsReady(void) const; 112 122 113 123 // TODO: these 2 method should be pure virtual … … 115 125 virtual DataType const &GetOutputDataType() const; 116 126 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); 127 protected: 128 /*! 129 * \brief Process the childs of type IODevice, and log if needed 130 * 131 * This method must be called after computing datas; 132 * generally at the end of the reimplemented UpdateFrom or after acquiring datas in case of a sensor. \n 133 * It will call UpdateFrom methods of each child of type IODevice, 134 * and log all datas (this IODevice and its childs) 135 * if logging is enabled (see SetDataToLog(), AddDeviceToLog(), 136 * FrameworkManager::StartLog and FrameworkManager::AddDeviceToLog). \n 137 * If a thread is waiting on this IODevice (see Thread::WaitUpdate), it will be resumed. 138 * 139 * \param data data to process 140 */ 141 void ProcessUpdate(io_data* data); 142 143 /*! 144 * \brief set is ready 145 * 146 * Sets if the device is ready or not. By default the IODevice is not ready.\n 147 * See also isReady. 148 * 149 * \param status status 150 */ 151 void SetIsReady(bool status); 132 152 133 153 private: -
trunk/lib/FlairCore/src/IODevice_impl.cpp
r122 r157 39 39 tobelogged = false; 40 40 outputtoshm = false; 41 isReady=false; 41 42 } 42 43 … … 233 234 return status; 234 235 } 236 237 void IODevice_impl::SetIsReady(bool status) { 238 isReady=status; 239 } 240 241 bool IODevice_impl::IsReady(void) const { 242 return isReady; 243 } -
trunk/lib/FlairCore/src/ui_com.cpp
r133 r157 278 278 if (offset != 3) { 279 279 memcpy(&send_buffer[1], &resume_period, sizeof(uint16_t)); 280 // printf("send %i %i %i %x 281 // %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]); 280 // printf("send %i %i %i %x %x\n",resume_period,offset,sizeof(uint16_t),send_buffer,&send_buffer[1]); 282 281 // for(int i=0;i<offset;i++) printf("%x ",send_buffer[i]); 283 282 // printf("\n"); … … 292 291 } 293 292 send_mutex->ReleaseMutex(); 294 // 293 //Printf("%i %lld\n",resume_period,GetTime()/1000000); 295 294 } else { 296 295 send_mutex->ReleaseMutex(); 297 296 // rien a faire, suspend 298 // 297 //Printf("rien a faire suspend\n"); 299 298 Suspend(); 300 // 299 //Printf("wake\n"); 301 300 // on planifie la prochaine execution 302 301 Time time = GetTime(); -
trunk/lib/FlairCore/src/unexported/IODevice_impl.h
r122 r157 47 47 void WriteToShMem(void); 48 48 void PrintLogsDescriptors(void); 49 void SetIsReady(bool status); 50 bool IsReady(void) const; 49 51 50 52 private: … … 59 61 bool outputtoshm; 60 62 flair::core::SharedMem *shmem; 63 bool isReady; 61 64 }; 62 65
Note:
See TracChangeset
for help on using the changeset viewer.