Changeset 150 in pacpussensors for trunk/StdDbtPlayerComponents


Ignore:
Timestamp:
Aug 28, 2017, 7:22:27 PM (7 years ago)
Author:
lifranck
Message:

Changes to GstManager, sending the message now

Location:
trunk/StdDbtPlayerComponents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/StdDbtPlayerComponents/DbtPlyGstManager.cpp

    r109 r150  
    3232}
    3333
    34 void DbtPlyGstManager::processData(road_time_t /*t*/, road_timerange_t /*tr*/ , void * buf)
     34void DbtPlyGstManager::processData(road_time_t t, road_timerange_t tr , void * buf)
    3535{
    36   // no data available
    37   if (buf == NULL)
    38     return;
     36        // no data available
     37        if (!buf) {
     38                LOG_DEBUG("no data available: NULL buffer");
     39                return;
     40        }
     41        // make local copy of GGA frame
     42        memcpy(&mGst.frame, buf, sizeof(trame_gst));
     43        mGst.time = t;
     44        mGst.timerange = tr;
    3945
    40   val = (trame_gst*)(buf);
     46        // send GGA data to output
     47        checkedSend(outGst, mGst);
     48 
     49        //old val = (trame_gst*)(buf);
    4150
    4251}
     
    5463  DbtPlyFileManager::startActivity();
    5564
     65  outGst = getTypedOutput<TimestampedGstFrame, DbtPlyGstManager>("gst");
     66
    5667  // user interface
    5768  if (hasGui())
     
    6677}
    6778
    68 
     79void DbtPlyGstManager::addOutputs()
     80{
     81        // empty: no output
     82        addOutput<TimestampedGstFrame, DbtPlyGstManager>("gst");
     83}
    6984
    7085void DbtPlyGstManager::displayUI()
    7186{
    72   // todo
    73   printf (" No graphical interface implemented\n");
     87        // TODO
     88        LOG_WARN("GUI not implemented");
    7489}
    7590
  • trunk/StdDbtPlayerComponents/DbtPlyGstManager.h

    r111 r150  
    2525#include "Pacpus/PacpusTools/ShMem.h"
    2626
     27
     28#include <Pacpus/kernel/InputOutputInterface.h>
     29
    2730#include "DbtPlyGpsConfig.h"
    2831
     
    3235        : public DbtPlyFileManager
    3336{
     37        Q_OBJECT
     38
    3439public:
    3540    DbtPlyGstManager(QString name);
    3641    ~DbtPlyGstManager();
    3742    virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
     43
     44        //virtual void addInputs();
     45        virtual void addOutputs();
    3846
    3947protected:
     
    4654    trame_gst* val;
    4755
     56        // Local copy of GGA data with timestamp
     57        TimestampedGstFrame mGst;
     58
     59        // Declaration of outputs
     60        OutputInterface<TimestampedGstFrame, DbtPlyGstManager>* outGst;
    4861
    4962};
Note: See TracChangeset for help on using the changeset viewer.