Changeset 38 in flair-src for trunk/lib/FlairCore


Ignore:
Timestamp:
Jun 23, 2016, 10:15:30 AM (8 years ago)
Author:
Bayard Gildas
Message:

Modif. pour ajour manette émulée (EmulatedController)

Location:
trunk/lib/FlairCore/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/IODevice.cpp

    r15 r38  
    2727namespace core {
    2828
    29 IODevice::IODevice(const Object *parent, string name)
    30     : Object(parent, name, "IODevice") {
    31   pimpl_ = new IODevice_impl(this);
     29IODevice::IODevice(const Object* parent,string name): Object(parent,name,"IODevice") {
     30    pimpl_=new IODevice_impl(this);
     31    lastUpdate=GetTime();
    3232}
    3333
     
    4848  }
    4949
    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());
    5353
    5454    data->pimpl_->Circle();
  • trunk/lib/FlairCore/src/IODevice.h

    r15 r38  
    114114  virtual DataType const &GetOutputDataType() const;
    115115
    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);
    133132
    134133private:
  • trunk/lib/FlairCore/src/Thread_impl.cpp

    r20 r38  
    2828#else
    2929#include <sys/resource.h>
     30#include <unistd.h>
     31#include <sys/syscall.h>
    3032#endif
    3133
     
    153155}
    154156#else
    155 void *Thread_impl::main_nrt(void *arg) {
    156   Thread_impl *caller = (Thread_impl *)arg;
     157void* Thread_impl::main_nrt(void * arg)
     158{
     159    Thread_impl *caller = (Thread_impl*)arg;
     160/*string th_name=getFrameworkManager()->ObjectName()+ "-" + caller->self->ObjectName();
     161caller->self->Info("pthread '%s' created with TID %x\n",th_name.c_str(),(pid_t)syscall(SYS_gettid));*/
    157162
    158163  caller->self->Run();
Note: See TracChangeset for help on using the changeset viewer.