Changeset 115 in pacpussensors for trunk


Ignore:
Timestamp:
Dec 16, 2015, 3:15:45 PM (9 years ago)
Author:
DHERBOMEZ Gérald
Message:

add outputs to image replay manager

Location:
trunk/StdDbtPlayerComponents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/StdDbtPlayerComponents/DbtPlyImageManager.cpp

    r111 r115  
    2222#include <QImage>
    2323#include <QMutex>
     24
     25#include <Pacpus/structures/genericStructures.h>
     26#include <Pacpus/kernel/InputOutputInterface.h>
    2427
    2528namespace pacpus {
     
    5760}
    5861
     62void DbtPlyImageManager::addInputs()
     63{
     64    // empty: no inputs
     65}
     66
     67void DbtPlyImageManager::addOutputs()
     68{
     69    addOutput<PacpusImage, DbtPlyImageManager>("image");
     70}
     71
     72
    5973/// TODO: doc
    60 void DbtPlyImageManager::processData(road_time_t /*t*/, road_timerange_t /*tr*/, void * buf)
     74void DbtPlyImageManager::processData(road_time_t t, road_timerange_t tr, void * buf)
    6175{
    6276    if (!buf) {
     
    122136        }
    123137        shMem_->write(im_->bits(), shmemSize);*/ // deprecated
     138
     139        PacpusImage data;
     140        data.time = t;
     141        data.timerange = tr;
     142        data.image = *im_;
     143        OutputInterface<PacpusImage, DbtPlyImageManager> * imageOutput = getTypedOutput<PacpusImage, DbtPlyImageManager>("image");
     144        if (imageOutput && imageOutput->hasConnection()) {
     145            imageOutput->send(data, road_time(), /*timerange=*/50000);
     146        }
    124147    }
    125148        break;
  • trunk/StdDbtPlayerComponents/DbtPlyImageManager.h

    r111 r115  
    6666
    6767    void YtoRGB32(unsigned char * dest, unsigned char * src);
     68
     69    virtual void addInputs();
     70    virtual void addOutputs();
    6871};
    6972
Note: See TracChangeset for help on using the changeset viewer.